15

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.

Digikata
  • 1,736
  • 18
  • 25
Otar
  • 2,489
  • 1
  • 19
  • 24
  • So what exactly are your requirements? What do you mean by "full data"? – The Alchemist Sep 08 '10 at 13:34
  • Volume, change and percent (percent can be calculated if last change data is available) like Dow Johnes or NASDAQ here: http://www.google.com/finance – Otar Sep 08 '10 at 13:37

7 Answers7

6

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

Paul
  • 353
  • 1
  • 6
  • Thanks, seems I cant avoid Yahoo! Finance feeds... – Otar Sep 11 '10 at 08:05
  • The link to gummy-stuff.org now only contains a letter from Yahoo, arguing that the page provides tools for "hacking" Yahoo finance, and has to be removed. Which it has, unfortunately. – Per Quested Aronsson Aug 21 '16 at 19:07
4

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/.

josephdpurcell
  • 842
  • 3
  • 14
  • 30
2

Nordnet External API looks good:

  • Nice documentation although more sample/boilerplate code would be good.
  • Support forum with some activity.
  • Development environment where you can play around.

Before you can use your application for actual trades there is a certification process to ensure that your code works. The API is for building trading bots and not for downloading price histories though.

Johan Larsson
  • 15,603
  • 9
  • 65
  • 81
0

Could it be that you're using the wrong symbols for the averages? For example, the symbol for the Dow Jones Industrial Average is .DJI - something that caused me a bit of confusion when I was searching for it. The symbol for the S&P 500 is .INX, which is even more counterintuitive.

quanticle
  • 4,247
  • 5
  • 26
  • 38
0

Take a look at the Interactive Brokers API. Among many other features, it has delayed and real time quotes available via the API.

http://www.interactivebrokers.com/en/p.php?f=programInterface

Brian
  • 19,258
  • 6
  • 32
  • 51
0

Take a look at http://www.mergent.com/servius (no stock quotes, but lots of other financial information like dividends, corporate actions and financial statements)

Eugene Osovetsky
  • 6,212
  • 2
  • 36
  • 58
-2

@Brian: The delayed quotes are NOT available through the IB API at the time of writing. Only the real time quotes - and those are not free.

See http://ibkb.interactivebrokers.com/taxonomy/term/147

George
  • 126
  • 1
  • 4