> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pacifica.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel All Orders

> This request type allows users to cancel all orders through Pacifica's websocket API.

The [Pacifica Python SDK](https://github.com/pacifica-fi/python-sdk/blob/f2385d42e9ae5276ba2ba85505d51db2eefd2715/ws/cancel_all_orders.py) provides a comprehensive example on using this endpoint.

### Request

```json theme={null}
{
  "id": "4e9b4edb-b123-4759-9250-d19db61fabcb",
  "params": {
    "cancel_all_orders": {
      "account": "AwX6f3...",
      "signature": "2XP8fz...",
      "timestamp": 1749221927343,
      "expiry_window": 5000,
      "all_symbols": true,
      "exclude_reduce_only": false
    }
  }
}
```

<table><thead><tr><th width="184">Field</th><th width="98">Type</th><th width="123">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"id"</code></td><td>Full UUID string</td><td>required</td><td>Client-defined request ID</td><td><code>1bb2b72f-f545-4938-8a38-c5cda8823675</code></td></tr><tr><td><code>"params"</code></td><td>object</td><td>required</td><td>Contains action type and action parameters</td><td><code>"cancel\_all\_orders"</code></td></tr><tr><td><code>"cancel\_all\_orders"</code></td><td>object</td><td>required</td><td>Specifies action type and contains parameters</td><td>See examples.</td></tr><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>User's wallet address</td><td><code>42trU9A5...</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>69trU9A5...</code></td></tr><tr><td><code>"signature"</code></td><td>string</td><td>required</td><td>Cryptographic signature</td><td><code>5j1Vy9Uq...</code></td></tr><tr><td><code>"timestamp"</code></td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td><code>1716200000000</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>30000</code></td></tr><tr><td><code>"all\_symbols"</code></td><td>boolean</td><td>required</td><td>Whether to cancel orders for all symbols</td><td><code>true</code></td></tr><tr><td><code>"exclude\_reduce\_only"</code></td><td>boolean</td><td>required</td><td>Whether to exclude reduce-only orders</td><td><code>false</code></td></tr><tr><td><code>"symbol"</code></td><td>string</td><td>required<br />(if <code>"all\_symbols"</code> is false)</td><td>Trading pair symbol</td><td><code>BTC</code></td></tr></tbody></table>

```json theme={null}
{
  "code": 200,
  "data": {
    "cancelled_count": 10
  },
  "id": "b86b4f45-49da-4191-84e2-93e141acdeab",
  "t": 1749221787291,
  "type": "cancel_all_orders",
  "rl": {
    "r": 9995,
    "q": 10000,
    "t": 1000
  }
}
```

| Field               | Type           | Description                                                                                |
| ------------------- | -------------- | ------------------------------------------------------------------------------------------ |
| `'code'`            | integer        | Status code                                                                                |
| `'data'`            | object         | Contains information about placed order                                                    |
| `'cancelled_count'` | integer        | Number of orders successfully cancelled                                                    |
| `'id'`              | string         | Same as above request ID                                                                   |
| `'t'`               | integer        | Timestamp in milliseconds                                                                  |
| `'type'`            | string         | Specifies action type                                                                      |
| `'rl'`              | object or null | Rate-limit info, always present: `r` = credits remaining, `q` = quota, `t` = reset-in (ms) |

On error, the frame omits `data` and instead carries an `err` (string) field describing the failure, alongside the same `id`, `type`, `code`, `t`, and `rl` fields.
