使用YQL控制台,我做到了:
select * from yahoo.finance.options where symbol="FB"但我在JSON中得到了以下结果。optionsChain中没有数据。根据其他帖子,我相信请求的格式是正确的。如何获取选项链中应该包含的数据?这是过时的还是我遗漏了什么?提前谢谢。
{
"query": {
"count": 1,
"created": "2015-01-10T17:26:16Z",
"lang": "en-US",
"diagnostics": {
"url": [
{
"execution-start-time": "0",
"execution-stop-time": "71",
"execution-time": "71",
"content": "http://www.datatables.org/yahoo/finance/yahoo.finance.options.xml"
},
{
"execution-start-time": "74",
"execution-stop-time": "1620",
"execution-time": "1546",
"content": "http://finance.yahoo.com/q/op?s=FB"
}
],
"publiclyCallable": "true",
"log": [
"results.length(): 0",
"no elements"
],
"javascript": {
"execution-start-time": "74",
"execution-stop-time": "1647",
"execution-time": "1573",
"instructions-used": "11272",
"table-name": "yahoo.finance.options"
},
"user-time": "1648",
"service-time": "1537",
"build-version": "0.2.278"
},
"results": {
"optionsChain": {
"symbol": "FB"
}
}
}
}发布于 2015-05-09 06:23:13
很多人对此有问题,包括我自己。
在环顾四周后,我发现Google的选项信息也可以通过JSON获得。
它对生产环境没有好处,因为它不受支持,实际上只是网站如何操作的一个函数,但如果你感兴趣,我做了一个教程,上面有完整的示例代码。更好的是,它是基于REST的,所以在任何语言中都可以相当容易地使用。Google Stock Option Chain Data
https://stackoverflow.com/questions/27879243
复制相似问题