# Reverse Position

> Closes an open position with a market order and, on terminal fill, automatically opens an opposing position with the same filled quantity.

Source: /trader/api/trading/reverse-position

## `POST /accounts/{account_id}/positions/{position_id}/reverse`

**Reverse Position**

Closes an open position with a market order and, on terminal fill, automatically opens an opposing position with the same filled quantity.

Tags: `Trading`

#### Path parameters

- `account_id` (string) (required) — The account ID where the position to reverse belongs
- `position_id` (string) (required) — Position ID to reverse


### Responses

#### `201` — Position reverse closing order created successfully

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

- `closing_order_id` (string) (required) — The created reverse closing market order identifier

#### `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 (position access denied)

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



#### `404` — Position not found

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



#### `422` — Unprocessable entity (business rule violation, e.g. position not open)

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



#### `500` — Internal server error

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



