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 This week: 1All time: 9,231 This week: 560Up
Version License PHP version Categories
live-forex-rate-rest 1.0.0GNU General Publi...5PHP 5, Web services, Finances
Description 

Author

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: 151522 in Australia Australia
Week rank: 416 Up4 in Australia Australia Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
require_once 'RestApi.php';
if(isset(
$_REQUEST["request"]))
{
$api = new RestApi($_REQUEST["request"]);
echo
$api->executeApi();
}
else
{
header("Location: http://www.sauryatech.com");
}


Details

Live-Forex-Rate-REST-Api

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)

Example:

/fx/api/currency/rates/AUDUSD

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 README.md 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  
 100%
Total:138
This week:1
All time:9,231
This week:560Up