# 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 after cancellation.

:::

This endpoint allows you to cancel a single unfilled or partially filled order across spot, margin, and futures markets, as well as Reality (rToken) stocks.

- Reality (rToken) rate limit<br/>
  User level: 5/sec/UID by default, 30/sec/UID for whitelisted users (contact your BD/RM to apply).

Note: If an unexpected error occurs when canceling an order, please check the `event` field (whether it is `trade` or `error`) in the response and use `clientOid` or `orderId` to [query the order details](/docs/catalog/trading/order-management#get-order-details) to confirm the final result of the operation.

- **Order Identification**: Orders can be identified by either `orderId` or `clientOid`. When both are provided, `orderId` takes priority.
- **Error Sample**: `{'event': 'error', 'code': 40015, 'msg': 'System is abnormal, please try again later', 'ts': 1785222459567}`
- Canceling an order may fail if the order has already been fully filled, has already been canceled, or the provided `orderId`/`clientOid` is invalid.

<div className="api-aligning">

```json title="Request Example"
{
    "args": [
        {
            "orderId": "xxxxxxxxxxxxxxxxxx",
            "clientOid": "xxxxxxxxxxxxxxxxxx"
        }
    ],
    "id": "c8a1999c-1f82-409d-870e-f40ff49c4072",
    "op": "trade",
    "topic": "cancel-order"
}
```

### Request Parameters

| Parameter      | Type               | Required | Description                                                                                                                                   | 
|:---------------|:-------------------|----------|:----------------------------------------------------------------------------------------------------------------------------------------------|
| op             | String             | Yes      | Operation: <br/> `trade` trade                                                                                                                |
| id             | String             | Yes      | Request identifier                                                                                                                            |
| topic          | String             | Yes      | topic<br/>`cancel-order`                                                                                                                      |
| category       | String             | No       | Category (recommended)<br/>`spot`Spot<br/>`margin` Margin<br/> `usdt-futures` USDT futures<br/>`coin-futures` Coin futures<br/>`usdc-futures` USDC futures |
| 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": "1750034870205",
  "topic": "cancel-order",
  "args": [
    {
      "orderId": "xxxxxxxx",
      "clientOid": "xxxxxxxx",
      "receiveTime": "1750034396998123",
      "pushTime": "1750034397076456"
    }
  ],
  "code": "0",
  "msg": "Success",
  "connId": "xxxxxxxxxx",
  "rateLimit": [
    {
      "limit": "10",
      "remaining": "9"
    }
  ],
  "ts": "1750034870597"
}
```

### Response Parameters

| Parameters     | Type               | Description                           |
|:---------------|:-------------------|:--------------------------------------|
| event          | String             | Event<br/>`trade`/`error`             |
| id             | String             | Request identifier                    |
| topic          | String             | Topic<br/>`cancel-order` cancel-order |
| args           | List&lt;Object&gt; | Channel list                          |
| &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>

































