Skip to content

Create Position

POST
/accounts/{account_id}/positions
curl --request POST \
--url https://example.com/accounts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/positions \
--header 'Content-Type: application/json' \
--data '{ "as_of": "2026-04-15", "cost_basis": 1, "name": "example", "note": "example", "quantity": 1, "source_note": "example", "symbol": "example" }'

Open a position on a brokerage account whose holdings are tracked by hand (holdings_source manual; 422 otherwise). 409 while an open position in that symbol exists, and 409 when the new position would hold shares on a day a CLOSED position in the symbol held them or sold out (positions never overlap: start the new one after it). With quantity, it also records the opening set_quantity on as_of.

account_id
required
Account Id
string format: uuid
Media typeapplication/json
PositionCreate
object
as_of
Any of:
string format: date
cost_basis
Any of:
number
name
Any of:
string
<= 200 characters
note
Any of:
string
<= 500 characters
quantity
Any of:
number
source_note
Any of:
string
<= 500 characters
symbol
required
Symbol

The ticker, e.g. ACME; stored upper case. Letters, digits, . and - (share classes such as BRK.B).

string
>= 1 characters <= 15 characters

Example generated

{
"as_of": "2026-04-15",
"cost_basis": 1,
"name": "example",
"note": "example",
"quantity": 1,
"source_note": "example",
"symbol": "example"
}

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
closed_at
required
Any of:
string format: date-time
cost_basis
required
Any of:
string
events
required
Events
integer
id
required
Id
string format: uuid
market_value
required
Any of:
string
name
required
Any of:
string
opened_on
required
Opened On
string format: date
price
required
Any of:
string
price_as_of
required
Any of:
string format: date
price_source
required
Any of:
string
quantity
required
Quantity
string
stale_price
required
Stale Price
boolean
symbol
required
Symbol
string
unrealized_gain
required
Any of:
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>
ValidationError
object
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"
}
]
}