---
title: "Cancel an async order"
method: POST
path: "/trading/async-order/cancel"
tags: ["Trading"]
---

# Cancel an async order

`POST /trading/async-order/cancel`

Permissions required: **Execute trades**

Cancels an async order.

## Query parameters

- `orderId` string
- `clOrderId` string

## Response `200`

Successfully cancel an ansyc order

- AsyncOrderResponse
  - `data` AsyncOrderExecutionReport, required
    - `accountId` string — Account ID for this order to book into.
    - `allocation` Allocation[] — Subaccount allocation
      - `counterQtyAllIn` string, required — Counter quantity all in
      - `counterQtyAllInToSettle` string, required — Counter quantity all in to be settled
      - `cumQty` string, required — Filled quantity
      - `executionId` string — Execution identifier
      - `fee` string, required — Fee
      - `quantity` string, required — Allocated quantity
      - `subaccountId` string, required — The Subaccount Identifier
    - `avgPx` string, required — Average filled price for this order.
    - `avgPxAllIn` string — Average filled price + anchorage commission.
    - `cancelQty` string — quantity canceled for this order.
    - `clOrderId` string, required — Original client order ID as submitted.
    - `counterCurrency` string, required — The counter currency of the order.
    - `counterQty` string, required — Filled quantity of the counter currency.
    - `counterQtyAllIn` string, required — Filled quantity of the counter currency including all fees.
    - `cumQty` string, required — Cumulative filled quantity for this order.
    - `currency` string, required — The currency in which order quantity is specified in.
    - `execId` string — Execution ID of this report. This ID can be used to retrieve the trade.
    - `execType` 'PENDING_NEW' | 'REJECTED' — Describes the specific execution (e.g. PENDING_NEW) while OrdStatus will always identify the current order status (e.g. PARTIALLY_FILLED).
    - `fee` string — Commission charged for this order.
    - `feeCurrency` string — Currency commission was charged in, which is always the opposite currency from what the order quantity is specified in.
    - `leavesQty` string — quantity that is still open for this order.
    - `limitPrice` string — Original limit price for this order if present. Required for LIMIT, STOP_LIMIT and TAKE_PROFIT_LIMIT
    - `orderId` string, required — Order ID generated by anchorage.
    - `orderQty` string, required — Original order quantity.
    - `orderStatus` 'FILLED' | 'REJECTED' | 'CANCELED' | 'PENDING_NEW' | 'PARTIALLY_FILLED' | 'PENDING_CANCEL', required — Order status
    - `orderType` 'LIMIT' | 'STOP_LIMIT' | 'TAKE_PROFIT_LIMIT' | 'STOP_LOSS', required — Order type will be LIMIT, STOP_LIMIT, TAKE_PROFIT_LIMIT or STOP_LOSS
    - `reasonText` string — Additional description for reason of reject or cancel.
    - `rejectReason` 'InvalidTimeInForce' | 'InvalidSymbol' | 'InvalidCurrency' | 'InvalidSide' | 'InvalidQuantity' | 'InvalidOrderType' | 'InvalidAccount' | 'AccountDisabledForTrading' | 'UnauthorizedForTrading' | 'InsufficientLiquidity' | 'DuplicateOrder' | 'ExecutionLimitExceeded' | 'InternalError' | 'InvalidPrice' | 'InvalidLimitPrice' | 'InvalidTriggerPrice' | 'OrderNotCancelable' | 'InvalidAccountsInAllocation' | 'InvalidCurrencyForFOK' — Reason for rejection, this is a set of standardized reason code.
    - `side` 'BUY' | 'SELL', required — Order side, either "BUY" or "SELL".
    - `subaccountId` string — Subaccount ID for this order to book into.
    - `submitTime` string, date-time, required — UTC timestamp when order is submitted. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) 'date-time'.
    - `symbol` string, required — Symbol for the order, e.g. BTC-USD.
    - `timeInForce` 'FOK' | 'IOC' | 'GTC' — Order Time in Force
    - `transactTime` string, date-time, required — UTC timestamp when order is executed. [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) 'date-time'.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/anchorage/apis/anchorage-digital-api-reference.md) · [All operations](https://skmtc.net/anchorage/apis/anchorage-digital-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anchorage/anchorage-digital-api-reference/versions/166864b1ec6d/schema)
