---
title: "Cancel all open orders on a venue"
url: https://docs.truemarkets.co/api/gateway/cancel-all-orders
description: "Cancels all of your open orders on the given venue and returns how many were canceled. Cancellation is asynchronous — confirm final per-order state via GET /orders. Only cefi is supported today; defi returns 501 Not Implemented."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Cancel all open orders on a venue

Cancels all of your open orders on the given venue and returns how many
were canceled. Cancellation is asynchronous — confirm final per-order
state via `GET /orders`. Only `cefi` is supported today; `defi` returns
`501 Not Implemented`.

## Request

```
POST https://api.truemarkets.co/v1/gateway/orders/all/cancel
```

### Authentication

Bearer token in `Authorization`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `TM-On-Behalf-Of` | header | string (uuid) | no | Act as one of your organization's users. The value is the `user_id` returned when the user was created; the request then reads and writes that user's account. Requires an organization token and a user your organization created: `400` for a personal token, a repeated header or a non-UUID, `403` for a user outside your organization. Not accepted on organization-scoped routes. |

### Body

`application/json`, required

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `venue` | string, one of `defi`, `cefi` | yes | The trading venue to filter by. * **defi** — Decentralized exchange (on-chain swaps). * **cefi** — Centralized exchange (off-chain order book). |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 202

Cancellation accepted

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canceled_count` | integer | no | Number of open orders canceled by this request. |

### 400

Bad request

### 401

Unauthorized

### 403

Forbidden. On order creation this also covers an asset that is not available to trade from the country the request came from.

### 500

Internal server error
