Get Take-Profit/Stop-Loss Order List
Response Example
{
"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
Required Permission: View Order Details
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | false | Contract |
| is_finished | int | false | Final-state flag:0: unfinished,1: finished |
| state | int | false | Status:1 untriggered 2 canceled 3 executed 4 invalidated 5 execution failed |
| type | int | false | Position type,1: long,2: short |
| start_time | long | false | Unix millisecond timestamp |
| end_time | long | false | Unix millisecond timestamp |
| page_num | int | true | Current page, default 1 |
| page_size | int | true | Page size, default 20, max 100 |
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | long | TP/SL order id |
| symbol | string | Contract |
| orderId | long | Limit order id; if placed by position, this value is 0 |
| positionId | long | Position id |
| lossTrend | int | Stop-loss type:1 latest price 2 fair price 3 index price |
| profitTrend | int | Take-profit type:1 latest price 2 fair price 3 index price |
| stopLossPrice | decimal | Stop-loss price |
| takeProfitPrice | decimal | Take-profit price |
| state | int | Status,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed |
| triggerSide | int | Trigger direction,0: not triggered,1: take-profit,2: stop-loss |
| positionType | int | Position type,1: long,2: short |
| vol | decimal | Order quantity |
| realityVol | decimal | Actual placed quantity |
| placeOrderId | long | Order id after successful placement |
| errorCode | int | Error code,0: normal,others see error code details |
| isFinished | int | Whether order is in final state (for query),0: non-final,1: final |
| version | int | Version |
| priceProtect | int | Trigger protection:"1","0" |
| profitLossVolType | string | TP/SL quantity type (SAME: same quantity;SEPARATE:different quantities) |
| takeProfitVol | decimal | Take-profit quantity (when profitLossVolType == SEPARATE) |
| stopLossVol | decimal | Stop-loss quantity (when profitLossVolType == SEPARATE) |
| createTime | long | Created time |
| updateTime | long | Updated time |
| volType | int | Quantity type 1、partial TP/SL 2、position TP/SL |
| takeProfitReverse | int | Take-profit reverse: 1 yes 2 no |
| stopLossReverse | int | Stop-loss reverse: 1 yes 2 no |
| takeProfitType | int | Take-profit type 0 - market TP 1 - limit TP |
| takeProfitOrderPrice | decimal | Limit TP order price |
| stopLossType | long | Stop-loss type 0 - market SL 1 - limit SL |
| stopLossOrderPrice | decimal | Limit SL order price |