Skip to main content

TP/SL plan orders

Sample

{
"channel": "push.personal.stop.planorder",
"data": {
"id": 987654321,
"orderId": 123456789,
"symbol": "BTC_USDT",
"positionId": 456789123,
"lossTrend": 1,
"profitTrend": 2,
"stopLossPrice": 42000.0,
"takeProfitPrice": 48000.0,
"state": 1,
"triggerSide": 1,
"positionType": 1,
"vol": 10,
"takeProfitVol": 10,
"stopLossVol": 10,
"realityVol": 10,
"placeOrderId": 987654321,
"version": 1,
"isFinished": 0,
"profitLossVolType": "SAME",
"volType": 1,
"takeProfitReverse": 2,
"stopLossReverse": 2,
"closeTryTimes": 0,
"reverseTryTimes": 0,
"reverseErrorCode": 0,
"stopLossType": 1,
"stopLossOrderPrice": 41990.0,
"createTime": 1760942212000,
"updateTime": 1760942212000
},
"ts": 1760942212000
}

channel = push.personal.stop.planorder

Response fields:

FieldTypeDescription
idlongPrimary ID
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition ID
lossTrendintSL reference type
profitTrendintTP reference type
stopLossPricedecimalSL price
takeProfitPricedecimalTP price
stateintState
triggerSideintTrigger direction: 1 TP, 2 SL
positionTypeintPosition type
voldecimalQuantity
takeProfitVoldecimalTP quantity
stopLossVoldecimalSL quantity
realityVoldecimalActual placed quantity
placeOrderIdlongActual placed order ID
versionintVersion
isFinishedintCompleted
profitLossVolTypestringTP/SL qty type (SAME / SEPARATE)
volTypeint1 staged TP/SL, 2 position TP/SL
takeProfitReverseintTP reverse: 1 yes, 2 no
stopLossReverseintSL reverse: 1 yes, 2 no
closeTryTimesintClose retry count
reverseTryTimesintReverse retry count
reverseErrorCodeintReverse open error code (0 default)
stopLossTypeint0 market SL, 1 limit SL
stopLossOrderPricedecimalLimit SL price
createTimelongCreate time
updateTimelongUpdate time