Skip to main content

Place Trigger Order

Rate limit: 10 req/sec/UID

Description

The interface for placing an trigger or trailing stop order with TP/SL setting feature.

HTTP Request

  • POST /api/v2/mix/order/place-plan-order
Request Example
curl -X POST "https://api.bitget.com/api/v2/mix/order/place-plan-order" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{ "planType":"normal_plan", "symbol": "BTCUSDT", "productType": "USDT-FUTURES", "marginMode": "isolated", "marginCoin": "USDT", "size": "0.01", "price": "24000", "callbackRatio": "", "triggerPrice": "24100", "triggerType": "mark_price", "side": "buy", "tradeSide": "open", "orderType":"limit", "clientOid": "121212121212", "reduceOnly": "NO", "presetStopSurplusPrice": "", "stopSurplusTriggerPrice": "", "stopSurplusTriggerType": "", "presetStopLossPrice": "", "stopLossTriggerPrice": "", "stopLossTriggerType": "" }'

Request Parameters

ParameterTypeRequiredDescription
planTypeStringYesTrigger order type
normal_plan: Trigger order
track_plan: Trailing stop order
symbolStringYesTrading pair, e.g. ETHUSDT
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
marginModeStringYesPosition mode
isolated: isolated margin
crossed: cross margin
marginCoinStringYesMargin coin
sizeStringYesAmount(base coin)
priceStringNoPrice
1. For track_plan, it must be empty.
2. For normal_plan, it is required when orderType is limit;It must be empty when orderType is market.
callbackRatioStringNoCallback rate (applies to trailing stop orders only)
1. Required for trailing stop orders and the rate cannot be greater than 10.
triggerPriceStringYesTrigger price
triggerTypeStringYesTrigger type
1. Required when placing a trigger order or a trailing stop order.
mark_price: Mark price
fill_price: Lastest price
sideStringYesOrder direction
buy; sell
tradeSideStringNoDirection
open: Open; close: Close
1. Only required in hedge position mode
Notes:
For open long, "side" fill in "buy"; tradeSide should be "open"
For open short, "side" fill in "sell"; tradeSide should be "open"
For close long, "side" fill in "buy"; "tradeSide" should be "close"
For close short, "side" fill in "sell"; "tradeSide" should be "close"
orderTypeStringYesOrder type
limit: limit order
market: market order
1. For track_plan, it is required and must be market
clientOidStringNoCustomize order ID
reduceOnlyStringNoWhether or not to just reduce the position.
yes: Yes; no: No(default)
1. Only applicable in buy/sell (one-way position) mode
stopSurplusTriggerPriceStringNoTake-profit trigger price/Take-profit ratio
1. For normal_plan, it represents the take-profit trigger price
2. For track_plan, it represents the take-profit percentage, with a maximum of 999.99 and a minimum of 0.01
3. If left empty or set to 0, no take-profit will be set by default
stopSurplusExecutePriceStringNoTake-profit execute price
1. For track_plan, it must be empty.
2. For a normal_plan that has stopSurplusTriggerPrice parameter set, if it is empty or set to 0, it represents a market order execution; if not empty and greater than 0, it represents a limit order execution
stopSurplusTriggerTypeStringNoTake-profit trigger type
fill_price: Lastest price
mark_price: Mark price
1. For orders that have stopSurplusTriggerPrice parameter set, it is required
2. For track_plan, it only accepts fill_price
stopLossTriggerPriceStringNoStop-loss trigger price/Stop-loss ratio
1. For normal_plan, it represents the stop-loss trigger price
2. For track_plan, it represents the stop-loss percentage, with a maximum of 999.99 and a minimum of 0.01
3. If left empty or set to 0, no stop-loss will be set by default
stopLossExecutePriceStringNoStop-loss execute price
1. For track_plan, it must be empty.
2. For a normal_plan that has stopLossTriggerPrice parameter set, if it is empty or set to 0, it represents a market order execution; if not empty and greater than 0, it represents a limit order execution
stopLossTriggerTypeStringNoStop-loss trigger type
fill_price: Lastest price
mark_price: Mark price
1. For orders that have stopLossTriggerPrice parameter set, it is required
2. For track_plan, it only accepts fill_price
stpModeStringNoSTP Mode
none not setting STP(default)
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#121212121212"
},
"msg": "success",
"requestTime": 1627293504612
}

Response Parameters

ParameterTypeDescription
orderIdStringTrigger order ID
clientOidStringCustomized trigger order ID