我已经在deevloper.yahoo.com和yql控制台https://developer.yahoo.com/yql/console中创建了和API。
勾选显示社区表并搜索金融。
我得到了股票data.Here的结果,我得到了josn和xml格式的历史数据的准确数据。
历史数据yahoo.finance.historicaldata的链接。
就像我得到了所有的数据
此股票的http://finance.yahoo.com/q/hp?s=AAPL+Historical+Prices和rest查询为
yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20%3D%20%22YHOO%22%20and%20startDate%20%3D%20%222009-09-11%22%20and%20endDate%20%3D%20%222010-03-10%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=当我尝试其他股票,如yahoo.finance.balancesheet和其他股票时
我看到我在url中发送的参数是错误的,特别是其他股票期权中的where条件。
谁能说出什么将是其他股票期权的确切网址。
发布于 2015-07-06 13:06:45
你似乎想要的是:
https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.historicaldata where symbol = "YHOO" and startDate = "2009-09-11" and endDate = "2010-03-10"&format=json&diagnostics=true&env=store://datatables.org/alltableswithkeys&callback=例如,您可以将该URL提供给wget,它将返回一个JSON。
我从哪里弄到这个URL的?我启动了YQL Console,并选中了Show Community Tables。接下来,我输入了您的查询(上面的q参数),并收到了有效的JSON。最后,我转到页面的底部,在那里用绿色显示REST查询,并将URL从盒子中复制出来。
https://stackoverflow.com/questions/29486659
复制相似问题