- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们想检查股票的历史数据,使用 HTTP 请求,并获得 JSON。
使用yahoo API,我发现不仅很难清楚地理解HTTP请求字段,而且还获取某一天的数据 (不是每天的平均值,而是某一天的值),如下:http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20%3D%20%22AAPL%22%20and%20startDate%20%3D%20%222012-09-11%22%20and%20endDate%20%3D%20%222014-02-11%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=
1. 没有任何关于如何设置每个字段的解释(也不是在雅虎控制台)。
2. 您无法设置某一天,并获取其值。
除了现在免费的雅虎之外,还有其他稳定的解决方案吗?
或者,有人可以帮助我了解请求中所有这些垃圾的标志吗?
最佳答案
2. 中的广告假设:“你 不能 设置某一天,并得到他的值”......好吧,你可以:
http://query.yahooapis.com/v1/public/yql?q=
select * from yahoo.finance.historicaldata
where symbol = "AAPL"
and startDate = "2012-09-11"
and endDate = "2014-02-11"
&format=json
&diagnostics=true
&env=store://datatables.org/alltableswithkeys
&callback=
"results":{
"quote":[
{
"Symbol":"AAPL",
"Date":"2014-08-12",
"Open":"96.04",
"High":"96.88",
"Low":"95.61",
"Close":"95.97",
"Volume":"33795000",
"Adj_Close":"95.97"
},
{
"Symbol":"AAPL",
"Date":"2014-08-11",
"Open":"95.27",
"High":"96.08",
"Low":"94.84",
"Close":"95.99",
"Volume":"36585000",
"Adj_Close":"95.99"
}
]
}
{
"query":{
"count":2,
"created":"2014-08-14T21:32:41Z",
"lang":"en-EN",
"diagnostics":{
"url":[
{
"execution-start-time":"0",
"execution-stop-time":"1",
"execution-time":"1",
"content":"http://www.datatables.org/yahoo/finance/yahoo.finance.historicaldata.xml"
},
{
"execution-start-time":"5",
"execution-stop-time":"16",
"execution-time":"11",
"content":"http://ichart.finance.yahoo.com/table.csv?g=d&f=2014&e=12&c=2014&b=10&a=7&d=7&s=AAPL"
},
{
"execution-start-time":"18",
"execution-stop-time":"28",
"execution-time":"10",
"content":"http://ichart.finance.yahoo.com/table.csv?g=d&f=2014&e=12&c=2014&b=10&a=7&d=7&s=AAPL"
}
],
"publiclyCallable":"true",
"cache":[
{
"execution-start-time":"4",
"execution-stop-time":"4",
"execution-time":"0",
"method":"GET",
"type":"MEMCACHED",
"content":"91a0664b4e7cf29d40cce123239fec85"
},
{
"execution-start-time":"17",
"execution-stop-time":"18",
"execution-time":"1",
"method":"GET",
"type":"MEMCACHED",
"content":"31dd9633be8581af77baa442f314c921"
}
],
"query":[
{
"execution-start-time":"5",
"execution-stop-time":"17",
"execution-time":"12",
"params":"{url=[http://ichart.finance.yahoo.com/table.csv?g=d&f=2014&e=12&c=2014&b=10&a=7&d=7&s=AAPL]}",
"content":"select * from csv(0,1) where url=@url"
},
{
"execution-start-time":"18",
"execution-stop-time":"28",
"execution-time":"10",
"params":"{columnsNames=[Date,Open,High,Low,Close,Volume,Adj_Close], url=[http://ichart.finance.yahoo.com/table.csv?g=d&f=2014&e=12&c=2014&b=10&a=7&d=7&s=AAPL]}",
"content":"select * from csv(2,0) where url=@url and columns=@columnsNames"
}
],
"javascript":{
"execution-start-time":"3",
"execution-stop-time":"29",
"execution-time":"25",
"instructions-used":"34359",
"table-name":"yahoo.finance.historicaldata"
},
"user-time":"31",
"service-time":"23",
"build-version":"0.2.2666"
},
"results":{
"quote":[
{
"Symbol":"AAPL",
"Date":"2014-08-12",
"Open":"96.04",
"High":"96.88",
"Low":"95.61",
"Close":"95.97",
"Volume":"33795000",
"Adj_Close":"95.97"
},
{
"Symbol":"AAPL",
"Date":"2014-08-11",
"Open":"95.27",
"High":"96.08",
"Low":"94.84",
"Close":"95.99",
"Volume":"36585000",
"Adj_Close":"95.99"
}
]
}
}
}
http://ichart.finance.yahoo.com/table.csv?g=d&f=2014&e=12&c=2014&b=10&a=7&d=7&s=AAPL
Date,Open,High,Low,Close,Volume,Adj Close
2014-08-12,96.04,96.88,95.61,95.97,33795000,95.97
2014-08-11,95.27,96.08,94.84,95.99,36585000,95.99
关于yahoo-finance - 获取股票的历史数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25097779/
我正在处理现有网站的移动版本,我无法解决菜单中链接的问题。 该问题仅发生在标准的 android 浏览器上。在 Chrome、firefox、safari 甚至 IE 上,该网站都运行良好。该网站上的
几周来我一直在努力解决这个问题,但没有找到真正的解决方案。我发现了一种解决方法,但我觉得它很烦人。 图像在我的 Galaxy S3 的默认浏览器中加载模糊,但在 chrome 和 firefox 中它
安装了多个浏览器。我怎样才能打开http://www.google.com以编程方式使用内置(库存)浏览器? 最佳答案 使用内置浏览器,通常可以通过按菜单按钮使地址栏出现(当然是在按图标打开浏览器之后
我在面试中被问到这样的问题: 给定股票价格: MS | 500 Apl | 1000 Nefx| 500 MS | 500 每次新库存到来时,我们都必须添加到现有库存中,否则如果是新
我需要将每个键的值相乘,然后将所有值相加以打印一个数字。我知道这可能非常简单,但我被卡住了 在我看来,我会用类似的方式来解决这个问题: for v in prices: total = sum(v *
直到昨天这样的查询 http://autoc.finance.yahoo.com/autoc?query=a&callback=YAHOO.Finance.SymbolSuggest.ssCallba
我正在尝试找到一个在phonegap应用程序中绘制折线/股票图表的解决方案。我尝试过很多库:amcharts JS、highcharts,但没有一个能工作。 有人可以帮我完成这个任务吗?欢迎任何解决方
如果您在 Google 上查看股票(例如 search for 'Apple stocks' ),您会得到一个相当漂亮且交互式的图表,如下所示: 请注意垂直十字线和漂亮的工具提示。 事实证明,尝试在
首先,我必须说,我是人工智能方面的初学者。我遵循了大多数有关股市预测的教程,它们几乎都是相同的。这些教程使用一个数据集并分为两组。第一个是训练集,第二个是测试集。他们正在使用股票的收盘价来训练和制作模
最近在使用highchart stock(highstock.js)的时候遇到了一个很奇怪的问题。我加载了一些包含星期六数据点的数据点。当应用程序运行时,起初它看起来像这样: 没有图表出现,只有导航器
我已经在 Azure 中的存储帐户上部署了新的文件共享,自从我这样做以来,我不再能够执行 terraform 计划,而是收到以下错误: azurerm_storage_account_customer
我是一名优秀的程序员,十分优秀!