Currency Exchange Rate


This tool is show currency exchange rate using yahoo finance data.
Yahoo Finance : http://finance.yahoo.com

Currency Exchange Rate

Choose your currency


Exchange Rates :

WEBSERVICE

Details are shown below.

URL


http://api.key-ative.com/finance/exchangerate/v1/{CURRENCY_CODE}
        		

{CURRENCY_CODE} - "ISO 4217 Currency Codes" is the International Standard for currency codes.



RESPONSE


 {
 	"result":
 	[
 		{
 		"id":"USD=X",
 		"Name":"USD/USD",
 		"Rate":"1.0000",
 		"Date":"5/5/2015",
 		"Time":"9:23am",
 		"Ask":"1.0000",
 		"Bid":"1.0000"
 		},
 		.
 		.
 		.
 	],
 	"error":false,
 }
        		

When called from the command line or a script I will return a JSON response with all of exchange rates details that you see above.

Try the JSON API from the command line


$curl "api.key-ative.com/finance/exchangerate/v1/USD"
{
 	"result":
 	[
 		{
 		"id":"USD=X",
 		"Name":"USD/USD",
 		"Rate":"1.0000",
 		"Date":"5/5/2015",
 		"Time":"9:23am",
 		"Ask":"1.0000",
 		"Bid":"1.0000"
 		},
 		.
 		.
 		.
 	],
 	"error":false,
 	"status":200
 }
        		

jQuery

Here's a jQuery example.


$.get("http://api.key-ative.com/finance/exchangerate/v1/USD", function(response) {
    console.log(response);
}, "json");
        		

PHP Code

Here's a PHP code example.


$url  = "http://api.key-ative.com/finance/exchangerate/v1/USD";
$json = file_get_contents($url);
if($json){
  $data = json_decode($json);
  var_dump($data);
}