Anyone else having problems with this API? I have just recently started working with it but suddenly everything that was working both mine and others is no longer working, first the CSV interface and now the YQL interface. Surprised I don't see any mention of this on this board or a google search.
3 Answers
You can still back out the periods since the interval is in seconds (60*60*24), one day = 86,400.
The cookie is the problem. This is how I did it in VBA: https://stackoverflow.com/a/44055850/8027976
Example for period 1:
Dim baseDate As Date: baseDate = #1/1/1970#
Dim period1 As Long: period1 = (startDate - baseDate) * 86400
Dim period2 As Long: period2 = (endDate - baseDate + 0.8) * 86400
You need the ".8", otherwise, it will not pull the end-of-day price.

- 1
- 1

- 96
- 3
Yes, it's not working anymore. They changed the coding so now it reads something like https://query1.finance.yahoo.com/v7/finance/download/IWM?period1=1492465014&period2=1495057014&interval=1d&events=history&crumb=oL864EniL6D
evidently they want to plant a cookie so it's not possible to automate it. Also there is no clear equivalence between the period1 and period2 numbers and the dates (in this case 5/17/2016 and 5/17/2017 respectively) so you couldn't even program the dates.
I am not sure why. I am grateful for the years of downloading data, and I would love to have this ability restored.

- 495
- 1
- 4
- 7
-
It is still possible to automate it though, see my post in another thread. – Mark May 18 '17 at 15:28
-
Thank you very much, I found it and I thought it was very helpful. However I am not sure how to find the value of the cookie. Could you give me a hint? Thanks! – rxex May 19 '17 at 21:15
-
@rxex You can parse the cookie and crumb programatically: see http://stackoverflow.com/a/44050039/2279831 – Eduardo May 22 '17 at 10:33