Yahoo Finance API changes (2017)

The data request from Yahoo Finance appears to have changed or is now blocked. The request below for product data is no longer working as of May 2017. Does anyone know if there is a new way to make this request?

http://chartapi.finance.yahoo.com/instrument/1.0/GCQ17.CMX/chartdata;type=quote;range=10d/csv/

      

+18


source to share


3 answers


First, uploading old Yahoo iChart photos was a success forever. In one forum post, a Yahoo employee confirmed that the free EOD data has been discontinued and will not be re-entered. Check out this thread and find an answer from Nixon. Yahoo recently acquired Verizon, and this should be a new direction.

However, if you check out Yahoo's finance page, the CSV download link works, albeit differently now. It is through the new API that the "crumb" authentication token associated with the cookie when accessing the page is used.



So to get the same CSV download as before with this new API. I put together some quick Python3 code. Please check GitHub for yahoo_quote_download source code .

+21


source


I couldn't figure out how to request the new yahoo API, so I made one for google.

Here is the matlab code, but python uses the same link format.



https://github.com/creeveshft/matlabfunctions/blob/master/GetHistoricGoogle.m

+2


source


As Ashley Davis mentioned in the comment section of the above question, the new way is through Alpha Vantage, at least when you're looking for free historical data. Their web service is very well documented and simple.

For those of you looking to import data into Excel, I wrote an api that I provide for free. Here is an Excel spreadsheet

+2


source







All Articles