A股历史日线数据查询WEB API使用方法

此web service提供个股2005年至今的日内历史数据。例如,如果要查询工商银行(601398)2006年10月27日的数据,发送请求

http://shuorel.com/ws/share/daily/v1/601398?date=2006-10-27

将返回结果

{"data":[{"code":"601398","date":"2006-10-27","open":3.4,"high":3.44,"close":3.28,"low":3.26,"volume":2582539562,"amount":8725310440}],"status":"done"}

如果要查询多日的数据,例如要查询2006-10-27, 2007-10-27, 2008-10-27, 2009-10-27, 2010-10-27这五日的数据,发送请求

http://shuorel.com/ws/share/daily/v1/601398?dates=2006-10-27,2007-10-27,2008-10-27,2009-10-27,2010-10-27

将返回结果

{"data":[{"code":"601398","date":"2006-10-27","open":3.4,"high":3.44,"close":3.28,"low":3.26,"volume":2582539562,"amount":8725310440},{"code":"601398","date":"2009-10-27","open":5.19,"high":5.2,"close":5.09,"low":5.07,"volume":158426192,"amount":814316736},{"code":"601398","date":"2010-10-27","open":4.44,"high":4.51,"close":4.45,"low":4.41,"volume":155510368,"amount":691467648}],"status":"done"}

表明07和08年的10月27日不是交易日无数据。

如果要查询一段范围内的数据,例如2016年一月份所有交易日的数据,发送请求

http://shuorel.com/ws/share/daily/v1/601398?from=2016-1-1&to=2016-1-31

将返回结果

{"data":[{"code":"601398","date":"2016-01-04","open":4.58,"high":4.59,"close":4.45,"low":4.44,"volume":147508685,"amount":669360275},{"code":"601398","date":"2016-01-05","open":4.42,"high":4.51,"close":4.47,"low":4.38,"volume":160629284,"amount":715484718},{"code":"601398","date":"2016-01-06","open":4.45,"high":4.52,"close":4.51,"low":4.45,"volume":113177263,"amount":508161231},{"code":"601398","date":"2016-01-07","open":4.49,"high":4.5,"close":4.43,"low":4.42,"volume":34491508,"amount":153712624},{"code":"601398","date":"2016-01-08","open":4.44,"high":4.49,"close":4.46,"low":4.4,"volume":186134474,"amount":827886955},{"code":"601398","date":"2016-01-11","open":4.43,"high":4.43,"close":4.32,"low":4.31,"volume":164702051,"amount":722038638},{"code":"601398","date":"2016-01-12","open":4.36,"high":4.38,"close":4.32,"low":4.31,"volume":115754335,"amount":502307243},{"code":"601398","date":"2016-01-13","open":4.35,"high":4.35,"close":4.3,"low":4.29,"volume":101544385,"amount":439299085},{"code":"601398","date":"2016-01-14","open":4.26,"high":4.31,"close":4.31,"low":4.21,"volume":131047547,"amount":559263229},{"code":"601398","date":"2016-01-15","open":4.29,"high":4.3,"close":4.23,"low":4.21,"volume":101190760,"amount":430207041},{"code":"601398","date":"2016-01-18","open":4.19,"high":4.25,"close":4.19,"low":4.17,"volume":119484135,"amount":502408250},{"code":"601398","date":"2016-01-19","open":4.19,"high":4.27,"close":4.25,"low":4.18,"volume":98135774,"amount":415090802},{"code":"601398","date":"2016-01-20","open":4.25,"high":4.25,"close":4.22,"low":4.17,"volume":106584738,"amount":448627145},{"code":"601398","date":"2016-01-21","open":4.2,"high":4.26,"close":4.18,"low":4.18,"volume":84601580,"amount":356768999},{"code":"601398","date":"2016-01-22","open":4.21,"high":4.22,"close":4.22,"low":4.18,"volume":84696499,"amount":355912034},{"code":"601398","date":"2016-01-25","open":4.22,"high":4.25,"close":4.23,"low":4.2,"volume":62768998,"amount":264870077},{"code":"601398","date":"2016-01-26","open":4.21,"high":4.22,"close":4.08,"low":4.05,"volume":112381408,"amount":464737013},{"code":"601398","date":"2016-01-27","open":4.09,"high":4.15,"close":4.11,"low":4.06,"volume":152478645,"amount":625439810},{"code":"601398","date":"2016-01-28","open":4.1,"high":4.1,"close":4.05,"low":4.02,"volume":90199334,"amount":366284746},{"code":"601398","date":"2016-01-29","open":4.04,"high":4.12,"close":4.1,"low":4.03,"volume":137585643,"amount":561102779}],"status":"done"}

请注意,范围查询最多返回前50日的结果。

时间: 2024-11-05 21:49:08

A股历史日线数据查询WEB API使用方法的相关文章

A股分红送股历史数据查询Web API使用方法

例如,要查询长城汽车(601633)在2015年的分红送股,发送请求 http://shuorel.com/ws/share/dividend/v1/601633?year=2015 返回结果 {"data":[{"date":"2015-05-26","cash":8.0,"transfer_issue":0,"bonus_issue":0,"register_date&qu

A股股本结构历史数据查询Web API使用方法

例如,要查询长城汽车(601633)最新的股本结构,发送请求 http://shuorel.com/ws/share/structure/v1/601633 返回得到 {"data":[{"code":"601633","date":"2015-10-14","total_share":9127260000,"circulating_share":6027720000

A股财报摘要历史数据查询Web API使用方法

例如,要查询长城汽车(601633)最近的财报摘要,发送请求 http://shuorel.com/ws/share/finance/v1/601633 返回结果 {"data":[{"code":"601633","date":"2016-03-31","asset_per_share":4.4661,"earning_per_share":0.2625,"

A股实时股票行情,指数行情web API 使用方法

例如,请求 http://shuorel.com/ws/realtime/v1/sz000001 将得到 {"data":{"name":"平安银行","time":"2016-04-08 15:05:57","open":10.55,"high":10.67,"close":10.57,"low":10.5,"vol

中国气象网 气象数据开放平台 API使用方法 (Android)

由于要做个天气应用,需要找个天气的API.上网上搜了下都是那几个,而且基本都过时了.百度有个天气API,不过貌似只能提供当天的.网上提到的中国气象接口的文章,大都用的时旧API,有的被封了,有的永远停到了2014年3月24不更新了. 后来找到了中国天气的新接口,已经升级成气象数据开放平台了http://openweather.weather.com.cn/.没有开发者社区或论坛什么的,只能自己琢磨他的文档了(感觉没人维护..). 经过几个疑难点卡住后,总算调通了.现分享给大家. 1.申请keys

Web API返回JSON数据

对Web API新手来说,不要忽略了ApiController 在web API中,方法的返回值如果是实体的话实际上是自动返回JSON数据的例如: 他的返回值就是这样的: { "Content": true, "StatusCode": 200, "RequestMessage": "sample string 2" } 这是定义的Response类 public class Response<T> //where

ABP示例程序-使用AngularJs,ASP.NET MVC,Web API和EntityFramework创建N层的单页面Web应用

本片文章翻译自ABP在CodeProject上的一个简单示例程序,网站上的程序是用ABP之前的版本创建的,模板创建界面及工程文档有所改变,本文基于最新的模板创建.通过这个简单的示例可以对ABP有个更深入的了解,每个工程里应该写什么样的代码,代码如何组织以及ABP是如何在工程中发挥作用的. 源文档地址:https://www.codeproject.com/Articles/791740/Using-AngularJs-ASP-NET-MVC-Web-API-and-EntityFram 源码可以

XenApp/XenDesktop监控数据查询、提取

在XenDesktop中,Director为管理员提供了整个平台的监控和健康状态的信息,让管理员方便的了解Citrix的平台的运行状态以及实时发生的故障.这些监控数据从哪儿来?在XenDesktop的先前版本中,Director中的大多数数据都是通过直接访问Broker Service API来检索的.使用此API的缺点是此服务不包括对使用的历史信息的检索,即只能检索实时会话信息.如果管理员需要向以前的监控组件Edgesight那样检索历史数据,比如管理员可能想知道目前有多少会话处于活动状态,以

Web API应用架构在Winform混合框架中的应用(1)

在<Web API应用架构设计分析(1)>和<Web API应用架构设计分析(2)>中对WebAPI的架构进行了一定的剖析,在当今移动优先的口号下,传统平台都纷纷开发了属于自己的Web API平台,方便各种终端系统的接入,很多企业的需求都是以Web API优先的理念来设计整个企业应用体系的.Web API作为整个纽带的核心,在整个核心层需要考虑到统一性.稳定性.以及安全性等方面因素.本文主要介绍,Web API应用架构,在Winform整合中的角色,以及如何实现在Winform混合