Submit triggers
PUT /frontoffice/api/v4/positions/{positionId}/triggers
Summary
Use this method to modify Stop loss and Take profit settings for an open position.
Request
Header parameters
accountId required
The trading account identifier.
Path parameters
positionId required
The position identifier.
Body
stopLoss.price decimal string
The Stop loss trigger price.
stopLoss.isTrailing boolean
If true, enables the Trailing behavior for Stop loss.
takeProfit.price decimal string
The Take profit trigger price.
Request example
PUT /frontoffice/api/v4/positions/01K2HYXA7N2G9NHTFEWYVM9SEQ/triggers HTTP/1.1
Host: {host}
Authorization: Bearer JWT
accountId: {accountId}
Content-Type: application/json; x-api-version=4.0
Accept: */*
{
"stopLoss": {
"price": "165.13",
"isTrailing": true
},
"takeProfit": {
"price": 250
}
}
Response
In case of success, an object will be returned containing the identifier of the updated position.
Response example β 200: OK
{
"positionId": "01K2HYXA7N2G9NHTFEWYVM9SEQ"
}
