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
Parameter | Type | Required | Description |
---|---|---|---|
planType | String | Yes | Trigger order type normal_plan: average trigger order track_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 mode isolated: isolated margin cross: cross margin |
marginCoin | String | Yes | Margin coin |
size | String | Yes | Amount |
price | String | No | Strike 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. |
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 1. Required when placing a trigger order or a trailing stop order. |
triggerType | String | Yes | Trigger 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 |
side | String | Yes | Order direction Buy; Sell |
tradeSide | String | No | Direction 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" |
orderType | String | Yes | Order 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 |
clientOid | String | No | Customize order ID |
reduceOnly | String | No | Whether 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. |
stopSurplusTriggerPrice | String | No | Take-profit trigger price No take-profit is set if the field is empty. |
stopSurplusExecutePrice | String | No | Take-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. |
stopSurplusTriggerType | String | No | Take-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 |
stopLossTriggerPrice | String | No | Stop-loss trigger price No take-profit is set if the field is empty. |
stopLossExecutePrice | String | No | Stop-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. |
stopLossTriggerType | String | No | Stop-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 |
stpMode | String | No | STP 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
Parameter | Type | Description |
---|---|---|
orderId | String | Trigger order ID |
clientOid | String | Customized trigger order ID |