Over the past 1-2 days, the HTTP request that I used to download historical stock prices from Yahoo Finance did not work. The link I use is the first, but I also tried the other three (as I saw other people using them):
http:
https:
http:
https:
Interestingly, I noticed that the link that the Yahoo site itself provides (for downloading data manually) has changed. The link was the first in the list above (in the end, where I got it from), but now it looks like this:
https://query1.finance.yahoo.com/v7/finance/download/TRQ?period1=1466805600&period2=1467496800&interval=1d&events=history&crumb=DuX0UxVwtN0
Please note that all of these links should theoretically extract the same data: stock prices for TRQ (as an example, I also tried, for example, AAPL) from 2016/06/25 to 2016/07/03.
These new links work in the browser or in my program, but they are hardly scalable since this requires a session cookie; if you simply do not specify the last request parameter, you will receive an error message when you are not authorized. This question asks how to create the specified session cookie in an automatic way; however, I want to ask about it, completely avoiding this problem, trying to get direct access to the YQL database.
I tried using the following link to directly use the YQL API (converting spaces to% 20 etc., which is not a problem):
https://query.yahooapis.com/v1/public/yql?q=
select * from yahoo.finance.historicaldata where symbol = "TRQ"
and startDate = "2016-06-25"
and endDate = "2016-07-03"
&format=json
&diagnostics=true
&env=store://datatables.org/alltableswithkeys
&callback=
"connection failed". , , datatables.org ( ). - ?
.