2017 © Pedro Peláez
 

library open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

image

aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  • Monday, April 9, 2018
  • by aveiv
  • Repository
  • 1 Watchers
  • 3 Stars
  • 12,389 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 20 % Grown

The README.md

PHP wrapper for Open Exchange Rates API

Latest Stable Version Total Downloads License, (*1)

Installation

composer require aveiv/open-exchange-rates-api

Usage example

$api = new OpenExchangeRates('YOUR_APP_ID');
// or $client = new OpenExchangeRates('YOUR_APP_ID', new YourHttpClient());


// Getting currencies

$api->currencies(); // returns ["USD" => "United States Dollar", ...]

$api->currencies([
    'show_alternative' => true, // include alternative currencies
    'show_inactive' => true,    // include historical/inactive currencies
]);


// Getting latest rates

$api->latest(); // returns ["USD" => 1.0, ...]

$api->latest([
    'base' => 'EUR',             // base currency
    'symbols' => ['CNY', 'USD'], // limit results to specific currencies
    'show_alternative' => true,  // include alternative currencies
]);


// Getting historical rates

$api->historical(new \DateTime('2020-01-01')); // ["USD" => 1.0, ...]

$api->historical(new \DateTime('2020-01-01'), [
    'base' => 'EUR',             // base currency
    'symbols' => ['CNY', 'USD'], // limit results to specific currencies
    'show_alternative' => true,  // include alternative currencies
]);


// Currency conversion

$api->convert(99.99, 'USD', 'EUR'); // returns the converted value (from USD to EUR)

The Versions

09/04 2018

dev-master

9999999-dev https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency

09/04 2018

v1.2.0

1.2.0.0 https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency

23/10 2016

v1.1.2

1.1.2.0 https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency

15/10 2016

v1.1.1

1.1.1.0 https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency

23/12 2015

v1.1.0

1.1.0.0 https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency

20/08 2014

v1.0.0

1.0.0.0 https://github.com/aveiv/open-exchange-rates-api

PHP wrapper for Open Exchange Rates API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexandr Veliko-Ivanenko

api currency