Skip to main content

Modify Order

Speed limit is 10 times/s for average users. Frequency limit imposed according to user ID

Description

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

  • Modifying size and price will cancel the old order; then create a new order asynchronously, modify the preset TPSL will not cancel the old order.
  • Modifying size and price, please pass in both, not just one of them
  • Modify the order price, size and preset TPSL according to orderId or clientOId
  • It is only allowed to modify the new status limit order. If the price and size of the order are modified, the old order will be canceled and a new order will be created. Set TPSL will not be changed
  • Modify the limit order price and size, please be sure to provide newClientOid because the orderId of the new order cannot be returned synchronously, so you need to use newClientOid to help you query order information
  • Modifying the order size needs to meet the minimum order quantity
  • If you only modify the TPSL, please do not pass price and size, if you only pass TP or SL , the other one will be canceled

HTTP Request

  • POST /api/v2/mix/order/modify-order
Request Example
curl -X POST "https://api.cointr.com/api/v2/mix/order/modify-order" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{ "orderId": "1","newClientOid": "1212112121223", "symbol": "ETHUSDT", "productType": "usdt-futures", "marginCoin": "USDT", "newSize": "0.04", "newPrice": "1800.00" }'

Request Parameters

ParameterTypeRequiredDescription
orderIdStringNoOrder ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
clientOidStringNoCustomize order ID
Either orderId or clientOid is required. If both are entered, orderId prevails.
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
newClientOidStringYesNew customized order ID after order modification
newSizeStringNoAmount of the modified transaction
The amount stays unchanged if the field if left blank.
newPriceStringNoModified price for placing new orders.
1. When the existing order type is Limit, the original price will be maintained if the field is left empty.
2. When the existing order type is Limit market, the field should not be set.
newPresetStopSurplusPriceStringNoModifying take-profit
1. If the original order has take-profit set and the field is empty, the original value will be kept.
2. If the original order has take-profit set and the field is filled in with a value, TP will be updated; if the original order has take-profit set and the field is not set, a new take-profit value will be added.
If there was a TP value and a 0 is filled in the filled, the existing TP will be deleted.
newPresetStopLossPriceStringNoModifying stop-loss
1. If the original order has stop-loss set and the field is empty, the original value will be kept.
2. If the original order has stop-loss set and the field is filled in with a value, TP will be updated; if the original order has stop-loss set and the field is not set, a new stop-loss value will be added.
If there was a SL value and a 0 is filled in the filled, the existing SL will be deleted.
Response Example
{
"code": "00000",
"data": {
"orderId": "121212121212",
"clientOid": "COINTR#121212121212"
},
"msg": "success",
"requestTime": 1627293504612
}

Return Parameter

ParameterTypeDescription
orderIdStringOrder ID
clientOidStringCustomize order ID