我正在尝试使用 YQL 从雅虎获取股票期权链。我在 YQL 控制台中尝试过这个命令:
select * from yahoo.finance.options
但是,我收到此错误 XML:
<?xml version="1.0" encoding="UTF-8"?>
<error xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
</diagnostics>
<description>No definition found for Table yahoo.finance.options</description>
</error>
这张表好像不存在了。有谁知道正确的表是什么?
最佳答案
您必须至少提供一个 where clause
使这个查询工作。像这样:
select * from yahoo.finance.options where symbol='MMM'
或者,
select * from yahoo.finance.options where symbol='A'
或者,
select * from yahoo.finance.options where symbol='YHOO'
以上所有查询都可以正常工作。如果你想要更具体的数据,那么你必须提供更多的条件来从整个数据中过滤掉你想要的数据。
关于web-services - 如何使用 YQL 获取股票期权链?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12773569/