How to lookup an index in Yahoo's stock API

那年仲夏 提交于 2019-12-06 04:51:47

问题


I'm using Yahoo's stock API to get stock quotes, as described here.

Basically, I just assemble a link like this:

http://finance.yahoo.com/d/quotes.csv?s=DOW+MSFT+AAPL+GOOG&f=snl1

which'll give me a list of the current price for those stocks (DOW, MSFT, AAPL, GOOG).


All's nice and dandy, but I'd also like to get the info for the NASDAQ and S&P 500 Indices, but I have no idea what to use as the symbol for those.

I tried all of these:

NASDAQ

INDEXNASDAQ

INDEXNASDAQ:.IXIC

INDEXNASDAQ.IXIC

IXIC

to no avail.

It seems like I have the whole idea flawed (I don't really know much about finance).

Can anyone help me with this?


回答1:


Use the same symbols you see on the corresponding Yahoo finance page.

Nasdaq = ^IXIC

S&P = ^GSPC

Dow = ^DJI



来源:https://stackoverflow.com/questions/9506642/how-to-lookup-an-index-in-yahoos-stock-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!