最佳/最全面的股票/金融数据 API

访问金融市场统计数据和股票报价(最好是实时报价)最推荐的免费/公开 API 是什么?对于如何公开它(SOAP、 REST、一些专有的 XML 设置等等) ,我不太挑剔,只要它有一些像样的文档。

我计划用 PHP 构建一个简单的 web 指示板,其中包含一些基本数据(基本上是一个快速的 n-Dirty 主页) ,但最终可能想将其发展成一个成熟的 web 应用程序。有什么想法吗?

当我找到一些,我会在这里发布一个列表(如果你以前使用过其中任何一个,请随意评论) :

自由

不是免费的

106594 次浏览

Yahoo's api provides a CSV dump:

Example: http://finance.yahoo.com/d/quotes.csv?s=msft&f=price

I'm not sure if it is documented or not, but this code sample should showcase all of the features (namely the stat types [parameter f in the query string]. I'm sure you can find documentation (official or not) if you search for it.

http://www.goldb.org/ystockquote.html

Edit

I found some unofficial documentation:

http://ilmusaham.wordpress.com/tag/stock-yahoo-data/

Last I looked -- a couple of years ago -- there wasn't an easy option and the "solution" (which I did not agree with) was screen-scraping a number of websites. It may be easier now but I would still be surprised to see something, well, useful.

The problem here is that the data is immensely valuable (and very expensive), so while defining a method of retrieving it would be easy, getting the trading venues to part with their data would be next to impossible. Some of the MTFs (currently) provide their data for free but I'm not sure how you would get it without paying someone else, like Reuters, for it.

Some of the brokerage firms like TDAmeritrade have APIs you can use to get streaming data from their servers:

http://www.tdameritrade.com/tradingtools/partnertools/api_dev.html

I found the links and tips under this question to be helpful.

I usually find that ProgrammableWeb is a good place to go when looking for APIs.

Markit On Demand provides a set of free financial APIs for playing around with. Looks like there is a stock quote API, a stock ticker/company search and a charting API available. Look at http://dev.markitondemand.com