【问题标题】:How far back in time can I query historical quotes from Yahoo Finance YQL?我可以从 Yahoo Finance YQL 查询多长时间的历史报价?
【发布时间】:2015-12-11 21:55:05
【问题描述】:

我正在构建一个需要历史股票报价的小型概念验证应用。我的应用程序中的 UI 允许用户选择日期范围,我一直在使用 YQL 控制台生成 REST 调用来请求历史报价数据。 YQL 调用如下:

select * from yahoo.finance.historicaldata where symbol = "JNJ" and startDate = "2015-01-01" and endDate = "2015-12-11"

工作正常,但如果我像这样回到过去:

select * from yahoo.finance.historicaldata where symbol = "JNJ" and startDate = "2013-01-01" and endDate = "2015-12-11"

我没有得到任何引号,并在 XML 中找到如下所示的警告:

<warning>Too many instructions executed: 50223882</warning>

在达到限制之前我们可以查询多长时间?

【问题讨论】:

    标签: yql quantitative-finance


    【解决方案1】:

    似乎至少单个代码报价的限制是 364 条记录。我通过执行几个 YQL 查询发现了这一点,并发现该查询有效:

    select * from yahoo.finance.historicaldata where symbol = "JNJ" and startDate = "2014-07-03" and endDate = "2015-12-11"
    

    而这个没有:

    select * from yahoo.finance.historicaldata where symbol = "JNJ" and startDate = "2014-07-02" and endDate = "2015-12-11"
    

    当我解析从第一个查询返回的 XML 时,我发现了 364 条记录。

    【讨论】:

      猜你喜欢
      • 2012-09-07
      • 1970-01-01
      • 2017-01-08
      • 1970-01-01
      • 2017-10-28
      • 2015-10-15
      • 1970-01-01
      • 2021-10-30
      • 2017-09-18
      相关资源
      最近更新 更多