
Doing so for AAPL with a time period of – Aug 06 2017, the link is: If you right click a link in chrome, there is an option to ‘Copy Link Address’. The Download Data button is actually a hyperlink, so I decided to have a quick check as to the url of this link. Of automating this process, and luckily I found one. But to manually do this for 3000 stocks, as I would have to do for my MachineLearningStocks project, would be tantamount to water torture. I entered ‘AAPL’.Īfter navigating to the Historical Data tab, you will end up with a screen like this:Īfter editing the time period and applying it, you can click the Download Data button (which I emphasised in red above), and a CSV file will promptly To do so, you go to, and enter a ticker in the search. OverviewĪlthough the API doesn’t work, you can still manually download CSV files containing historical price data for a given ticker. A much better way would be to use requests directly and parse the csv bytes, instead of physically downloading files moving them. Update as of 9/1/20: looking back on this post, I don’t think my solution is very good. So I guess this post does have some utility after all! Update as of 20/5/18: it seems that fix-yahoo-finance is becoming very inconsistent. I will leave this post up for legacy, but for any serious implementations, I wholeheartedly recommend the aforementioned tool. Update as of 10/2/18: there is now a library on GitHub that puts this post to shame, with a direct pandas-datareader interface. I am not responsible for how you use the methods demonstrated in this post. Clearly, I am not trying to conduct a DDOS – I am merely trying to parse data for educational purposes. This method involves making a large number of requests on Yahoo Finance, which may ‘look like’ a DDOS. It turns out that there is a rather hackish workaround which allows us to download the data as CSV (i.e spreadsheet) files, which of course can then be read into excel, pandas dataframes etc.

This means that excellent tools like pandas-datareader are now broken, much to the dismay of many amateur algorithmic traders or analysts.

As of May 2017, they have discontinued their API, probably as a result of Yahoo’s pending acquisition by Verizon. Yahoo Finance has long been an excellent free financial resource with a wealth of data and a convenient API, allowing open source programming libraries to access stock data.
