Update Position
PATCH
/positions/{position_id}
const url = 'https://example.com/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"closed":true,"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "closed": true, "name": "example" }'Rename a position, or close one that holds nothing today.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”position_id
required
Position Id
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PositionOut
A position as it stands today, computed from its events and the close in effect (newest date first; manual, then provider, then feed-implied only on a tie).
object
account_id
required
Account Id
string format: uuid
events
required
Events
integer
id
required
Id
string format: uuid
opened_on
required
Opened On
string format: date
quantity
required
Quantity
string
stale_price
required
Stale Price
boolean
symbol
required
Symbol
string
value_out_of_range
required
Value Out Of Range
boolean
Example generated
{ "account_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "closed_at": "2026-04-15T12:00:00Z", "cost_basis": "example", "events": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "market_value": "example", "name": "example", "opened_on": "2026-04-15", "price": "example", "price_as_of": "2026-04-15", "price_source": "example", "quantity": "example", "stale_price": true, "symbol": "example", "unrealized_gain": "example", "value_out_of_range": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}