Cancels every resting order the authenticated broker has on the market, across all of its accounts. The command is accepted asynchronously: each cancelled order arrives later as a regular order update (status CANCELLED, status_reason USER_REQUEST) whose last_cmd_id_hex equals the returned ref_id. A market that is unknown, closed, settled or voided is rejected with 422. If the market closes while the command is in flight, the engine ignores the command: the close has already cancelled every order.
Headers
-
Broker access key identifier.
Format should match the following pattern:
^[A-Za-z0-9._~-]{1,64}$. -
Keyed BLAKE2b-256 signature (hex lowercase, 64 characters).
Format should match the following pattern:
^[0-9a-f]{64}$. -
RFC3339 timestamp with milliseconds (e.g., 2025-10-30T06:00:34.075Z). Must be within clock_skew_tolerance (default 5m) of server time.
-
Stable idempotency token reused on retries. Its server-side context has a sliding TTL of one hour, refreshed by every request carrying the key. Reuse with a different payload returns 409 idempotency_key_mismatch. Reuse with an identical payload returns 202 after the command has been accepted; if its outcome cannot be confirmed after the safe retry period, it returns 503 outcome_unknown and the server makes no further delivery attempts.
Maximum length is
64. Format should match the following pattern:^[A-Za-z0-9._~-]{1,64}$. -
Optional UUIDv7 correlation identifier (lowercase). Must match RFC4122 UUIDv7 (version nibble '7', variant 8|9|a|b). If present but invalid → 422 invalid_correlation_id (error_code).
Format should match the following pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.
Responses
-
Cancel-all command accepted
-
Idempotent replay (already accepted)
-
The broker is not allowed to perform this action in the current market state
-
Idempotency-Key reused with different payload
-
Validation / semantic error
-
The request could not be served.
error_codein the response body gives the reason and determines whether the request may be retried.
curl \
--request DELETE 'https://api.example.com/v1/trading/markets/{market_id}/orders' \
--header "PRE-ACCESS-KEY: string" \
--header "PRE-ACCESS-SIGNATURE: string" \
--header "PRE-ACCESS-TIMESTAMP: 2026-05-04T09:42:00Z" \
--header "Idempotency-Key: string" \
--header "Correlation-Id: string"
{
"ref_id": "string"
}
{
"ref_id": "string"
}
{
"error_code": "string",
"message": "string",
"details": {}
}
{
"error_code": "string",
"message": "string",
"details": {}
}
{
"error_code": "string",
"message": "string",
"details": {}
}
{
"error_code": "string",
"message": "string",
"details": {}
}