问题描述
Yahoo Finance上周再次更改了其网页格式,并且该数据不可复制,不可下载或可抓取,因为该数据显然是间接加载的. (我可以在调试器中看到它.)
Yahoo Finance changed its web page formats last week (again) and the data isn't copyable, downloadable, or scrapeable, since the data is apparently loaded indirectly. (I can see it in the debugger.)
Yahoo Finance API当前不会返回单个期权品种的期权数据,也不会返回有效期或到期日的表格,显然也不会返回YQL.
The Yahoo Finance API doesn't currently return option data for a single option symbol, much less tables of or for expiration dates, nor apparently does YQL.
在过去一周中,是否有人成功从Yahoo Finance下载或抓取了Option数据?如果可以,怎么办?
Has anyone successfully downloaded or scraped Options data from Yahoo finance in the past week? If so, how?
这可能无关紧要,但我主要使用perl.
It probably isn't relevant, but I mainly use perl.
这个问题与编程有关,因为下载数据肯定是编程的一部分.
This question is about programming, since surely downloading data is part of programming.
推荐答案
我发现自Yahoo Finance更改以来,一个API一直有效.我仍在尝试寻找其他可用API的线索.
I have found an API that works since the change in Yahoo Finance. I'm still trying to find any clues to other APIs available.
这是基本呼叫. {}
用于数字1或2,因为它们都起作用:query{}.finance.yahoo.com/v7/finance/
Here's the base call. The {}
is for either the number 1 or 2 as both work: query{}.finance.yahoo.com/v7/finance/
现在,如@Yago所述,您可以附加chart/
,也可以附加options/
.我正在寻找其他附加选项.具体来说,我想找到基本面和技术面分析,就像您可以从该旧有商品中得到的一样:http://finance.yahoo.com/d/quotes.csv?s=amd&f=nb4t8
(返回值:n =名称; b4 =帐面价值; t8 = 1年目标价格)
Now, as @Yago notes, you can append chart/
and you can also append options/
. I'm looking for other options to append. Specifically I'd like to find Fundamental and Technical analysis like you can get from this oldie but goodie: http://finance.yahoo.com/d/quotes.csv?s=amd&f=nb4t8
(which returns: n=Name; b4=book value; t8=1yr target price)
/v7
返回不错的JSON.谢谢.
The /v7
returns JSON which is nice. Thanks.
并实际回答有关期权链的问题:https://query{1|2}.finance.yahoo.com/v7/finance/options/{ticker}
您还可以添加选项到期的特定纪元日期(小时,分钟,秒为零,这将与Yahoo Finance的输出相匹配):https://query2.finance.yahoo.com/v7/finance/options/amd?date=1487289600
And to actually answer your question about option chains:https://query{1|2}.finance.yahoo.com/v7/finance/options/{ticker}
you can also add a specific epoch date (with Hour,Min,Sec as zeros which will match up with output from Yahoo Finance) of an option expiry:https://query2.finance.yahoo.com/v7/finance/options/amd?date=1487289600
这篇关于如何使用Yahoo Finance API下载选项表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!