---
title: "Batch Cancel Orders (Combined)"
method: POST
path: "/orders/batch-cancel"
tags: ["Trading"]
---

# Batch Cancel Orders (Combined)

`POST /orders/batch-cancel`

Cancel open orders by either internal orderIds or client-provided clientOrderIds.

## Request body

- union
  - object
    - `orderIds` string[], required — Internal order IDs. Provide exactly one of orderIds or clientOrderIds.
    - `clientOrderIds` string[] — Client-provided order IDs from order creation. Provide exactly one of orderIds or clientOrderIds.
  - object
    - `orderIds` string[] — Internal order IDs. Provide exactly one of orderIds or clientOrderIds.
    - `clientOrderIds` string[], required — Client-provided order IDs from order creation. Provide exactly one of orderIds or clientOrderIds.

## Response `200`

All orders successfully cancelled

- union
  - CancelOrderBatchResponseDto
    - `message` string, required — Confirmation message for the cancelled orders
    - `canceled` string[] — Array of successfully cancelled order IDs
    - `failed` CancelOrderFailure[] — Array of orders that failed to cancel with reasons
      - `orderId` string, required — Order ID that failed to cancel
      - `reason` 'ORDER_NOT_FOUND' | 'UNKNOWN_ERROR', required — Error code indicating the reason for failure
      - `message` string, required — User-friendly error message
  - CancelOrderBatchCombinedResponseDto
    - `message` string, required
    - `canceled` ClientOrderCancelSuccess[] — Canceled client-order-id records
      - `clientOrderId` string, required — Client-provided order ID from order creation
      - `orderId` string, uuid, required — Internal order ID
    - `failed` ClientOrderCancelFailure[] — Client-order-id cancel failures
      - `clientOrderId` string, required — Client-provided order ID from order creation
      - `orderId` string, uuid — Internal order ID, when resolution succeeded before cancellation failed
      - `reason` string, required — Failure reason
      - `message` string, required — Human-readable failure message

## Other responses

- `207` — Partial success - some orders cancelled, some failed
- `400` — Invalid identifier input, invalid order data, or no orders could be cancelled
- `401` — User not authenticated or not the owner of all orders
- `500` — Server error during batch cancellation

---

[API](https://skmtc.net/limitless-labs-group/apis/limitless-exchange-api.md) · [All operations](https://skmtc.net/limitless-labs-group/apis/limitless-exchange-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/limitless-labs-group/limitless-exchange-api/versions/f60847044e0d/schema)
