DEV Community

GuGuData
GuGuData

Posted on

A 股指数历史数据 API 数据接口

A 股指数历史数据 API 数据接口

股指历史数据,支持指数列表获取,返回所有指数历史数据。

gugudata_api_cover

1. 产品功能

  • 支持所有指数数据查询;
  • 支持全量指数历史数据查询;
  • 多维度的统计时间以及数据结果;
  • 秒级查询性能;
  • 数据持续更新与维护;
  • 全接口支持 HTTPS(TLS v1.0 / v1.1 / v1.2 / v1.3);
  • 全面兼容 Apple ATS;
  • 全国多节点 CDN 部署;
  • 接口极速响应,多台服务器构建 API 接口负载均衡;
  • 接口调用状态与状态监控

2. API 文档

接口详情: https://www.gugudata.com/api/details/stockcnindexhistory

接口地址: https://api.gugudata.com/stock/cn/index/history

返回格式: application/json; charset=utf-8

请求方式: GET

请求协议: HTTPS

请求示例: https://api.gugudata.com/stock/cn/index/history?appkey=YOUR_APPKEY&symbol=YOUR_VALUE&period=YOUR_VALUE&begindate=YOUR_VALUE&enddate=YOUR_VALUE

数据预览: https://www.gugudata.com/preview/stockcnindexhistory

接口测试: https://api.gugudata.com/stock/cn/index/history/demo

3. 请求参数

参数名 参数类型 是否必须 默认值 备注
appkey string YOUR_APPKEY 付费后获取的 APPKEY
symbol string YOUR_VALUE 传递上面获取的指数编码,如: 000001。可通过前置接口或参见 A 股指数代码参数枚举页面
period string YOUR_VALUE 统计周期,参数可选值为 DAILY \
begindate string YOUR_VALUE 历史数据开始时间,格式为 20200101
enddate string YOUR_VALUE 历史数据结束时间,格式为 20200101,获取全量数据请分批获取,数据量较大,请保持合理的请求频率

4. 返回参数

参数名 参数类型 备注
DataStatus.StatusCode int 接口返回状态码
DataStatus.StatusDescription string 接口返回状态说明
DataStatus.ResponseDateTime string 接口数据返回时间
DataStatus.DataTotalCount int 此条件下的总数据量,一般用于分页计算
Data.TimeKey double 交易时间
Data.Symbol string 股票代码
Data.Open double 开盘价,单位:元
Data.Close double 收盘价,单位:元
Data.High double 最高,单位:元
Data.Low double 最低,单位:元
Data.TradingVolume int 成交量,单位:股
Data.TradingAmount double 成交额,单位:元
Data.Swing double 振幅,单位:%
Data.ChangePercent double 涨跌幅,单位:%
Data.ChangeAmount double 涨跌额,单位:元
Data.TurnoverRate double 换手率,单位:%

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay