Skip to main content
POST
/
orders
/
batch-cancel
Batch Cancel Orders (Combined)
curl --request POST \
  --url https://api.limitless.exchange/orders/batch-cancel \
  --header 'Content-Type: application/json' \
  --header 'lmts-api-key: <api-key>' \
  --data '
{
  "orderIds": [
    "6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203"
  ],
  "clientOrderIds": [
    "partner-order-001",
    "partner-order-002"
  ]
}
'
{
  "message": "Orders canceled successfully",
  "canceled": [
    "611badac-8dfc-48a0-b09e-59654adea1c5"
  ],
  "failed": [
    {
      "orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",
      "reason": "ORDER_NOT_FOUND",
      "message": "Order not found or already canceled"
    }
  ]
}
Cancel multiple orders by either internal orderIds or clientOrderIds supplied when creating the orders. Provide exactly one identifier array. Requests with both orderIds and clientOrderIds, or with neither, return 400 Bad Request.
POST /orders/cancel-batch remains supported for existing integrations and accepts orderIds only.

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.

Body

application/json
orderIds
string<uuid>[]
required

Internal order IDs. Provide exactly one of orderIds or clientOrderIds.

Maximum array length: 50
Example:
["6f52b6d2-6c9e-4a5c-8a4f-28ab4b7ff203"]
clientOrderIds
string[]

Client-provided order IDs from order creation. Provide exactly one of orderIds or clientOrderIds.

Maximum array length: 50
Maximum string length: 128
Example:
["partner-order-001", "partner-order-002"]

Response

All orders successfully cancelled

message
string
required

Confirmation message for the cancelled orders

Example:

"Orders canceled successfully"

canceled
string[]

Array of successfully cancelled order IDs

Example:
["611badac-8dfc-48a0-b09e-59654adea1c5"]
failed
object[]

Array of orders that failed to cancel with reasons