跳到主要内容

交易 K 线窗口

GET/research/experiments/{id}/strategies/{code}/trades/{kline_key}/kline在线调试
GET https://api.shengkezhi.com/open/v1/research/experiments/{id}/strategies/{code}/trades/{kline_key}/kline
等效 curl
curl "https://api.shengkezhi.com/open/v1/research/experiments/{id}/strategies/{code}/trades/{kline_key}/kline" \
  -H "Authorization: Bearer sk_xxx"

GET /research/experiments/{id}/strategies/{code}/trades/{kline_key}/kline — 交易 K 线窗口。

需在请求头携带 Authorization: Bearer sk_xxx

路径参数

参数必填说明
id执行 ID
code编码
kline_keyK 线窗口标识

响应

响应 dataKlineWindow

字段类型必填说明
barsKlineBar[]出入场前后截取的 K 线窗口序列,按时间升序。
entry
exit
symbolstring该笔交易的标的代码。

调用示例

curl "https://api.shengkezhi.com/open/v1/research/experiments/experiment-20260724-001/strategies/TS_1D_4E70093D/trades/600519.SH%7C2026-01-03T00%3A00%3A00%7C2026-01-05T00%3A00%3A00/kline" -H "Authorization: Bearer sk_xxx"
{
"code": 0,
"data": {
"bars": [
{
"amount": 1000.0,
"c": 10.2,
"h": 10.5,
"l": 9.5,
"o": 10.0,
"time": "2026-01-01T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 11.2,
"h": 11.5,
"l": 10.5,
"o": 11.0,
"time": "2026-01-02T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 12.2,
"h": 12.5,
"l": 11.5,
"o": 12.0,
"time": "2026-01-03T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 13.2,
"h": 13.5,
"l": 12.5,
"o": 13.0,
"time": "2026-01-04T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 14.2,
"h": 14.5,
"l": 13.5,
"o": 14.0,
"time": "2026-01-05T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 15.2,
"h": 15.5,
"l": 14.5,
"o": 15.0,
"time": "2026-01-06T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 16.2,
"h": 16.5,
"l": 15.5,
"o": 16.0,
"time": "2026-01-07T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 17.2,
"h": 17.5,
"l": 16.5,
"o": 17.0,
"time": "2026-01-08T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 18.2,
"h": 18.5,
"l": 17.5,
"o": 18.0,
"time": "2026-01-09T00:00:00",
"vol": 100.0,
"weight": 1.0
},
{
"amount": 1000.0,
"c": 19.2,
"h": 19.5,
"l": 18.5,
"o": 19.0,
"time": "2026-01-10T00:00:00",
"vol": 100.0,
"weight": 1.0
}
],
"entry": {
"price": 10.0,
"side": "long",
"time": "2026-01-03T00:00:00"
},
"exit": {
"price": 11.0,
"time": "2026-01-05T00:00:00"
},
"symbol": "600519.SH"
},
"msg": "ok"
}