Skip to main content

Place Trigger Order

Speed limit is 10 times/s (UID)

Description

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

HTTP Request

  • POST /api/v2/mix/order/place-plan-order
Request Example
curl -X POST "https://api.cointr.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: average 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
cross: cross margin
marginCoinStringYesMargin coin
sizeStringYesAmount
priceStringNoStrike price
1. For trailing stop orders, it must be empty.
2. For trigger orders, it is required when orderType is Limit; 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
1. Required when placing a trigger order or a trailing stop order.
triggerTypeStringYesTrigger type
1. Required when placing a trigger order or a trailing stop order.
mark_price: mark price
fill_price: filled price
index_price: index price
sideStringYesOrder direction
Buy; Sell
tradeSideStringNoDirection
1. Required in open and close (hedge mode position) mode.
Considered buy/sell (one-way position) mode if left blank.
Open and Close
Notes:
For open long, fill in"Buy"; tradeSide should be "Open"
For open short, fill in "Sell"; tradeSide should be "Open"
For close long, fill in "Buy"; tradeSide should be "Close"
For close short, fill in "Sell"; tradeSide should be "Close"
orderTypeStringYesOrder type
1. If you are placing a trailing stop order, it is required and must be market.
2. For an ordinary trigger order, it is required and can be any type.
limit
market
clientOidStringNoCustomize order ID
reduceOnlyStringNoWhether or not to just reduce the position.
YES; NO
Default: NO.
1. Only applicable in buy/sell (one-way position) mode.
2. Must be empty or "no" in open and close position (hedge mode position) mode.
stopSurplusTriggerPriceStringNoTake-profit trigger price
No take-profit is set if the field is empty.
stopSurplusExecutePriceStringNoTake-profit strike price
1. For trailing stop orders, it must be empty.
2. For a trigger order that has stopSurplusTriggerPrice parameter set, it is required.
stopSurplusTriggerTypeStringNoTake-profit trigger type
Default to the transaction price
1. For trailing stop orders, it must be empty.
2. For a trigger order that has stopSurplusTriggerPrice parameter set, it is required.
fill_price: filled price
mark_price: mark price
index_price: index price
stopLossTriggerPriceStringNoStop-loss trigger price
No take-profit is set if the field is empty.
stopLossExecutePriceStringNoStop-loss strike price
1. For trailing stop orders, it must be empty.
2. For a trigger order that has stopLossTriggerPrice parameter set, it is required.
stopLossTriggerTypeStringNoStop-loss trigger type
Default to the transaction price
1. For trailing stop orders, it must be empty.
2. For a trigger order that has stopLossTriggerPrice parameter set, it is required.
fill_price: filled price
mark_price: mark price
index_price: index price
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": "COINTR#121212121212"
},
"msg": "success",
"requestTime": 1627293504612
}

Response Parameters

ParameterTypeDescription
orderIdStringTrigger order ID
clientOidStringCustomized trigger order ID