PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 138 All time: 9,240 This week: 524Up
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: 151323 in Australia Australia
Week rank: 195 Up3 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 (5)  
File Role Description
Files folder imagefx (4 files)
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (5)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:138
This week:0
All time:9,240
This week:524Up