everapi / freecurrencyapi-php
A PHP wrapper for the freecurrencyapi.com API
Installs: 14 021
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^1.20
- spatie/ray: ^1.28
This package is not auto-updated.
Last update: 2024-12-21 15:49:49 UTC
README
freecurrencyapi-php - PHP Free Currency Converter API
This package is a PHP wrapper for freecurrencyapi.com, a free currency conversion API, that aims to make the usage of the API as easy as possible in your project.
Installation
You can install the package via composer:
composer require everapi/freecurrencyapi-php
Usage
Initialize the API with your API Key (get one for free at freecurrencyapi.com):
$freecurrencyapi = new \FreeCurrencyApi\FreeCurrencyApi\FreeCurrencyApiClient('YOUR-API-KEY');
Afterwards you can use the endpoints of the API like this:
echo $freecurrencyapi->latest([ 'base_currency' => 'EUR', 'currencies' => 'USD', ]);
Other available functions / endpoints are:
status
currencies
latest
historical
Learn more about endpoints, parameters and response data structure in the docs.
License
The MIT License (MIT). Please see License File for more information.