---
title: "Batch Cancel Orders"
method: DELETE
path: "/v1/perps/orders/batch"
tags: ["Orders"]
---

# Batch Cancel Orders

`DELETE /v1/perps/orders/batch`

Cancels multiple orders in a single call. Returns results for each order. Provide a comma-separated list of order IDs via the `orderIDs` query parameter. Each entry can be an internal order ID or `client:{clientOrderID}`.

## Query parameters

- `orderIDs` string, required

## Response `200`

Batch cancel result

- object
  - `success` boolean, required — Whether the request was successful
  - `error` string — Error message, present only on failure
  - `error_code` string — Semantic error code. See each endpoint's error responses for the specific codes it can return.
  - `deprecated` string — Deprecation notice, if applicable
  - `result` BatchCancelResult
    - `successfulCancels` ApiOrder[] — Orders that were successfully cancelled
      - `orderId` string, required — Internal order ID
      - `clientOrderId` string — Client-provided order ID (if set)
      - `parentOrderId` string — Parent order ID (e.g. for TWAP child orders)
      - `side` 'buy' | 'sell', required — buy or sell
      - `price` string, required — Limit price
      - `size` string, required — Order quantity in base currency
      - `market` string, required — Trading market
      - `filledSize` string, required — Quantity of the order that has been filled
      - `lastFillSize` string, required — Quantity filled in the most recent trade
      - `filledCost` string, required — Cost of the filled portion of the order (filledSize × fill price)
      - `realizedPnl` string — Realized PNL for this order (perps only)
      - `fee` string, required — Fees incurred on this order
      - `feeRebate` string — Fee rebate earned on this order (perps only)
      - `status` 'open' | 'fullyfilled' | 'canceled' | 'pending' | 'untriggered', required — Order status
      - `createdAt` string, date-time, required — Order creation time
      - `filledAt` string, date-time — Time when the order was fully filled (if applicable)
      - `canceledAt` string, date-time — Order cancellation time (if cancelled)
      - `cancelReason` '' | 'liquidation' | 'selfMatchPrevention' | 'cancelAfterTimeout' | 'startupBadPrice' | 'immediateOrCancel' | 'cancelAfterTimeoutOnShutdown' | 'cancelOnStartup' | 'cancelByAdmin' | 'positionClosed' | 'stopOrderPositionNeutral' | 'stopOrderPositionDirectionMismatch' | 'stopOrderInLiquidation' | 'stopOrderInternalError' — Reason the order was cancelled. Possible values: "" (user cancelled), "liquidation", "selfmatchprevention", "cancelaftertimeout", "startupbadprice", "immediateorcancel"
      - `type` 'limit' | 'market' | 'stopMarket' | 'takeProfitMarket', required — Order type
      - `timeInForce` 'GTC' | 'IOC' — Time in force (GTC or IOC). Not returned for market orders.
      - `reduceOnly` boolean — Whether the order is reduce-only
      - `liquidationId` string — ID of the liquidation event this order participated in (perps only)
      - `closePosition` boolean — True if this is a position-level TP/SL order
      - `stopOrderType` 'stopLoss' | 'takeProfit' — Stop order type (stopLoss or takeProfit), if applicable
      - `triggerPrice` string — Trigger price for stop orders
    - `failedCancels` CancelError[] — Cancel attempts that failed
      - `orderId` string — Order ID that failed to cancel
      - `error` string — Error message explaining why the cancel failed
      - `errorCode` string — Semantic error code (empty if not a semantic error)

## Other responses

- `400` — Bad request. The request was malformed or failed validation.
- `401` — Authentication required. Provide a valid JWT or API key.
- `403` — Access denied. The authenticated account does not have permission.
- `429` — Rate limit exceeded. Slow down request frequency.
- `500` — Internal server error.

---

[API](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api.md) · [All operations](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ondoperps/ondo-perps-rest-api/versions/39df6b2fa672/schema)
