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
Parameter | Type | Required | Description |
---|---|---|---|
planType | String | Yes | Trigger order typenormal_plan : Trigger ordertrack_plan : Trailing stop order |
symbol | String | Yes | Trading pair, e.g. ETHUSDT |
productType | String | Yes | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
marginMode | String | Yes | Position modeisolated : isolated margin crossed : cross margin |
marginCoin | String | Yes | Margin coin |
size | String | Yes | Amount(base coin) |
price | String | No | Price 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 . |
callbackRatio | String | No | Callback rate (applies to trailing stop orders only) 1. Required for trailing stop orders and the rate cannot be greater than 10. |
triggerPrice | String | Yes | Trigger price |
triggerType | String | Yes | Trigger type 1. Required when placing a trigger order or a trailing stop order. mark_price: Mark price fill_price: Lastest price |
side | String | Yes | Order directionbuy ; sell |
tradeSide | String | No | Directionopen : Open; close : Close1. 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" |
orderType | String | Yes | Order typelimit : limit ordermarket : market order1. For track_plan , it is required and must be market |
clientOid | String | No | Customize order ID |
reduceOnly | String | No | Whether or not to just reduce the position.yes : Yes; no : No(default)1. Only applicable in buy/sell (one-way position) mode |
stopSurplusTriggerPrice | String | No | Take-profit trigger price/Take-profit ratio 1. For normal_plan , it represents the take-profit trigger price2. For track_plan , it represents the take-profit percentage, with a maximum of 999.99 and a minimum of 0.013. If left empty or set to 0, no take-profit will be set by default |
stopSurplusExecutePrice | String | No | Take-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 |
stopSurplusTriggerType | String | No | Take-profit trigger typefill_price : Lastest pricemark_price : Mark price1. For orders that have stopSurplusTriggerPrice parameter set, it is required 2. For track_plan , it only accepts fill_price |
stopLossTriggerPrice | String | No | Stop-loss trigger price/Stop-loss ratio 1. For normal_plan , it represents the stop-loss trigger price2. For track_plan , it represents the stop-loss percentage, with a maximum of 999.99 and a minimum of 0.013. If left empty or set to 0, no stop-loss will be set by default |
stopLossExecutePrice | String | No | Stop-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 |
stopLossTriggerType | String | No | Stop-loss trigger typefill_price : Lastest pricemark_price : Mark price1. For orders that have stopLossTriggerPrice parameter set, it is required 2. For track_plan , it only accepts fill_price |
stpMode | String | No | STP 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
Parameter | Type | Description |
---|---|---|
orderId | String | Trigger order ID |
clientOid | String | Customized trigger order ID |