0

I am using Android Studio in order to build a sample of a mobile banking app. In this mobile application, I need to transfer amounts of money from one account to the other. At some point, if the accounts have different currencies, I need to convert the amount to be transferred to the amount that corresponds with the currency needed. For example, if I am transferring 200$ from one account to another in euros, I need to multiply that amount with the rate of the receiving account just like this: 200*1.13=226€. For now, I have been using default values for the rates. The tricky part is that currency rates are constantly changing so I need to keep it up to date. I suppose that I should retrieve the information I need from another source like a website, but I have no idea how to do so. Any help would be welcome. Thanks in advance.

2 Answers2

0

You can use the European Central Bank free API to get a daily update. You can find it here in xml format

miltos
  • 1,009
  • 1
  • 6
  • 10
-1

You can use currency convertor api's. For eg:

http://jsonrates.com/docs/

Get your API key, and pass in this url along with the currencies

Request: http://jsonrates.com/get/?from=USD&to=EUR&apiKey=YOUR_API_KEY

Response:

 {
  "utctime": "2014-06-26T15:00:03+02:00",
  "from": "USD",
  "to": "EUR",
  "rate": "0.73514500"
}
Shishir Shetty
  • 2,021
  • 3
  • 20
  • 35
  • or else refer to this link: http://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance – Shishir Shetty May 12 '15 at 15:05