---
title: "POST /orders/txns/cancel/prepare"
method: POST
path: "/orders/txns/cancel/prepare"
tags: ["Order Transactions"]
---

# POST /orders/txns/cancel/prepare

`POST /orders/txns/cancel/prepare`

## Request

- Base URL: `https://arbitrum.gmxapi.io/v1`
- URL: `https://arbitrum.gmxapi.io/v1/orders/txns/cancel/prepare`
- Auth: none required
- TypeScript: <https://skmtc.dev/gmx/apis/gmx-io-gmx-public-api/docs/orders/txns/cancel/prepare/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CancelPrepareRequest
  - `subaccountApproval` RecordStringAny: Construct a type with a set of properties K of type T
  - `subaccountAddress` string
  - `from` string, required
  - `mode` 'express' | 'classic', required
  - `all` boolean
  - `orderIds` string[]
  - `orderId` string

## Response `200`

Success

- PrepareResponse
  - `traceId` string
  - `validationWarnings` OrderValidationWarningResponse[]
    - union
      - object
        - `details` object, required
          - `marketDataStatus` 'fresh' | 'stale', required
          - `jitDataStatus` 'available' | 'stale' | 'unavailable', required
          - `limitingFactor` 'reserve' | 'openInterest' | 'both' | 'notApplicable', required
          - `jitAvailableLiquidity` string, required
          - `baseAvailableLiquidity` string, required
          - `availableLiquidity` string, required
          - `requestedSizeUsd` string, required
        - `message` string, required
        - `code` 'INSUFFICIENT_LIQUIDITY', required
      - object
        - `details` object, required
          - `reason` 'STALE_MARKET_DATA' | 'JIT_DATA_UNAVAILABLE' | 'JIT_ACCOUNT_ELIGIBILITY_UNKNOWN' | 'COLLATERAL_SWAP', required
        - `message` string, required
        - `code` 'TRADING_CAPACITY_UNAVAILABLE', required
  - `warnings` string[]
  - `expiresAt` number, double
  - `estimates` object
    - `tradingCapacity` TradingCapacityResponse
      - `marketDataStatus` 'fresh' | 'stale', required
      - `jitDataStatus` 'available' | 'stale' | 'unavailable', required
      - `limitingFactor` 'reserve' | 'openInterest' | 'both' | 'notApplicable', required
      - `jitAvailableLiquidity` string, required
      - `baseAvailableLiquidity` string, required
      - `availableLiquidity` string, required
    - `fundingFeeUsd` string, required
    - `borrowingFeeUsd` string, required
    - `positionFeeUsd` string, required
    - `sizeDeltaUsd` string, required
    - `acceptablePrice` string, required
    - `executionFeeAmount` string, required
    - `swapPriceImpactDeltaUsd` string, required
    - `positionPriceImpactDeltaUsd` string, required
  - `payload` RecordStringAny, required: Construct a type with a set of properties K of type T
  - `requestId` string, required
  - `mode` 'express' | 'classic', required
  - `payloadType` 'transaction' | 'typed-data', required

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

## Changes

- **2026-08-25** `4455f6c22f99`: 2 info
  - added the optional property `estimates/tradingCapacity` to the response with the `200` status
  - added the optional property `validationWarnings` to the response with the `200` status

[Operation history](https://skmtc.dev/gmx/apis/gmx-io-gmx-public-api/changes/orders/txns/cancel/prepare/post.md)

---

[API](https://skmtc.dev/gmx/apis/gmx-io-gmx-public-api.md) - [All operations](https://skmtc.dev/gmx/apis/gmx-io-gmx-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gmx/apis/gmx-io-gmx-public-api/revisions/f140bd95ce1d?raw)
