Get Positions
/accounts/{accountId}/positionsReturn all open positions for the specified account.
Path Parameters
The account identifier.
Response
Successful response in standard envelope.
Status indicator. ok on success.
Array of open positions.
Unique position identifier. Example: U000016649-sell.
Ticker symbol. Example: AAPL.
Security name. Example: Apple.
Asset class. Enum: stock; etf; option; future; crypto.
Position direction. Enum: buy — long; sell — short.
Position size in shares. Negative for short positions.
Last traded price.
Previous session close price.
Average cost per share.
Current market value of the position.
Absolute price change from previous close.
Percentage price change from previous close.
Unrealized profit/loss in account currency.
Unrealized profit/loss as a decimal fraction (e.g. -0.3886 = -38.86%).
Intraday profit/loss.
Intraday profit/loss as a decimal fraction.
Exchange identifier.
Contract unit size.
Portfolio weight of the position.
Additional computed fields. Each entry has id (string) and value (number). Known IDs: breakEvenPrice, holdingDays.
Response Example
{
"s": "ok",
"d": [
{
"id": "U000016649-sell",
"instrument": "AAPL",
"name": "Apple",
"securityType": "stock",
"side": "sell",
"qty": -75.2,
"last": 261.7179,
"close": 255.78,
"avgPrice": 188.4730752401,
"mkt": -19681.19,
"change": 5.9379,
"changePct": 0.0232,
"unrealizedPL": -5508.0108,
"unrealizedPLP": -0.3886,
"dayPL": 0,
"dayPLP": 0,
"exchange": "185",
"unit": 1,
"weight": 0,
"customFields": [
{ "id": "breakEvenPrice", "value": 88.3581150266 },
{ "id": "holdingDays", "value": 595 }
]
}
]
}