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.
-
@Hartok: Before you claim something is duplicated make sure you exactly know it is duplicated. That question is not about android. – PeakGen Feb 28 '13 at 06:01
-
The linked post is not platform-specific. It works on Android. – Hartok Feb 28 '13 at 13:54
-
@Hartok: If I know that, I will not ask another question – PeakGen Feb 28 '13 at 14:08
-
Use this link http://jsonrates.com/docs/ – Gajendra K Chauhan Mar 11 '15 at 06:14
3 Answers
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.
- 982
- 14
- 28
- 945
- 8
- 22
-
NB: Open Exchange Rates API is free for up to 1000 hits per month, not $17 as stated. – William Joss Crowcroft Jan 30 '14 at 12:09
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/
- 7,790
- 11
- 46
- 79
- 6,374
- 8
- 36
- 71
-
Thanks for the reply. So I have to send the data {"to": "EUR", "rate": 0.76911244400000001, "from": "USD"} into http://rate-exchange.appspot.com/currency?from=USD&to=EUR ? – PeakGen Feb 28 '13 at 06:10
-
-
-
If you are interested to learn JSON, I can give you link and you can easily learn this. – The Holy Coder Feb 28 '13 at 06:24
Hi You may be asking about currency exchage rates, right? Try Google finance API:
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");
- 982
- 14
- 28
- 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