1. 主页
  2. 文档
  3. RESTful API
  4. 历史K线数据接口

历史K线数据接口

路径:/klines

请求方式:GET

示例:

http://data.api.dsxquant.com/klines?symbol=sh000001

参数:

字段类型必需默认值备注
symbolstrY股票代码
marketintN0市场代码
0=上交所 1=深交所 2=北交所
fqstrN复权类型 qfq=前复权 hfq=后复权
cyclestrNday周期
t=分时线
t5=五日分时线
day=日K
week=周K
month=月K
year=年K
m1=1分钟K
m5=5分钟K
m15=15分钟K
m30=30分钟K
m60=60分钟K
pageintN1页码
page_sizeintN300每页大小
startstrN开始日期
endstrN结束日期

返回值:

{
	"act": "klines",
	"data": [
		"20230508,3340.9904,3400.1766,3340.9904,3395.0036,5341036.59,564661993453.0",
		"20230505,3350.65,3364.14,3321.19,3334.50,436504494,499294437376.00",
		"20230504,3306.48,3352.75,3302.03,3350.46,483364916,550494863360.00",
		"20230428,3283.12,3324.88,3283.12,3323.27,401554785,514904621056.00",
		"20230427,3256.23,3299.30,3253.11,3285.88,341590534,466175361024.00",
		"20230426,3255.22,3277.98,3239.99,3264.10,357917842,480418136064.00",
		"20230425,3276.40,3288.57,3229.45,3264.87,380895729,494240137216.00",
		"20230424,3300.81,3303.09,3264.93,3275.41,354255626,473265995776.00",
		....
	],
	"error_code": 0,
	"msg": "缓存数据",
	"request_id": 1683540476424057185,
	"success": true
}

字段说明:

数组内字段排列:

[日期,开,高,低,收,成交量,成交额]

这篇文章对您有用吗?

我们要如何帮助您?