everapi/freecurrencyapi-php

A PHP wrapper for the freecurrencyapi.com API

dev-master 2023-05-26 09:26 UTC

This package is not auto-updated.

Last update: 2024-02-17 11:35:12 UTC


README

68747470733a2f2f6170702e6672656563757272656e63796170692e636f6d2f696d672f6c6f676f2f6672656563757272656e63796170692e706e67

freecurrencyapi-php - PHP Free Currency Converter API

Latest Version on Packagist Total Downloads

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.