4

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?

Community
  • 1
  • 1
MegaHit
  • 2,614
  • 4
  • 24
  • 27

1 Answers1

9

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

Nasdaq = ^IXIC

S&P = ^GSPC

Dow = ^DJI

Zorayr
  • 23,770
  • 8
  • 136
  • 129
Dave Kasper
  • 1,369
  • 1
  • 11
  • 18
  • Thanks. I didn't realize that the `^` was part of the symbol. Is that to denote that it's an index? – MegaHit Feb 29 '12 at 21:21
  • 1
    Seems that it is not available actually: http://stackoverflow.com/questions/3679870/yahoo-finance-csv-file-will-not-return-dow-jones-dji – Dave Kasper Feb 29 '12 at 21:39
  • would you know how I could look up the dow in [Google's API](http://www.google.com/ig/api?stock=goog)? – MegaHit Mar 01 '12 at 21:26
  • @MegaHit Dow works as well - http://finance.yahoo.com/webservice/v1/symbols/%5EDJI/quotes – Zorayr Sep 01 '15 at 04:54