For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/gateway/cancel-all-orders.md.

Cancel all open orders on a venue

Organization tokenNo token

POST
/orders/all/cancel

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.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

An access token from POST /v1/auth/api-key/token. An organization token lasts one hour and has no refresh token; a personal token can be refreshed.

Header Parameters

TM-On-Behalf-Of?string

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.

Formatuuid

Request Body

application/json
  1. body

Request to cancel all open orders on a venue.

venue*Venue

The trading venue to filter by.

  • defi — Decentralized exchange (on-chain swaps).
  • cefi — Centralized exchange (off-chain order book).
Value in"defi""cefi"

Response Body

Cancellation accepted

application/json
  1. response

Result of a cancel-all request.

canceled_count?integer

Number of open orders canceled by this request.

Example Request
curl -X POST 'https://api.truemarkets.co/v1/gateway/orders/all/cancel' \  -H 'TM-On-Behalf-Of: 3f6d2c0e-8a41-4c2b-9f1e-2b7d5c0a9e11' \  -H 'Content-Type: application/json' \  -d '{  "venue": "defi"}'
Example Response
{  "canceled_count": 3}