跳到主要内容

实盘策略交易列表

GET/research/strategies/{code}/live/trades在线调试
GET https://api.shengkezhi.com/open/v1/research/strategies/STRAT_MOMENTUM_001/live/trades?year=%E7%A4%BA%E4%BE%8B%E5%80%BC&kind=%E7%A4%BA%E4%BE%8B%E5%80%BC
等效 curl
curl "https://api.shengkezhi.com/open/v1/research/strategies/STRAT_MOMENTUM_001/live/trades?year=%E7%A4%BA%E4%BE%8B%E5%80%BC&kind=%E7%A4%BA%E4%BE%8B%E5%80%BC" \
  -H "Authorization: Bearer sk_xxx"

GET /research/strategies/{code}/live/trades — 实盘策略交易列表。

需在请求头携带 Authorization: Bearer sk_xxx

请求参数

参数位置类型必填默认值说明
codepathstring-策略编号
yearquerystring-平仓年份;不传表示全部年份。
kindquerystring-盈亏方向:allwinloss,默认 all

响应 data

字段类型必填说明
itemsLiveTradeItem[]-

调用示例

curl -X GET "https://api.shengkezhi.com/open/v1/research/strategies/STRAT_MOMENTUM_001/live/trades" \
-H "Authorization: Bearer sk_xxx"
{
"code": 0,
"data": {
"items": [
{
"inherited": true,
"kind": "示例值",
"kline_key": "000001.SZ",
"symbol": "000001.SZ",
"year": "示例值",
"交易方向": "示例值",
"平仓价格": 0.12,
"平仓时间": "示例值",
"开仓价格": 0.12,
"开仓时间": "示例值",
"持仓K线数": 1,
"持仓数量": 1,
"盈亏": 0.12
}
]
},
"msg": "ok"
}