历史K线查询
全球历史K线行情查询(按时间段):股票/外汇/期货/贵金属/加密货币/股指等,开高低收+成交量
Documentation
历史K线数据查询(按时间段),排序从开始时间往结束时间方向排。 周期是1,5,15分钟,返回date当日的数据。 周期是30分钟,1小时,返回date当日及前4日的全部数据。 周期是4小时,返回date当日及前14日的全部数据。 周期是日,返回date当月及前2个月的全部数据。 周期是周,返回date当年的全部数据 。接口输出的日周期数据只有最近2年,分钟周期数据只有最近5天(更多历史数据可申请打包下载)。
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"symbol": "品种合约代码(查询连接 http://demo.konpn.com/symbols.shtml",
"period": "取 1M,3M,5M,10M,15M,30M,1H,2H,3H,4H,D,W,M。周期是1,5,15分钟则返回date当日的数据。 周期是30分钟或1小时则返回...",
"date": "日期,返回结果排序顺序。接口输出的日周期数据最多只有10年,1分钟周期数据只有最近30天,5分钟及小时周期最多180天",
"withlast": "是否包含最新的一个动态k线数据,(填写1是,0否)"
}Response Example
{
"Code": 0,
"Msg": "",
"Obj": "1600854240,10452.6,10455.8,10456.2,10452.5,0,5.37;1600854180,10455.8,10452.6,10455.8,10452.6,0,5.08"
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.symbol | object | {...} |
| properties.symbol.type | string | string |
| properties.symbol.description | string | 品种合约代码(查询连接 http://demo.konpn.com/symbols.shtml |
| properties.period | object | {...} |
| properties.period.type | string |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.Code | object | {...} |
| properties.Code.type | string | number |
| properties.Code.example | number | 0 |
| properties.Msg | object | {...} |
| properties.Msg.type | string | string |