Skip to main content
POST
Cancel one order by either the internal orderId or the clientOrderId supplied when creating the order. Provide exactly one identifier. Requests with both identifiers or neither identifier return 400 Bad Request.
DELETE /orders/{orderId} remains supported for existing integrations that cancel only by internal order ID.

Authentication

Canceling is not EIP-712 signed. Unlike placing an order, you do not include a signature in the request. Cancellation is an off-chain operation that removes the order from the book. Use a scoped API token with HMAC signing and the trading scope. No additional scope is needed to cancel your own orders.

Canceling a sub-account’s orders (partner flow)

If you placed an order with onBehalfOf (so it is owned by a managed sub-account, not your partner profile), cancel it through your partner token with the onBehalfOf query parameter:
This on-behalf-of path additionally requires the delegated_signing scope on your partner token. The scope is reused as the authorization gate for acting on a sub-account. It does not mean the order must be server-signed, and it works for EOA sub-accounts that signed their own orders. See Delegated Signing.
The HMAC signature must be computed over the full path including the query string, so sign /orders/cancel?onBehalfOf=42, not /orders/cancel. See Authentication.

Cancellation behavior

  • A cancellation can remove a delayed order before execution. This returns Delayed order canceled successfully.
  • FAK and FOK orders can be delayed on markets with taker delay. Immediate FAK/FOK orders are generally terminal and no longer cancellable.
  • An order that can no longer be canceled returns 400 Bad Request with Order not found or already canceled.

Error distinctions

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.

Query Parameters

onBehalfOf
integer

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

Required range: x >= 1
Example:

326

Body

application/json
orderId
string<uuid>
required

Internal order ID. Provide exactly one of orderId or clientOrderId.

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"

clientOrderId
string

Client-provided order ID from order creation. Provide exactly one of orderId or clientOrderId.

Maximum string length: 128
Example:

"partner-order-001"

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"