Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法从雅虎或谷歌的 API 获取实时选项信息。我所说的选项信息是指:呼叫,询问量。我基本上需要这个页面上的信息
感谢您的帮助!
我不知道除了抓取 HTML 之外的其他方法。quantmod R 包中的getOptionChain.yahoo函数就是这样做的。您可以在CRAN上获取源代码。
getOptionChain.yahoo
不确定您要使用哪种语言,但您可以使用此处找到的 java 解析器并修改 Yahoo Finance API 链接 + 特殊标签,如此处所示,您应该能够获取选项信息。
据我记得,报价有 20 分钟的延迟。我不确定它是否适用于选项。