Skip to main content
POST
Cancel multiple orders in batch
This endpoint cancels multiple orders by internal orderIds only. Send { "orderIds": [...] } with at least one UUIDv4 order ID. This legacy endpoint has no documented maximum batch size, but all orders that resolve must belong to one market.
To cancel by either orderIds or clientOrderIds, use Batch Cancel Orders (Combined).

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.

Results

  • 200 OK returns the canceled order IDs.
  • 207 Multi-Status returns both canceled and normalized failed records.
  • 400 Bad Request with Failed to cancel any orders means every attempted cancellation failed.
  • 404 Orders not found means none of the supplied IDs resolved.
If some supplied IDs do not resolve but at least one does, missing IDs are omitted rather than returned as failures. All resolved orders must belong to the authenticated owner and to the same market. Cancellation failures use ORDER_NOT_FOUND with Order not found or already canceled, or UNKNOWN_ERROR with Failed to cancel order. Cancellation remains available in normal, post_only, and cancel_only; disabled returns 425 Too Early.

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
orderIds
string<uuid>[]
required

Array of order IDs to be cancelled in a single batch operation

Minimum array length: 1
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:

Response

All orders successfully cancelled

message
string
required

Confirmation message for the cancelled orders

Example:

"Orders canceled successfully"

canceled
string<uuid>[]

Array of successfully cancelled order IDs

Example:
failed
object[]

Array of orders that failed to cancel with reasons