2

I need to create an android app where it gets the live updated currency exchange rates. Is there any android (free) API for this purpose? I did a search and nothing found related to android. Please help.

PeakGen
  • 20,394
  • 79
  • 230
  • 422

3 Answers3

5

For posterity here they are along with other possible answers:

Google exchange rate query (parsed)

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

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

Based on this comment.

Open Exchange Rates API

Free for up to 1000 hits per month. 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 ...
 }
}

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.

Yahoo finance API

(UPDATE - November 2017) Discontinued as of 2017-11-06 with message:

It has come to our attenion that this service is being used in violation of the Yahoo Terms of Service. As such, the service is being discontinued. For all future markets and equities data research, please refer to finance.yahoo.com.

Request: http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=USDINR=X In response it will return a csv file.

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

zeroDivider
  • 982
  • 14
  • 28
2

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 is another JSON(P) API

http://rate-exchange.appspot.com/currency?from=USD&to=EUR&q=1 based on the Google API.

If you want to work with RSS Feed then use

http://themoneyconverter.com/RSSFeeds.aspx

Try these link to learn JSON easily :

http://www.androidhive.info/2012/01/android-json-parsing-tutorial/

Horrorgoogle
  • 7,790
  • 11
  • 46
  • 79
The Holy Coder
  • 6,374
  • 8
  • 36
  • 71
1

Hi You may be asking about currency exchage rates, right? Try Google finance API:

Google Finance


Try Yahoo finance

[UPDATE] Yahoo finance API is discontinued from 2017-11-06

In the url

http://finance.yahoo.com/d/quotes.csv?e=goog.csv&f=sl1d1t1&s=INRUSD=x

INR -- is Indian rupee - from USD -- US Dollar - To

Give any country rupees Name in place.

Example :

countrieshash.put("India", "INR");
        countrieshash.put("USA", "USD");
        countrieshash.put("GreatBritain", "GBP");
        countrieshash.put("Japan", "JPY");
        countrieshash.put("Australia", "AUD");
        countrieshash.put("Europe", "EUR");
        countrieshash.put("Canada", "CAD");
        countrieshash.put("France", "CHF");
        countrieshash.put("China", "CNY");
        countrieshash.put("kuwait", "KWD");
        countrieshash.put("UAE", "AED");

Yahoo finance

zeroDivider
  • 982
  • 14
  • 28
Pragnani
  • 20,035
  • 6
  • 47
  • 74
  • Excited because ...This is the first app I did in android if you want you can feel free to use this code http://pastebin.com/wmT3k2S9 – Pragnani Feb 28 '13 at 06:06
  • Thanks for the reply. What is "countrieshash" ?Do you call that link via another API or just call that web addresS? – PeakGen Feb 28 '13 at 06:09
  • @Yohan check the paste bin code... I have given a full name in the spinner but we need to send country related currency name(i.e USD) in the url so Have mapped the country names with country currency code – Pragnani Feb 28 '13 at 06:26