---
title: "Batch Cancel Orders"
method: POST
path: "/api/v1/order/cancel-batch"
tags: ["Trade"]
---

# Batch Cancel Orders

`POST /api/v1/order/cancel-batch`

## Request

- Base URL: `https://api.ekiden.fi`
- URL: `https://api.ekiden.fi/api/v1/order/cancel-batch`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ekidenfi/apis/ekiden-gateway/docs/api/v1/order/cancel-batch/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancel multiple existing orders in a single request

## Request body

- BatchCancelOrdersRequest: Batch cancel order request. You can cancel unfilled or partially filled orders. TODO: Maximum 20 orders per request
  - `await_outcome` boolean: If true, gateway waits up to a server-defined timeout (currently 3s) for final engine outcomes and maps them into `exit_info`. If false (default), `exit_info` reports edge outcomes (validation + publish ack).
  - `request` CancelOrderRequest[], required
    - `order_id` string, uuid
    - `order_link_id` string
    - `sub_account_address` string, required
    - `symbol` string, required

## Response `200`

Orders canceled

- BatchCancelOrdersResponse: Response of batch cancel orders.
  - `exit_info` ExitMessage[], required: Information about the exit status of each order in the batch.
    - union
      - object
        - `Error` object, required
          - `code` integer, required
          - `msg` string, required
      - object
        - `Success` object, required
          - `code` integer, required
          - `msg` string, required
  - `result` CancelOrderResponse[], required
    - `order_id` string, uuid
    - `order_link_id` string
  - `time` string, date-time, required

## Changes

- **2026-05-28** `75ffe546b73a`: 3 breaking, 1 info
  - the response property `result/items/order_id` became optional for the status `200`
  - added `#/components/schemas/OrderId, subschema #1` to the `result/items/order_id` response property `oneOf` list for the response status `200`
  - the `result/items/order_id` response's property type changed from `string` to no type, and format from `uuid` to no format for status `200`
  - added the new optional request property `await_outcome`
- **2026-01-29** `16fe50636aa5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/changes/api/v1/order/cancel-batch/post.md)

---

[API](https://skmtc.dev/ekidenfi/apis/ekiden-gateway.md) - [All operations](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/revisions/fad9eecaba2e?raw)
