1

Is there way to get S&P 500 current price by using Yahoo API?

I've read through this page, but could not find out how to do it. http://www.gummy-stuff.org/Yahoo-data.htm

I also tried to use YQL to get data, but it seems like YQL doesn't provide finance API currently.

ironsand
  • 14,329
  • 17
  • 83
  • 176

1 Answers1

2

I use their CSV interface.
http://code.google.com/p/yahoo-finance-managed/wiki/csvQuotesDownload
The symbol is ^GSPC Using wget as a demo:

wget -O - 'http://download.finance.yahoo.com/d/quotes.csv?s=^gspc&f=sl1p2'
steven smith
  • 1,519
  • 15
  • 31
  • wait,wait,... you're downgrading this because Yahoo removed their documentation? The code still works which is rather surprising given the market changes Yahoo has gone through recently. Did you try it? If you load the link into a browser it will ask where to save the .csv file and you should be able to deduce how the form works. – steven smith Oct 10 '16 at 16:55