Yahoo! Finance feeds are pain in the ass.
Google Finance API seems OK but don't know why I can't retrieve stock quotes information for Dow Johnes, NASDAQ, S&P...
Works perfect with company quotes like YHOO, MSFT but don't gets full data for stock indexes.
There is an article at YQL blog on how to get this data from Open tables with YQL, but that table is missing in the list.
Can anybody recommend any good API, web service or a feed?
Best answer + vote up guaranteed.
Why is Google Finance API not on the list? Google Finance API also discontinued. But don't worry, we have good solutions for you.
Announcement: Yahoo Finance API discontinued (Update 2017-11-04: Version 217)
The Yahoo Finance API is a range of libraries/APIs/methods to obtain historical and real time data for a variety of financial markets and products, as shown on Yahoo Finance- https://finance.yahoo.com/.
Yahoo provides a free API via http. You can get real-time informations & historical data in csv format.
For example to get the S&P historical data (^GSPC):
http://ichart.finance.yahoo.com/table.csv?s=^GSPC&ignore=.csv
or Dow Jones (^DJI):
http://ichart.finance.yahoo.com/table.csv?s=^DJI&ignore=.csv
URL syntax explained at:
http://www.gummy-stuff.org/Yahoo-data.htm
You can also use YahooAPIs and send a YQL query that returns an XML document, such as:
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22GLD,SLV%22%29&env=store://datatables.org/alltableswithkeys
To make things easier, I wrote a simple YahooFinanceAPI script on GitHub. Example usage:
$y = new YahooFinanceAPI;
$y->api(array('SLV','GLD'));
For more complete information you can view an article I wrote at http://thesimplesynthesis.com/article/finance-apis/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With