I've being using this feed for a long time, I believe Apple does it as well in one of the mac widgets. but what is really curious is that I simply can't find any documentation for it, I've tried google and everything.
http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote
I can see people using different parameters like view=basic
date=Ymd;
currency=true
but it's horrible there isn't anything official.
For now I am using these parameters:
format=json
and callback=list
sometimes...
But it is still a mystery for me. Does anyone know the real truth about it because it seems Yahoo is trying to hide it somewhere else :)
This could help: http://finance.yahoo.com/d/quotes.csv?e=.csv&f=c4l1&s=EURUSD=X,GBPUSD=X It will return csv file:
"EUR",1.2972
"GBP",1.6034
Or if you need json: Yahoo csv parser
I'm developing an application that needs currency conversion, and been using Open Exchange Rates because I wouldn't be paying since the app is in testing. But as of September 2012 Open Exchange Rates is gonna be paid for non-personal, so I checked out that they were using the Yahoo Finance Webservice (the one that "doesn't exist") and looking for documentation on it got here, and opted to use YQL.
Using YQL with the Yahoo Finance table (yahoo.finance.quotes) linked by NT3RP, currencies appear with symbol="ISOCODE=X", for example: "ARS=X" for Argentine Peso, "AUD=X" for Australian Dollar. "USD=X" doesn't exist, but it would be 1, since the rest are rates against USD.
The "price" value on the OP API is in the field "LastTradePriceOnly" of the table. For my application I used the "Ask" field.
I have used this URL to obtain multiple currency market quotes.
http://finance.yahoo.com/d/quotes.csv?e=.csv&f=c4l1&s=USD=X,CAD=X,EUR=X
"USD",1.0000
"CAD",1.2458
"EUR",0.8396
They can be parsed in PHP like this:
$symbols = ['USD=X', 'CAD=X', 'EUR=X'];
$url = "http://finance.yahoo.com/d/quotes.csv?e=.csv&f=c4l1&s=".join($symbols, ',');
$quote = array_map( 'str_getcsv', file($url) );
foreach ($quote as $key => $symb) {
$symbol = $quote[$key][0];
$value = $quote[$key][1];
}
As NT3RP told us that:
... we (Yahoo!) don't have a Finance API. It appears some have reverse engineered an API that they use to pull Finance data, but they are breaking our Terms of Service...
So I just thought of sharing this site with you:
http://josscrowcroft.github.com/open-exchange-rates/
[update: site has moved to - http://openexchangerates.org]
This site says:
No access fees, no rate limits, no ugly XML - just free, hourly updated exchange rates in JSON format
[update: Free for personal use, a bargain for your business.]
I hope I've helped and this is of some use to you (and others too). : )
| ATTENTION !!! |
Get from Yahoo a JSON or XML that you can parse from a REST query.
You can exchange from any to any currency and even get the date and time of the query using the YQL (Yahoo Query Language).
https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D%22http%3A%2F%2Ffinance.yahoo.com%2Fd%2Fquotes.csv%3Fe%3D.csv%26f%3Dnl1d1t1%26s%3Dusdeur%3DX%22%3B&format=json&callback=
This will bring an example like below:
{
"query": {
"count": 1,
"created": "2016-02-12T07:07:30Z",
"lang": "en-US",
"results": {
"row": {
"col0": "USD/EUR",
"col1": "0.8835",
"col2": "2/12/2016",
"col3": "7:07am"
}
}
}
}
You can try the console
I think this does not break any Term of Service as it is a 100% yahoo solution.
Source: Stackoverflow.com