Reputation: 367
I used to get exhange rate from yahoo finance api by javascript with following url: http://finance.yahoo.com/webservice/v1/symbols/jpy=x,eur=x/quote?format=json
but now it no longer work! I have search on the net but no luck. Any help would be great, Thank!
Update: it is working if open with chrome mobile
Upvotes: 5
Views: 1615
Reputation: 27
indrakula is right, and their response helped me, but...
I also needed to retrieve exchange rate tickers (i.e. USDGBP=X). This was not trivial, and I had to do some searching. The URL format in this case is http://www.google.com/finance/info?q=CURRENCY%3aUSDGBP. This URL returns a JSON body and not something else as the alternative URLs mentioned in one of the comments for that reply. Also note the link with the parameter descriptions seems to be out-of-date, but I found most of them are self-explanatory. So don't rely on that link.
Note: I wanted to post this as a comment to indrakula's answer, but one needs 50 reputation to comment! I'm new! I tried to submit this as an edit to their answer but it was (rightly) refused.
Upvotes: 2
Reputation: 133
use google http://www.google.com/finance/info?q=GOOGL
paramater description here http://www.networkerror.org/component/content/44.html?task=view
Upvotes: 0
Reputation: 947
Yes, it seems like Yahoo! has discontinued the (private, mostly-undocumented) Yahoo Finance API that many have been using for their currency data. All responses seem to be returning "Not a valid parameter"
. I suppose there's a chance they may switch it back on, but they don't officially support that API anywhere as far as I can tell.
I created Open Exchange Rates about five years ago, and our exchange rate API now supports a community of tens of thousands of developers - and their tens of millions of users - with accurate, up-to-date information.
Please feel welcome to check out our Forever Free service at https://openexchangerates.org.
Our API is in a simple, original JSON format, which has actually caught on as a standard method for displaying rates because it's so simple to work with (unlike the Yahoo API, which required you to parse the obscure nested objects to pull out the basic info you needed...)
If you need assistance porting from the deprecated Yahoo! API, we'll be happy to assist via email.
(I am the founder of Open Exchange Rates.)
Upvotes: 2