# Batch Cancel Order Channel

### Description

:::tip

The ACK response only indicates that the request has been successfully accepted. Please use the [WebSocket order](/docs/uta/websocket/private/Order-Channel) push channel to confirm the actual order status of each cancellation.

:::

- This endpoint allows you to cancel multiple unfilled or partially filled orders across spot, margin, and futures markets via WebSocket.
- Each request supports cancellation of up to 20 orders.
- Batch order cancellation allows partial success. Each order in the batch is processed independently — if one cancellation fails, it does not affect the cancellation of the other orders in the same batch.
- In batch order cancellation, ensure that each call uses only orderId or clientOid for identification, and avoid mixing
  them. If orderId and clientOid are used together in one call, clientOid will be invalid.
- **Order Identification**: Orders can be identified by either `orderId` or `clientOid`. When both are provided, `orderId` takes priority.

Note: Please check the `code` and `msg` fields for each order in the response's `args` list to confirm the result of each cancellation. If the result is unclear, use `clientOid` or `orderId` to [query the order details](/docs/catalog/trading/order-management#get-order-details).

<div className="api-aligning">

```json title="Request Example"
{
    "args": [
        {
            "orderId": "xxxxxxxx"
        },
        {
            "orderId": "xxxxxxxx"
        }
    ],
    "id": "xxxxx-xxx-xxx-xxxx-xxxxxx",
    "op": "trade",
    "topic": "batch-cancel"
}
```

### Request Parameters

| Parameter      | Type               | Required | Description                                                                                                                              | 
|:---------------|:-------------------|----------|:-----------------------------------------------------------------------------------------------------------------------------------------|
| op             | String             | Yes      | Operation: <br/> `trade` trade                                                                                                           |
| id             | String             | Yes      | Request identifier                                                                                                                       |
| topic          | String             | Yes      | Topic<br/>`batch-cancel`                                                                                                                 |
| args           | List&lt;Object&gt; | Yes      | Channel list                                                                                                                             |
| &gt; orderId   | String             | No       | Order ID<br/>Either `clientOid` or `orderId` must be provided. If both are present or do not match, `orderId` will take priority         |
| &gt; clientOid | String             | No       | Client order ID<br/>Must match the regular expression `^[0-9A-Za-z_:#\-+\s]{1,32}$`, i.e. 1 to 32 characters, consisting of uppercase and lowercase letters, digits, underscores (_), hyphens (-), plus signs (+), colons (:), number signs (#), and spaces<br/>Either `clientOid` or `orderId` must be provided. If both are present or do not match, `orderId` will take priority |

</div>


<div className="api-aligning">

```json title="Response Example"
{
  "event": "trade",
  "id": "bb553cc0-c1fa-454e-956d-c96c8d715760",
  "topic": "batch-cancel",
  "args": [
    {
      "code": "0",
      "msg": "Success",
      "orderId": "xxxxxxxxxxxxx",
      "clientOid": "xxxxxxxxxxxxx",
      "receiveTime": "1750034396998123",
      "pushTime": "1750034397076456"
    },
    {
      "code": "25204",
      "msg": "Order does not exist",
      "orderId": "xxxxxxxxxxxxx",
      "clientOid": "xxxxxxxxxxxxx",
      "receiveTime": "1750034396999456",
      "pushTime": "1750034397077789"
    }
  ],
  "code": "0",
  "msg": "Success",
  "connId": "xxxxxxxxxx",
  "rateLimit": [
    {
      "limit": "10",
      "remaining": "9"
    }
  ],
  "ts": "1751980011084"
}
```

### Response Parameters

| Parameters     | Type               | Description               |
|:---------------|:-------------------|:--------------------------|
| event          | String             | Event<br/>`trade`/`error` |
| id             | String             | Request identifier        |
| topic          | String             | Topic<br/>`batch-cancel`  |
| args           | List&lt;Object&gt; | Channel list              |
| &gt; code      | String             | Code                      |
| &gt; msg       | String             | Message                   |
| &gt; orderId   | String             | Order ID                  |
| &gt; clientOid | String             | Client order ID           |
| &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>

































