Grab euro dollar conversion rate in Java

2.7k Views Asked by At

I have an application that has to convert dollar to euro and vice versa. Is there an interface or API I can use to grab the current exchange rate?

4

There are 4 best solutions below

0
On BEST ANSWER

You can use Google Calculator, take a look at this example on how to use it ...

0
On

If you are not a fan of Google you can use Yahoo Converter as well.

They have the code there as well.

1
On

This site seems to offer the functionality you are looking for. But unfortunately it isn't free. This site offers a REST-style api, including historical conversion rates for non-profit use. To use it for your purpose, all you have to do is send a request to the following URL in the described format:

http://currencies.apps.grandtrunk.net/getlatest/EUR/USD

The list of supported currency codes include dollar and euro, among these others:

ATS, AUD, BEF, BGN, BRL, CAD, CHF, CNY, CYP, CZK, DEM, DKK, EEK, ESP, EUR, FIM, FRF, GBP, GRD, HKD, HRK, HUF, IDR, IEP, ILS, INR, ITL, JPY, KRW, LKR, LTL, LUF, LVL, MCF, MTL, MXN, MYR, NLG, NOK, NZD, PHP, PLN, PTE, RON, RUB, SEK, SGD, SIT, SKK, SML, THB, TRY, TWD, USD, VAL, VEB, VEF, ZAR

0
On

No Body sells data for free.If you want to have such functionality in your application and the information your going to fetch will be in customised way then you need pay some money

http://www.exchangerate-api.com/java-currency-api

or

http://www.oanda.com/rates/currency-data/