2017 © Pedro Peláez
 

library currencylayer-php-client

Currencylayer API PHP client

image

oceanapplications/currencylayer-php-client

Currencylayer API PHP client

  • Tuesday, November 14, 2017
  • by oceanapplications
  • Repository
  • 2 Watchers
  • 4 Stars
  • 10,459 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 9 Versions
  • 15 % Grown

The README.md

Stay up to date by following @apilayernet on Twitter., (*1)


currencylayer API - PHP client

Currencylayer provides a JSON-based REST API, delivering reliable and accurate currency exchange rates for 168 world currencies and precious metals at an affordable price, which makes it the perfect instrument for startups and online businesses, as well as for larger companies in need of reliable financial data via an easy to use interface. The currencylayer API is widely used to power financial departments, mobile applications and back-office systems around the world., (*2)

Features
  • Real-time Exchange Rates
  • Historical Rates back to 1999
  • Currency Conversion
  • Time-Frame Queries
  • Currency-Change Queries

Website: currencylayer.com, (*3)

Installation

composer require oceanapplications/currencylayer-php-client
Use OceanApplications\currencylayer;

$currencylayer = new currencylayer\client('API Key');

without composer

Download and extract the latest release to /your/libs/currencylayer/ ``` php require_once '/your/libs/currencylayer/php-client/src/currencylayer/client.php'; $currencylayer = new \currencylayer\client('YOUR_ACCESS_KEY');, (*4)



Usage ----- ##### Example: Request real-time rates via "live" endpoint ``` php $result = $currencylayer ->source('USD') ->currencies('JPY,GBP,AUD') ->live();
Example: Request historical rates via "historical" endpoint

``` php $result = $currencylayer ->date('2015-01-01') ->source('USD') ->currencies('JPY,GBP,AUD') ->historical();, (*5)



##### Example: Convert currencies via "convert" endpoint ``` php $result = currencylayer ->from('USD') ->to('JPY') ->amount('10') ->date('2015-01-01') ->convert();
Example: Request time-frame (time-series) data via "timeframe" endpoint

``` php $result = $currencylayer ->source('USD') ->currencies('JPY,GBP,AUD') ->start_date('2014-01-01') ->end_date('2014-02-01') ->timeframe();, (*6)



##### Example: Request currency-change data via "change" endpoint ``` php $result = $currencylayer ->source('USD') ->currencies('JPY,GBP,AUD') ->start_date('2014-01-01') ->end_date('2014-02-01') ->change();

API Documentation

See: currencylayer.com/documentation, (*7)

TREEWARE

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree., (*8)

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats., (*9)

You can buy trees here offset.earth/treeware, (*10)

Read more about Treeware at treeware.earth, (*11)

The Versions

14/11 2017

dev-master

9999999-dev

Currencylayer API PHP client

  Sources   Download

MIT

by Ocean Applications

currencylayer

18/02 2017

1.4.3

1.4.3.0

Currencylayer API PHP client

  Sources   Download

MIT

by Ocean Applications

currencylayer

01/02 2017

1.4.2

1.4.2.0

Currencylayer API PHP client

  Sources   Download

MIT

by Ocean Applications

currencylayer

06/12 2016

1.4.1

1.4.1.0

Currencylayer API PHP client

  Sources   Download

MIT

by Ocean Applications

currencylayer

24/07 2016

1.4

1.4.0.0

Currencylayer API PHP client

  Sources   Download

MIT

by Ocean Applications

currencylayer

15/05 2015

v1.3.1

1.3.1.0 http://jsonrates.com/

Client for the currency exchange rates API from jsonrates.com

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

currency exchange rates jsonrates

09/03 2015

v1.2.1

1.2.1.0 http://jsonrates.com/

Client for the currency exchange rates API from jsonrates.com

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

currency exchange rates jsonrates

04/03 2015

v1.1.1

1.1.1.0 http://jsonrates.com/

Client for the currency exchange rates API from jsonrates.com

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

currency exchange rates jsonrates

13/12 2014

v1.0.0

1.0.0.0 http://jsonrates.com/

Client for the currency exchange rates API from jsonrates.com

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

currency exchange rates jsonrates