PHP Classes

PHP Live Forex Rate API: REST API to return exchange rates from other APIs

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 138 All time: 9,237 This week: 524Up
Version License PHP version Categories
live-forex-rate-rest 1.0.0GNU General Publi...5PHP 5, Web services, Finances


This class provides REST API to return exchange rates from other APIs.

It responds to REST API requests to get information of Foreign Exchange rates by calling other APIs that provide the requested information.

Currently it returns the current foreign exchange buy and sell rates between two currencies retrieving the values from the Yahoo Finance API.

Picture of Ssaurz Acharya
Name: Ssaurz Acharya <contact>
Classes: 3 packages by
Country: Australia Australia
Age: ???
All time rank: 151323 in Australia Australia
Week rank: 234 Up4 in Australia Australia Up
Innovation award
Innovation award
Nominee: 1x


require_once 'RestApi.php';
$api = new RestApi($_REQUEST["request"]);



This is the live foreign exchange rate RESTful API done by me. The response is returned in JSON format.

Method: GET

/fx/api/currency/rates/currency_pair (For single pair)

/fx/api/currency/rates/currency_pair1, currency_pair2 (For multiple pairs)



Single Pair

/fx/api/currency/rates/AUDUSD, EURUSD

Multiple Pair

  Files folder image Files  
File Role Description
Files folder imagefx (4 files)
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  fx  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file Api.php Class Class source
  Accessible without login Plain text file index.php Example Example script
  Plain text file RestApi.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,237
This week:524Up