Is there any way to get free SP500 historical end-of-day data ideally in API and csv form? Not sure why it seems to be harder than I could imagine.
For example:
Quandl: SPY or SPX symbol not found
rs = requests.get('https://www.quandl.com/api/v3/datasets/WIKI/SPY/data.csv?api_key=<API Keys>')
Is there any API that I could try?
Thank you.
You can retrieve it via API by installing quandl with
pip install quandland then making a request as follows:However, you need to be subscribed to the dataset to be able to access the data this way.