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.
2 Answers
1
votes
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!
1
votes
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.