Looking for a free S&P 500 data feed

2.6k Views Asked by At

I am looking for a free S&P 500 data feed, preferably one with a REST API. It appears that Yahoo Finance & Google Finance have discontinued their feeds. For example, http://download.finance.yahoo.com/d/quotes.csv?s=GOOG+AAPL&f=snl1 returns, "It has come to our attention that this service is being used in violation of the Yahoo Terms of Service..." Does anyone know of a free S&P 500 data feed? Delayed quotes are fine.

4

There are 4 best solutions below

1
Wietse de Wit On

If you use Python combined with Beautifulsoup you can easily get data from multiple sites. Example:

from bs4 import BeautifulSoup
import urllib2

url = "https://finance.yahoo.com/quote/A?p=A"
content = urllib2.urlopen(url).read()
soup = BeautifulSoup(content)
soup = soup.find_all('script')
soupstr = str(soup)
print soupstr[soupstr.find("regularMarketPrice")+27:soupstr.find("regularMarketPrice")+35]

The only problem is you will actually use 0,4 MB per quote which I think is a lot of unnecessary use of bandwith and capacity.

Or maybe you can use Quandl.

Good Luck!

0
John DiFini On

So far, I have come across Alpha Vantange and Tradier. At a cursory glance, Alpha Vantage appears to offer semi-realtime quotes by providing high & low quotes over an interval (1 min is the smallest interval).

Tradier appears to offer free delayed quotes for a "sandbox" environment.

1
Magno C On

Try this (took from yFinance source code ):

https://query2.finance.yahoo.com/v8/finance/chart/%5EGSPC

I'm not sure if the current price is comming in this response.

EDIT:

enter image description here

0
John DiFini On

I wound up using IEX Cloud (e.g. https://cloud.iexapis.com/stable/stock/TSLA/quote?token=xxxx). You can sign up for a free account here - https://iexcloud.io. Lastly, here's their terms of use - https://iexcloud.io/terms.