Skip to main content
DELETE
Cancel Order
This endpoint cancels by internal orderId. To cancel by either orderId or clientOrderId, use Cancel Order (Combined).
To cancel multiple orders at once, use Batch Cancel Orders (Combined), Cancel Orders (Batch), or Cancel All.
Cancellations remain available in cancel_only and post_only, but return 425 Too Early with code: "trading_disabled" when trading mode is disabled.

Authentication and delegation

Use a scoped API token with HMAC signing and the trading scope. To cancel for a partner sub-account, add ?onBehalfOf=<subProfileId>; the target must belong to the authenticated partner and the token must also have delegated_signing. Include the query string in the HMAC-signed path.

Cancellation behavior

A delayed order can be cancelled before execution, including a delayed FAK or FOK order. That path returns Delayed order canceled successfully. FAK and FOK orders can only be cancelled while waiting for the taker delay. On markets without a taker delay, they finish immediately and cannot be cancelled. The endpoint distinguishes:
  • 404 Order not found when the internal ID does not exist;
  • 401 Unauthorized when the order belongs to another profile;
  • 400 Market has already been resolved for a resolved market; and
  • 400 Order not found or already canceled when the order can no longer be cancelled; and
  • 409 ORDER_RELEASE_IN_PROGRESS when the delayed order’s release is in progress. The response includes retryable: true.

Authorizations

lmts-api-key
string
header
required

Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.

Path Parameters

orderId
string<uuid>
required

Unique identifier of the order to be cancelled

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
Example:

"6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203"

Query Parameters

onBehalfOf
integer

Partner sub-account profile ID. Requires delegated_signing in addition to trading.

Required range: x >= 1
Example:

326

Response

Order successfully cancelled

message
enum<string>
required

Confirmation message for the cancelled order

Available options:
Order canceled successfully,
Delayed order canceled successfully
Example:

"Order canceled successfully"