everapi/currencyapi-php

A PHP wrapper for the currencyapi.com API

Maintainers

Package info

github.com/everapihq/currencyapi-php

pkg:composer/everapi/currencyapi-php

Statistics

Installs: 167 448

Dependents: 1

Suggesters: 0

Stars: 8

Open Issues: 0

v1.0.0 2022-05-06 09:56 UTC

This package is auto-updated.

Last update: 2026-02-27 19:54:49 UTC


README

currencyapi-php - PHP Currency Converter

Latest Version on Packagist Total Downloads

This package is a PHP wrapper for currencyapi.com 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/currencyapi-php

Usage

Initialize the API with your API Key (get one for free at currencyapi.com):

$currencyApi = new \CurrencyApi\CurrencyApi\CurrencyApiClient('YOUR-API-KEY');

Afterwards you can use the endpoints of the API like this:

echo $currencyApi->latest([
    'base_currency' => 'EUR',
    'currencies' => 'USD',
]);

Endpoints accessible with a free account:

  • status
  • currencies
  • latest
  • historical

These advanced endpoints currently require a paid subscription:

  • convert
  • range

Learn more about endpoints, parameters and response data structure in the docs.

License

The MIT License (MIT). Please see License File for more information.