---
title: "Cancel Order Commands"
method: POST
path: "/v2/command#cancellations"
tags: ["orders"]
---

# Cancel Order Commands

`POST /v2/command#cancellations`

## Request

- Base URL: `https://api.exchange.bullish.com/trading-api`
- URL: `https://api.exchange.bullish.com/trading-api/v2/command#cancellations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bullish/apis/bullish-trading-api/docs/v2/command%23cancellations/post.ts> (a function with typed inputs; its response is checked against the schema)

Submits a command to the trading engine. A successful response indicates that the command entry was acknowledged 
but does not indicate that the command was executed. 
This endpoint uses the [signing format](/rest/authentication#signing-format) which does not require strict field 
ordering and addition of null fields in the request body. Quantities and prices does not require strict precision. 
E.g. for asset precision of 4 - `100`, `100.0`, `100.00`, `100.000` and `100.0000` are all accepted.

Command schemas and examples are provided below. Supported commands:
- V3CancelOrder
- V1CancelAllOrders
- V1CancelAllOrdersByMarket
- V1DelayedCancelAllOrders
- V1UnsetDelayedCancelAllOrders

Requires
- [bearer token](/rest/authentication#add-authenticated-request-header) in authorization header

**Ratelimited:** `True`. Higher tiers of rate limits available by providing the `BX-RATELIMIT-TOKEN` request header.

## Headers

- `BX-SIGNATURE` string, required
- `BX-TIMESTAMP` string, required
- `BX-NONCE` string, required
- `BX-NONCE-WINDOW-ENABLED` 'false' | 'true'

## Request body

- union
  - CancelOrderCommandV3
    - `commandType` 'V3CancelOrder', required: The command type, it must be 'V3CancelOrder'
    - `orderId` string
    - `clientOrderId` string: Unique numeric (i64) identifier generated on the client side expressed as a string value
    - `symbol` string, required: market symbol. E.g. `BTCUSDC`
    - `tradingAccountId` string, required: unique trading account ID
  - CancelAllOrdersCommand
    - `commandType` 'V1CancelAllOrders', required: The command type, it must be 'V1CancelAllOrders'
    - `tradingAccountId` string, required: unique trading account ID
  - CancelAllOrdersByMarketCommand
    - `commandType` 'V1CancelAllOrdersByMarket', required: The command type, it must be 'V1CancelAllOrdersByMarket'
    - `symbol` string, required: market symbol. E.g. `BTCUSDC`
    - `tradingAccountId` string, required: unique trading account ID
  - DelayedCancelAllOrdersCommand
    - `commandType` 'V1DelayedCancelAllOrders', required: The command type, it must be 'V1DelayedCancelAllOrders'
    - `cancelId` string: Unique id for this cancel request which is an unsigned 64 bit integer expressed as string
    - `delayBySeconds` '5' | '10' | '15' | '20' | '25' | '30' | '40' | '50' | '60', required: Delay the cancel-all-orders request by (seconds) as a timeout mechanism
    - `tradingAccountId` string, required: unique trading account ID
  - UnsetDelayedCancelAllOrdersCommand
    - `commandType` 'V1UnsetDelayedCancelAllOrders', required: The command type, it must be 'V1UnsetDelayedCancelAllOrders'
    - `tradingAccountId` string, required: unique trading account ID

## Response `200`

Status OK. This means a command was successfully acknowledged.

- union
  - CancelOrderCommandResponseV3
    - `commandType` 'V3CancelOrder', required: The command type
    - `message` string, required: message
    - `requestId` string, required
    - `orderId` string
    - `clientOrderId` string: unique numeric identifier generated on the client side expressed as a string value
  - CancelAllOrdersCommandResponse
    - `commandType` 'V1CancelAllOrders', required: The command type
    - `message` string, required: message
    - `requestId` string, required
  - CancelAllOrdersByMarketResponse
    - `commandType` 'V1CancelAllOrdersByMarket', required: The command type
    - `message` string, required: message
    - `requestId` string, required
  - DelayedCancelAllOrdersResponse
    - `commandType` 'V1DelayedCancelAllOrders', required: The command type
    - `message` string, required: message
    - `requestId` string, required
  - UnsetDelayedCancelAllOrdersResponse
    - `commandType` 'V1UnsetDelayedCancelAllOrders', required: The command type
    - `message` string, required: message
    - `requestId` string, required

## Other responses

- `400`: Bad Request For example, sending a request with the `BX-SIGNATURE` header missing will result in the following response:
- `401`: Not Authenticated
- `403`: Access Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bullish/apis/bullish-trading-api.md) - [All operations](https://skmtc.dev/bullish/apis/bullish-trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bullish/apis/bullish-trading-api/revisions/df5d69ccedcf?raw)
