Skip to main content

Modify Trigger Order

Speed limit is 10 times/s (UID)

Description

Interface for trigger order modification, used to modify an pending order, such as its TP/SL and/or triggerPrice.

HTTP Request

  • POST /api/v2/mix/order/modify-plan-order
Request Example
curl -X POST "https://api.cointr.com/api/v2/mix/order/modify-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",
"orderId": "123",
"clientOid": "321123",
"symbol": "ethusdt",
"productType": "usdt-futures",
"newSize": "3",
"newPrice": "2001",
"newCallbackRatio": "",
"newTriggerPrice": "2000",
"newTriggerType": "fill_price",
"newPresetStopSurplusPrice": "2049",
"newStopSurplusTriggerPrice": "2050",
"newStopSurplusTriggerType": "mark_price",
"newPresetStopLossPrice": "5",
"newStopLossTriggerPrice": "1970",
"newStopLossTriggerType": "mark_price"
}'

Request Parameters

ParameterTypeRequiredDescription
orderIdStringNoTrigger order ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
clientOidStringNoCustomized trigger order ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
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
newSizeStringNoAmount of the modified transaction
If it is empty, the amount remains unchanged.
newPriceStringNoModified price for executing orders.
1: When the original order is a trigger order and its type is Limit, the original price remains unchanged when this field is empty.
Must be empty if the order type is Market.
2: When the original order is a trailing order, it must be empty.
newCallbackRatioStringNoModified callback rate (for trailing stop orders only)
1. When the original order is a trailing stop order, it must be filled in, and the rate must not be greater than 10.
2: When the original order is a trigger order, it must be empty.
newTriggerPriceStringNoModified trigger price
1. When the original order is a trigger order or a trailing stop order, if the field is not set, the price stays unchanged; if it is set, the price updates.
newTriggerTypeStringNoModified trigger type
1. When the original order is a trigger order or a trailing stop order, if the field is not set, the type stays unchanged; if it is set, the type updates.
Setting this parameter requires the setting of newTriggerPrice.
fill_price: filled price
mark_price: mark price
newSurplusTriggerPriceStringNoModified take-profit trigger price
1. If the field is left empty: when the original order has the TP set, the original value will be maintained.
2. If it is not empty: when the original order has the TP set, the TP will update; when the original order doesn't have the TP set, the TP will be added. If 0 is filled in, the original TP setting will be removed.
newStopSurplusExecutePriceStringNoModified take-profit strike price
1. This parameter must be empty when the original order is a trailing stop order.
2.For a trigger order, if this field is filled in, the price will update; if not filled in, the price stays unchanged; if 0 is filled in, the price setting will be removed.
newStopSurplusTriggerTypeStringNoModified take-profit trigger type
Default to the transaction price
1. This parameter must be empty when the original order is a trailing stop order.
2. For a trigger order that has newStopSurplusTriggerPrice parameter set, it is required.
fill_price: filled price
mark_price: mark price
newStopLossTriggerPriceStringNoModified stop-loss trigger price
1. If the field is left empty: when the original order has the SL set, the original value will be maintained.
2. If it is not empty: when the original order has the SL set, the SL will update; when the original order doesn't have the SL set, the SL will be added. If 0 is filled in, the original SL setting will be removed.
newStopLossExecutePriceStringNoModified stop-loss strike price
1. This parameter must be empty when the original order is a trailing stop order.
2.For a trigger order, if this field is filled in, the price will update; if not filled in, the price stays unchanged; if 0 is filled in, the SL setting will be removed.
newStopLossTriggerTypeStringNoModified stop-loss trigger type
Default to the transaction price
1. This parameter must be empty when the original order is a trailing stop order.
2. For a trigger order that has newStopLossTriggerPrice parameter set, it is required.
fill_price: filled price
mark_price: mark price
Response Example
{
"code": "00000",
"data": {
"orderId": "21627293504612",
"clientOid": "COINTR#1627293504612"
},
"msg": "success",
"requestTime": 1627293504612
}

Response Parameters

ParameterTypeDescription
orderIdStringTrigger order ID
clientOidStringCustomized trigger order ID