Skip to main content

Stop-profit and stop-loss plan orders

Speed limit is 10 times/s (UID)

Description

Place a stop-profit and stop-loss plan order

HTTP Request

  • POST /api/v2/mix/order/place-tpsl-order
Request Example
curl -X POST "https://api.bitget.com/api/v2/mix/order/place-tpsl-order" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{"marginCoin": "USDT","productType": "usdt-futures","symbol": "ethusdt","planType": "profit_plan","triggerPrice": "2000","triggerType": "mark_price","executePrice": "0","holdSide": "long","size": "1","rangeRate": "","clientOid": "1234"}'

Request Parameters

ParameterTypeRequiredDescription
marginCoinStringYesMargin currency (Capitalized)
productTypeStringYesProduct type
usdt-futures USDT professional futures
coin-futures Mixed futures
usdc-futures USDC professional futures
susdt-futures USDT professional futures demo
scoin-futures Mixed futures demo
susdc-futures USDC professional futures demo
symbolStringYesTrading pair, e.g. ETHUSDT
planTypeStringYesTake profit and stop loss type
profit_plan: take profit plan;
loss_plan: stop loss plan;
moving_plan: trailing stop;
pos_profit: position take profit;
pos_loss: position stop loss
triggerPriceStringYesTrigger price
triggerTypeStringNoTrigger type
fill_price: market price;
mark_price: mark price
executePriceStringNoExecution price
If it is 0 or not filled in, it means market price execution.If it is greater than 0, it means limit price execution.
Do not fill in this parameters when planType is moving_plan, it only executs in market price.
holdSideStringYesTwo-way position:(long: long position, short: short position)
one-way position: (buy: long position, sell: short position)
sizeStringYesOrder quantity(base coin)
It's required when planType is profit_plan, loss_plan or moving_plan,and should be greater than 0;
It's NOT required when planType is pos_profit or pos_loss
rangeRateStringNoCallback range
It's required only in planType is moving_plan
clientOidStringNoCustomize order ID
stpModeStringNoSTP Mode, default none
none not setting STP
cancel_taker cancel taker order
cancel_maker cancel maker order
cancel_both cancel both of taker and maker orders
Response Example
{
"code": "00000",
"data": {
"orderId": "121212121212",
"clientOid": "BITGET#1627293504612"
},
"msg": "success",
"requestTime": 1627293504612
}

Response Parameters

ParameterTypeDescription
orderIdStringTrigger order ID
clientOidStringCustomized trigger order ID

How was your Reading Experience with us?