获取当前止盈止损订单列表
响应示例
{
"success": true,
"code": 0,
"data": [
{
"id": 357859177,
"orderId": "720733527158642176",
"symbol": "BTC_USDT",
"positionId": "1027177055",
"lossTrend": 1,
"profitTrend": 1,
"stopLossPrice": 111325,
"takeProfitPrice": 113573.9,
"state": 3,
"triggerSide": 2,
"positionType": 1,
"vol": 2,
"realityVol": 2,
"placeOrderId": "720744238723187712",
"errorCode": 0,
"version": 2,
"isFinished": 1,
"priceProtect": 0,
"profitLossVolType": "SEPARATE",
"takeProfitVol": 2,
"stopLossVol": 2,
"createTime": 1757506663000,
"updateTime": 1757509217000,
"volType": 1,
"takeProfitReverse": 2,
"stopLossReverse": 2,
"closeTryTimes": 0,
"reverseTryTimes": 0,
"reverseErrorCode": 0,
"takeProfitType": 0,
"profit_LOSS_VOL_TYPE_SAME": "SAME",
"profit_LOSS_VOL_TYPE_DIFFERENT": "SEPARATE"
}
]
}
- GET
/api/v1/private/stoporder/open_orders
需要权限: 读取订单信息
请求参数:
| 参数名 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| symbol | string | false | 合约名 |
响应参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| 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 | 限价止损 委托价格 |