use*_*069 11 jsonp stocks yql yahoo-finance
我是YQL的新手.也许这是非常微不足道的,但我无法理解这一点.例如,我知道如何使用YQL控制台从Yahoo/YQL查询当前库存数据:
http://developer.yahoo.com/yql/console/
使用查询字符串:
select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT")
Run Code Online (Sandbox Code Playgroud)
但是,如果我想要从昨天或一周前获得相同的数据呢?我试过像这样的东西
select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT") and date=20120913
Run Code Online (Sandbox Code Playgroud)
但它似乎不起作用.
任何建议表示赞赏!
Def*_*_Os 13
你使用的是错误的表格.
select * from yahoo.finance.historicaldata where symbol = "YHOO" and startDate = "2009-09-11" and endDate = "2010-03-10"
Run Code Online (Sandbox Code Playgroud)
或者,你可以使用stockretriever.py它.在源代码中,您可以找到历史数据的变通方法.
表格是正确的.您需要在查询字符串中附加store参数.这是示例字符串.
http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.historicaldata where symbol = "YHOO" and startDate = "2014-02-11" and endDate = "2014-02-18"&diagnostics=true&env=store://datatables.org/alltableswithkeys
Run Code Online (Sandbox Code Playgroud)
希望它能帮到你.
| 归档时间: |
|
| 查看次数: |
26747 次 |
| 最近记录: |