# Modify Order Channel

### Description

**Asynchronous Order Modification:**
- Order modifications are executed asynchronously. Even after receiving a successful acknowledgment (ACK) response, the final modification may still fail.
- No additional notification will be sent in case of failure, but you may receive order fill or cancellation updates (e.g., if the order is canceled or fully filled before the modification request takes effect).
- It is recommended to query the current order status via REST API to confirm whether the modification was successful: If the order still exists, you can retry; if it does not exist, it indicates the order has been filled or canceled, and no further action is needed.

<div className="api-aligning">

```json title="Request Example"
{
    "args": [
        {
            "autoCancel": "yes",
            "clientOid": "135423791666666666",
            "orderId": "1354237910666666666",
            "price": "5",
            "qty": "2",
            "requestId": 12345678,
            "symbol":"BTCUSDT"
        }
    ],
    "id": "ae5ea6df-215f-4750-a700-d487d03ac020",
    "op": "trade",
    "category": "usdt-futures",
    "topic": "modify-order"
}
```

### Request Parameters

| Parameter       | Type               | Required | Description                                                                                                                                                                                           | 
|:----------------|:-------------------|----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| op              | String             | Yes      | Operation: <br/> `trade`                                                                                                                                                                              |
| id              | String             | Yes      | Request identifier                                                                                                                                                                                    |
| topic           | String             | Yes      | Topic<br/> `modify-order`                                                                                                                                                                             |
| category        | String             | No       | Business line, **lowercase only**<br/>`spot` Spot trading<br/>`margin` Margin trading<br/> `usdt-futures` USDT Futures<br/>`coin-futures` Coin-M futures<br/>`usdc-futures` USDC Futures                                 |
| args            | List&lt;Object&gt; | Yes      | Channel list                                                                                                                                                                                          |
| &gt; orderId    | String             | No       | Order ID <br/>Either orderId or clientOid is required.<br/>If both orderId and clientOid are passed simultaneously, orderId takes higher priority, and the clientOid parameter will be ignored.       |
| &gt; clientOid  | String             | No       | Client order ID<br/>Either orderId or clientOid is required.<br/>If both orderId and clientOid are passed simultaneously, orderId takes higher priority, and the clientOid parameter will be ignored. |
| &gt; qty        | String             | No       | Order quantity<br/>- Spot<br/> For market buy orders, the unit is quote coin <br/>For limit and market sell orders, the unit is base coin <br/>- Futures<br/>The unit is base coin                    |
| &gt; price      | String             | No       | Order price<br/>This field is required when orderType is `limit`                                                                                                                                      |
| &gt; autoCancel | String             | No       | Will the original order be canceled if the order modification fails<br/>`yes`: Cancel <br/>`no`: Not cancel（default）<br/>When set to `yes`: if the matching engine fails to modify the order, the order is cancelled immediately; after cancellation, the counter will reject any further modification requests for that order (including in-flight and new requests). |
| &gt; symbol     | String             | No       | Symbol name, case-insensitive                                                                                                                                                                                           |
| &gt; requestId  | Number             | No       | Custom request ID used to identify the order modification request<br/>Only supports numbers within 18 digits<br/>Returned when autoCancel=yes and the modify order request is rejected                                                                                                            |
| &gt; pxAmendType | String           | No       | Order price amendment type<br/>`no` When the order price exceeds the price limit range, the system is not allowed to adjust the order price; the order will be rejected (default)<br/>`yes` When the order price exceeds the price limit range, the system is allowed to adjust the price to the best value within the limit range and place the order<br/>Only applicable to limit orders (`orderType`=`limit`) |

</div>


<div className="api-aligning">

```json title="Response Example"
{
  "event": "trade",
  "id": "ae5ea6df-215f-4750-a700-d487d03ac020",
  "topic": "modify-order",
  "args": [
    {
      "orderId": "135423791666666666",
      "clientOid": "1354237910666666666",
      "requestId": 12345678,
      "receiveTime": "1750034396998123",
      "pushTime": "1750034397076456"
    }
  ],
  "code": "0",
  "msg": "Success",
  "connId": "xxxxxxxxxx",
  "rateLimit": [
    {
      "limit": "10",
      "remaining": "9"
    }
  ],
  "ts": "1758601481031"
}
```

### Response Parameters

| Parameters     | Type               | Description               |
|:---------------|:-------------------|:--------------------------|
| event          | String             | Event<br/>`trade`/`error` |
| id             | String             | Request identifier        |
| topic          | String             | Topic<br/>`modify-order`  |
| args           | List&lt;Object&gt; | Channel list              |
| &gt; orderId   | String             | Order ID                  |
| &gt; clientOid | String             | Client order ID           |
| &gt; requestId | Number             | Custom request ID<br/>Only returned when passed in the modify-order request |
| &gt; receiveTime | String           | Gateway receive time <br/>Unix microsecond timestamp |
| &gt; pushTime  | String             | Gateway push time <br/>Unix microsecond timestamp |
| code           | String             | Code                      |
| msg            | String             | Message                   |
| connId         | String             | Connection ID             |
| rateLimit      | Array              | Rate limit balance array  |
| &gt; limit     | String             | Rate limit quota for this dimension |
| &gt; remaining | String             | Remaining available quota |
| ts             | String             | Timestamp                 |

</div>

































