Blog Details

Image

Currency Exchange Rate Using Google And Yahoo API

1) Google exchange rate query (parsed)

Request: http://rate-exchange.appspot.com/currency?from=USD&to=EUR

Response:

{"to": "EUR", "rate": 0.76911244400000001, "from": "USD"}

Here's another JSON(P) API based on the Google API :
http://rate-exchange.appspot.com/currency?from=USD&to=EUR&q=1

 

2) Yahoo finance API

Request: http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=USDINR=X

This CSV is being used by a jQuery plugin called Curry. Might be useful if you need more than just a CSV.

Yahoo Query Language lets you get a whole bunch of currencies at once in XML or JSON. The data updates by the second (whereas the European Central Bank has day old data), and stops in the weekend. Doesn't require any kind of sign up.

 

http://developer.yahoo.com/yql/console/?q=show%20tables&env=store://datatables.org/alltableswithkeys
#h=select%20*%20from%20yahoo.finance.xchange
%20where%20pair%20in%20%28%22USDMXN%22%2C%20%22USDCHF%22%29

3) Open Source Exchange Rates API

Free for personal use (1000 hits per month)
Requires registration.
Request: http://openexchangerates.org/latest.json
Response:

{
  "disclaimer": "This data is collected from various providers ...",
  "license": "all code open-source under GPL v3 ...",
  "timestamp": 1323115901,
  "base": "USD",
  "rates": {
      "AED": 3.66999725,
      "ALL": 102.09382091,
      "ANG": 1.78992886,
      // 115 more currency rates here ...
  }
}

4) European Central Bank Feed

Docs: http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html#dev
Request: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml
Response: In response it will return a xml file with 28 currencies.