Skip to content

Update a position.

PUT
/api/positions/{id}
curl --request PUT \
--url https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--data '{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "assetType": "stock", "notes": "example", "side": "long", "stopLoss": "140.00", "symbol": "example", "targetPrice": "150.00" }'

Authed. All fields optional. On a draft position every field is editable. On open and closed positions only notes, targetPrice, and stopLoss may change — the trade-plan fields are plan annotations that do not affect fill quantities; any other field on a non-draft position is rejected with 409.

id
required
string format: uuid
Media typeapplication/json
object
accountId
string format: uuid
assetType
string
Allowed values: stock option
notes
string
nullable
side
string
Allowed values: long short
stopLoss

Trade-plan stop-loss price. Positive decimal string with up to 8 decimal places, or null. Editable on any status.

string
nullable
Example
140.00
symbol
string
>= 1 characters <= 20 characters
targetPrice

Trade-plan target price. Positive decimal string with up to 8 decimal places, or null. Editable on any status.

string
nullable
Example
150.00

The updated position.

Validation error (e.g. an invalid option symbol or plan price).

Position not found (or not owned)

A restricted field (symbol/side/assetType/accountId) was changed on a non-draft position