Cancel an Existing Order and Send a New Order (Trade)
Cancels an existing order and places a new order on the same symbol.
Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs.
A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1.
Weight(IP): 1
Query parameters
Trading symbol, e.g. BNBUSDT
Order type
- STOP_ON_FAILURE If the cancel request fails, the new order placement will not be attempted.
- ALLOW_FAILURES If new order placement will be attempted even if cancel request fails.
Order time in force
Order quantity
Quote quantity
Order price
Used to uniquely identify this cancel. Automatically generated by default
Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.
Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.
Used to uniquely identify this cancel. Automatically generated by default
The value cannot be less than 1000000.
Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK.
The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE.
The value cannot be greater than 60000
UTC timestamp in ms
Signature
Response
Operation details
Example response
{
"cancelResult": "SUCCESS",
"newOrderResult": "SUCCESS",
"cancelResponse": {
"symbol": "BTCUSDT",
"origClientOrderId": "DnLo3vTAQcjha43lAZhZ0y",
"orderId": 9,
"orderListId": -1,
"clientOrderId": "osxN3JXAtJvKvCqGeMWMVR",
"price": "0.01000000",
"origQty": "0.000100",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL",
"selfTradePreventionMode": "NONE",
"transactTime": 1507725176595
},
"newOrderResponse": {
"symbol": "BTCUSDT",
"orderId": 10,
"orderListId": -1,
"clientOrderId": "wOceeeOzNORyLiQfw7jd8S",
"transactTime": 1652928801803,
"price": "0.02000000",
"origQty": "0.040000",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"workingTime": 1669277163808,
"selfTradePreventionMode": "NONE"
}
}