1

I've been using the Yahoo Currency Converter all along without issues.

Here is the function code in Java:

 public static Float convert(String currencyFrom, String currencyTo) throws IOException {
    HttpClient httpclient = new DefaultHttpClient();
    HttpGet httpGet = new HttpGet("http://quote.yahoo.com/d/quotes.csv?s=" + currencyFrom + currencyTo + "=X&f=l1&e=.csv");
    ResponseHandler<String> responseHandler = new BasicResponseHandler();
    String responseBody = httpclient.execute(httpGet, responseHandler);
    httpclient.getConnectionManager().shutdown();
    return Float.parseFloat(responseBody);

 }

However, just yesterday I realised it was throwing the following error:

It has come to our attention 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.

Is there some problems with the code I'm using? Or has the service been discontinued permanently. Any alternative suggestion for real time currency conversion?

2
  • 1
    I'm facing the same issue. It seems that yahoo has shut down the service.
    – db80
    Nov 3, 2017 at 9:16
  • Fixer.io and Openexchangerates.org seem to be the best alternatives as of today.
    – Mahn
    Jun 19, 2018 at 17:24

2 Answers 2

2

I can confirm that the service has been discontinued overnight.

https://forums.yahoo.net/t5/Yahoo-Finance-help/http-download-finance-yahoo-com-d-quotes-csv-s-GOOG-amp-f/m-p/387662/highlight/true#M6207

This is the answer from the admin of the community site.

1
  • Thanks for the confirmation.
    – Mag
    Nov 7, 2017 at 7:38
1

Although discontinued, you could look at an alternative such as http://fixer.io, which would allow you to do something similar via JSON

https://api.fixer.io/latest?base=currencyFrom&symbols=currencyTo

5
  • unfortunately fixer.io covers only 30 currencies, yahoo had 160 currencies.
    – db80
    Nov 3, 2017 at 12:29
  • Ahhh, good to know.
    – elfling
    Nov 3, 2017 at 14:36
  • They offer 170 currencies now, and it was very quick to setup. I would recommend them.
    – Mahn
    Jun 19, 2018 at 17:22
  • fixer does not respond, gets timedout
    – Derrick
    May 15, 2023 at 19:39
  • Fixer updated their API data.fixer.io/api/…
    – elfling
    May 15, 2023 at 21:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.