v1

latestOpenAPI 3.0.12026-07-26171200932.8 KB
Trading - Demo

Modify stop-loss and take-profit settings on an open position

Rate limit: 60 requests per 60 seconds. This is the default shared quota — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.


Submits an asynchronous request to update stop-loss and/or take-profit on an open position. You can set a new stopLossRate, takeProfitRate, stopLossType, or clear either value (clearStopLoss, clearTakeProfit). At least one SL/TP-related field is required. The response returns acceptance and correlation metadata only.

patch/api/v2/trading/demo/positions/{positionId}

Path parameters

positionIdinteger required

The open position identifier.

Headers

x-request-idstring uuid required
Example:05489325-411b-4a3f-93cd-327fe619b4ed

A unique request identifier.

x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

API key for authentication.

x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

User-specific authentication key.

Request body

stopLossRatenumber nullable

New stop-loss rate for the position.

takeProfitRatenumber nullable

New take-profit rate for the position.

stopLossType'fixed' | 'trailing' nullable

Stop-loss type.

clearStopLossboolean nullable

When true, removes stop-loss from the position.

clearTakeProfitboolean nullable

When true, removes take-profit from the position.

Response

Request accepted and queued for asynchronous execution.

operationIdstring uuid required

Correlation identifier for the accepted edit operation.

positionIdinteger required

The position identifier from the route.

referenceIdstring uuid required

Client reference identifier from x-request-id header.