Is YQL / datatables.org down as of May 17-18, 2017?

房东的猫 提交于 2019-12-04 06:08:59

Yahoo has officially confirmed that the Yahoo Finance API has been discontinued in the following thread in the Yahoo Help Community (see posts by username Nixon):

https://forums.yahoo.net/t5/Yahoo-Finance-help/Is-Yahoo-Finance-API-broken/m-p/250503#U250503

We are all asking ourselves "now what?"

Please share your findings with the community.

It appears to be down. Quandl is probably the closest free replacement, but it doesn't have all of the same data. In particular, I'm trying to retrieve data on various ETFs, such as VXUS and VTI, which aren't working.

One of the great features of the now-discontinued Yahoo data was the "adjusted price" that essentially provided the total return of an instrument. Since that is also no longer offered, you might as well use the Google finance API which still can be automated. This is a snippet of what I use (excel VBA) to open and save a file with the data. The end date I used here is 2019 or whatever you want- it will download to the last available date without generating an error:

startdate = #3/15/2015#
StartingMonth = Format(startdate, "Mmm")
StartingDay = Format(startdate, "d")
StartingYear = Format(startdate, "yyyy")
startdate = StartingMonth & "+" & StartingDay & "%2C+" & StartingYear    
Symbol = "AAPL" 
ThisAddress = "http://www.google.com/finance/historical?q=" & _
            Symbol & "&startdate=" & startdate & "&enddate=Nov+1%2C+2019&output=csv"
Workbooks(ThisBook).FollowHyperlink Address:=ThisAddress
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Symbol, FileFormat:=xlCSV

In one of the forum posts, a Yahoo employee has confirmed that the free EOD data has been terminated, and will not be reintroduced. Check out this thread and look for reply from Nixon. Yahoo is recently acquired by Verizon, and it must be the new direction.

However, if you check the Yahoo financial page, the CSV download link works, though differently now. It is through a new API that uses an authentication token "crumb" that is linked to a cookie when you access the page.

I have put together some quick Python3 code to download the same CSV as before (with adjusted price) through this new API. Please check out the GitHub project yahoo_quote_download.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!