Skip to main content
PATCH
/
api
/
v2
/
trading
/
positions
/
{positionId}
Modify stop-loss and take-profit settings on an open position
curl --request PATCH \
  --url https://public-api.etoro.com/api/v2/trading/positions/{positionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>' \
  --data '
{
  "stopLossRate": 145.25,
  "takeProfitRate": 165.5,
  "stopLossType": "fixed"
}
'
{
  "operationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "positionId": 13902598,
  "referenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Authorizations

Authorization
string
header
required

eToro OAuth2. Each operation lists the scopes that grant access as separate security requirements (OpenAPI OR semantics): the caller's token only needs ONE of them — you do NOT need all of them. The same scopes back the x-api-key/x-user-key credential pair.

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"f8be5041-cc41-45bb-af23-a3017a4869ef"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

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.

takeProfitRate
number<decimal> | null

New take-profit rate for the position.

stopLossType
enum<string> | null

Stop-loss type.

Available options:
fixed,
trailing
clearStopLoss
boolean | null

When true, removes stop-loss from the position.

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.