# Amend Position

> Modifies multi-level take profit and stop loss orders for an existing position

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

## `PATCH /accounts/{account_id}/positions/{position_id}/amend`

**Amend Position**

Modifies multi-level take profit and stop loss orders for an existing position

Tags: `Trading`

#### Path parameters

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


### Request body

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

- `position_id` (string) — Position ID to amend (required for WebSocket, extracted from URL for HTTP)
- `tp_levels` (array) — Multi-level take profit configuration. Omit for no changes, empty array [] to cancel all, or provide levels to create/modify
  - items:
    - `level_id` (string) — Optional: If provided, modifies existing TP/SL order; if empty, creates new
    - `price` (number) (required) — Trigger price for this protection level
    - `qty` (number) (required) — Quantity in lots for this level
- `sl_levels` (array) — Multi-level stop loss configuration. Omit for no changes, empty array [] to cancel all, or provide levels to create/modify
  - items:


### Responses

#### `200` — Position amended 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 (position access denied)

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



#### `404` — Position not found

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



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

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



#### `500` — Internal server error

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



