Giter VIP home page Giter VIP logo

currencylayer-php-client's Introduction

Stay up to date by following @apilayernet on Twitter.


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.

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

Website: currencylayer.com

Installation

With Composer RECOMMENDED

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/

require_once '/your/libs/currencylayer/php-client/src/currencylayer/client.php';
$currencylayer = new \currencylayer\client('YOUR_ACCESS_KEY');

Usage

Example: Request real-time rates via "live" endpoint
$result = $currencylayer
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->live();
Example: Request historical rates via "historical" endpoint
$result = $currencylayer
  ->date('2015-01-01')
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->historical();
Example: Convert currencies via "convert" endpoint
$result = currencylayer
  ->from('USD')
  ->to('JPY')
  ->amount('10')
  ->date('2015-01-01')
  ->convert();
Example: Request time-frame (time-series) data via "timeframe" endpoint
$result = $currencylayer
  ->source('USD')
  ->currencies('JPY,GBP,AUD')
  ->start_date('2014-01-01')
  ->end_date('2014-02-01')
  ->timeframe();
Example: Request currency-change data via "change" endpoint
$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

currencylayer-php-client's People

Contributors

andreybolonin avatar jamsouf avatar oceanapplications avatar timesplinter avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.