Skip to main content
PATCH
Modify stop-loss and take-profit settings on an open position

Authorizations

x-api-key
string
header
default:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
required

API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.

Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

x-user-key
string
header
default:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
required

User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.

Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"26a2a014-b075-4d57-942c-19125d6a797e"

Path Parameters

positionId
integer<int64>
required

The open position identifier.

Body

application/json

Request payload for patching position stop-loss and take-profit risk parameters.

stopLossRate
number<decimal> | null

New stop-loss rate for the position. Note that deepening a stop loss beyond the allowed maximum stop loss will cause funds to be transferred from the account balance into the position margin.

takeProfitRate
number<decimal> | null

New take-profit rate for the position.

stopLossType
enum<string> | null

Stop-loss type. fixed - the stop-loss rate does not change. trailing - the stop-loss rate moves up whenever the instrument rate goes up such that the stop loss is triggered from the same distance from the last peak rate as the distance of the stop-loss rate from the rate at the open.

Available options:
fixed,
trailing
clearStopLoss
boolean | null

When true, removes stop-loss from the position, if the system allows the position to clear its stop loss. Normally it cannot be done for leveraged and future positions.

clearTakeProfit
boolean | null

When true, removes take-profit from the position.

Response

Request accepted and queued for asynchronous execution.

Response returned when a position edit request is accepted for asynchronous processing.

operationId
string<uuid>
required

Correlation identifier for the accepted edit operation.

positionId
integer<int64>
required

The position identifier from the route.

referenceId
string<uuid>
required

Client reference identifier from x-request-id header.