Skip to main content

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:

ParameterTypeRequiredDescription
symbolstringfalseContract
is_finishedintfalseFinal-state flag:0: unfinished,1: finished
stateintfalseStatus:1 untriggered 2 canceled 3 executed 4 invalidated 5 execution failed
typeintfalsePosition type,1: long,2: short
start_timelongfalseUnix millisecond timestamp
end_timelongfalseUnix millisecond timestamp
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
idlongTP/SL order id
symbolstringContract
orderIdlongLimit order id; if placed by position, this value is 0
positionIdlongPosition id
lossTrendintStop-loss type:1 latest price 2 fair price 3 index price
profitTrendintTake-profit type:1 latest price 2 fair price 3 index price
stopLossPricedecimalStop-loss price
takeProfitPricedecimalTake-profit price
stateintStatus,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed
triggerSideintTrigger direction,0: not triggered,1: take-profit,2: stop-loss
positionTypeintPosition type,1: long,2: short
voldecimalOrder quantity
realityVoldecimalActual placed quantity
placeOrderIdlongOrder id after successful placement
errorCodeintError code,0: normal,others see error code details
isFinishedintWhether order is in final state (for query),0: non-final,1: final
versionintVersion
priceProtectintTrigger protection:"1","0"
profitLossVolTypestringTP/SL quantity type (SAME: same quantity;SEPARATE:different quantities)
takeProfitVoldecimalTake-profit quantity (when profitLossVolType == SEPARATE)
stopLossVoldecimalStop-loss quantity (when profitLossVolType == SEPARATE)
createTimelongCreated time
updateTimelongUpdated time
volTypeintQuantity type 1、partial TP/SL 2、position TP/SL
takeProfitReverseintTake-profit reverse: 1 yes 2 no
stopLossReverseintStop-loss reverse: 1 yes 2 no
takeProfitTypeintTake-profit type 0 - market TP 1 - limit TP
takeProfitOrderPricedecimalLimit TP order price
stopLossTypelongStop-loss type 0 - market SL 1 - limit SL
stopLossOrderPricedecimalLimit SL order price