Modify Order (TRADE)
API Description
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
Method
order.modify
Request
{
"id": "c8c271ba-de70-479e-870c-e64951c753d9",
"method": "order.modify",
"params": {
"apiKey": "HMOchcfiT9ZRZnhjp2XjGXhsOBd6msAhKz9joQaWwZ7arcJTlD2hGPHQj1lGdTjR",
"orderId": 328971409,
"origType": "LIMIT",
"positionSide": "SHORT",
"price": "43769.1",
"priceMatch": "NONE",
"quantity": "0.11",
"side": "SELL",
"symbol": "BTCUSDT",
"timestamp": 1703426755754,
"signature": "d30c9f0736a307f5a9988d4a40b688662d18324b17367d51421da5484e835923"
}
}
Request Weight
1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 0 on IP rate limit(x-mbx-used-weight-1m)
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| orderId | LONG | NO | |
| origClientOrderId | STRING | NO | |
| symbol | STRING | YES | |
| side | ENUM | YES | SELL, BUY |
| quantity | DECIMAL | YES | Order quantity, cannot be sent with closePosition=true |
| price | DECIMAL | YES | |
| priceMatch | ENUM | NO | only avaliable for LIMIT/STOP/TAKE_PROFIT order; can be set to OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20: /QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20; Can't be passed together with price |
| modifyId | INT | NO | User-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness. |
| reduceOnly | STRING | NO | See notes below for behavior. |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
- Either
orderIdororigClientOrderIdmust be sent, and theorderIdwill prevail if both are sent.- Both
quantityandpricemust be sent. (After CM migration, the dapi modify order endpoint follows the same rule.)- When the new
quantityorpricedoesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.- However the order will be cancelled by the amendment in the following situations:
- when the order is in partially filled status and the new
quantity<=executedQty- When the order is
GTXand the new price will cause it to be executed immediately- One order can only be modfied for less than 10000 times
modifyIdis an optional user-defined identifier passed through as-is; the server does not validate its uniqueness. If omitted, it is not included in the response.reduceOnlybehavior:
falseor omitted: behave as today —min_notionalis enforced on the modified order.trueand the original order'sreduceOnlyattribute is alsotrue(consistent): themin_notionalcheck is skipped on the modified order, matching placement semantics.truebut the original order'sreduceOnlyattribute isfalse(inconsistent): the modify request is rejected with error code-5047, "The original order is not a reduce-only order".reduceOnlyis used purely for validation — passingtruedoes not change the original order'sreduceOnlyattribute; that flag remains whatever it was set to at placement time.
Response Example
{
"id": "c8c271ba-de70-479e-870c-e64951c753d9",
"status": 200,
"result": {
"orderId": 328971409,
"symbol": "BTCUSDT",
"status": "NEW",
"clientOrderId": "xGHfltUMExx0TbQstQQfRX",
"modifyId": 1, //user-defined modification identifier, only returned if provided in the request
"price": "43769.10",
"origQty": "0.110",
"executedQty": "0.000",
"cumQty": "0.000",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "SELL",
"positionSide": "SHORT",
"stopPrice": "0.00",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"priceMatch": "NONE",
"selfTradePreventionMode": "EXPIRE_MAKER",
"goodTillDate": 0,
"updateTime": 1703426756190
},
"rateLimits": [
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 300,
"count": 1
},
{
"rateLimitType": "ORDERS",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 1200,
"count": 1
},
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 2400,
"count": 1
}
]
}