获取止盈止损订单列表
响应示例
{
"success": false,
"code": 0,
"message": "",
"data": [{
"id": 0,
"orderId": 0,
"symbol": "",
"positionId": 0,
"stopLossPrice": 0.0,
"takeProfitPrice": 0.0,
"state": 0,
"triggerSide": 0,
"positionType": 0,
"vol": 0.0,
"realityVol": 0.0,
"placeOrderId": 0,
"errorCode": 0,
"version": 0,
"isFinished": 0,
"createTime": "",
"updateTime": ""
}]
}
- GET
/api/v1/private/stoporder/list/orders
需要权限: 读取订单信息
请求参数:
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| symbol | string | false | 合约名 |
| is_finished | int | false | 终态标识:0:未完成,1:已完成 |
| state | int | false | 状态:1未触发2已取消3已执行4已失效5执行失败 |
| type | int | false | 仓位类型,1:多仓,2:空仓 |
| start_time | long | false | 开始时间(Unix毫秒时间戳) |
| end_time | long | false | 结束时间(Unix毫秒时间戳) |
| page_num | int | true | 当前页数,默认为1 |
| page_size | int | true | 每页大小,默认20,最大100 |
响应参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| id | long | 止盈止损委托单id |
| symbol | string | 合约名 |
| orderId | long | 限价订单id,如果是根据仓位下的,该值为0 |
| positionId | long | 仓位id |
| lossTrend | int | 止损类型:1最新价2合理价3指数价 |
| profitTrend | int | 止盈类型:1最新价2合理价3指数价 |
| stopLossPrice | decimal | 止损价 |
| takeProfitPrice | decimal | 止盈价 |
| state | int | 状态,1:未触发,2:已取消,3:已执行,4:已失效,5:执行失败 |
| triggerSide | int | 触发方向,0:未触发,1:止盈,2:止损 |
| positionType | int | 仓位类型,1:多仓,2:空仓 |
| vol | decimal | 委托数量 |
| realityVol | decimal | 实际下单数量 |
| placeOrderId | long | 委托成功后订单id |
| errorCode | int | 错误码,0:正常,其他见错误码详情 |
| isFinished | int | 订单状态是否为终态标识(用于查询),0.非终态,1.终态 |
| version | int | 版本号 |
| priceProtect | int | 触发保护:"1","0" |
| profitLossVolType | string | 止盈止损数量类型(SAME: 数量相同;SEPARATE:数量不同) |
| takeProfitVol | decimal | 止盈数量 (profitLossVolType == SEPARATE时处理) |
| stopLossVol | decimal | 止损数量 (profitLossVolType == SEPARATE时处理) |
| createTime | long | 创建时间 |
| updateTime | long | 修改时间 |
| volType | int | 数量类型1、分批止盈止损2、仓位止盈止 |
| takeProfitReverse | int | 止盈反手:1是2否 |
| stopLossReverse | int | 止损反手:1是2否 |
| takeProfitType | int | 止盈类型 0-市价止盈 1-限价止盈 |
| takeProfitOrderPrice | decimal | 限价止盈委托价格 |
| stopLossType | long | 止损类型 0-市价止损 1-限价止损 |
| stopLossOrderPrice | decimal | 限价止损 委托价格 |