This tool is show currency exchange rate using yahoo finance data.
Yahoo Finance : http://finance.yahoo.com
Choose your currency
Details are shown below.
http://api.key-ative.com/finance/exchangerate/v1/{CURRENCY_CODE}
{CURRENCY_CODE} - "ISO 4217 Currency Codes" is the International Standard for currency codes.
{
"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.
$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
}
Here's a jQuery example.
$.get("http://api.key-ative.com/finance/exchangerate/v1/USD", function(response) {
console.log(response);
}, "json");
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);
}