# Cancel Order

> Cancel a trading order for the authenticated user's account

Source: /trader/api/trading/cancel-order

## `DELETE /accounts/{account_id}/orders/{order_id}`

**Cancel Order**

Cancel a trading order for the authenticated user's account

Tags: `Trading`

#### Path parameters

- `account_id` (string) (required) — The account ID where order to cancel belongs
- `order_id` (string) (required) — Order ID to cancel


### Responses

#### `200` — Order cancelled successfully

**Content-Type:** `application/json`

- `message` (string) (required) — The message that conveys the status of the request
- `operation_id` (string) (required) — The operation ID of the API request

#### `400` — Bad request (missing or invalid fields)

**Content-Type:** `application/json`

- `error` (object) (required)
  - `type` (string) (required) — Error type code
  - `message` (string) (required) — Human-readable error message
  - `field` (string) — Field name if error is field-specific

#### `401` — Unauthorized (invalid or missing JWT token)

**Content-Type:** `application/json`



#### `403` — Forbidden (account access denied)

**Content-Type:** `application/json`



#### `404` — Order ID not found

**Content-Type:** `application/json`



#### `422` — Unprocessable entity (business rule violation)

**Content-Type:** `application/json`



#### `500` — Internal server error

**Content-Type:** `application/json`



