Account Positions (NEW)

View as MarkdownOpen in Claude

Returns a list of positions for the given account. /v1/api/portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint. This endpoint provides near-real time updates and removes caching otherwise found in the /portfolio/{accountId}/positions/{pageId} endpoint.

Authentication

AuthorizationBearer
SSO bearer token.

Path parameters

accountIdstringRequired

Query parameters

modelstringOptional
directionenumOptionalDefaults to a
The chronologic order of orders to sort by. * `a` - Display in ascending order. * `d` - Display in descending order.
Allowed values:

Response

response with position details
assetClassstringOptional
Asset class of the requested instrument.
avgCostanyOptional
The account's average cost for its position.
avgPricedoubleOptional
The account's average price for its position.
conidlongOptional
IB contract ID for the instrument.
currencystringOptional
Currency in which the instrument trades.
descriptionstringOptional
Contract's local symbol
groupstringOptional

Industry sub-categorization of the instrument.

isLastToLoqbooleanOptional
marketPricedoubleOptional
Current market price of the instrument, in the instrument's currency.
marketValuedoubleOptional
Current market value of the account's position in the instrument, in the instrument's currency.
modelstringOptional
Name of the model portfolio in which the account is invested that contributes this position.
positiondoubleOptional
Size of position in units of instrument.
realizedPnldoubleOptional
Realized PnL for the instrument in the instrument's currency.
secTypestringOptional
The security type of the instrument.
sectorstringOptional
Industry sector categorization of the instrument.
timestamplongOptional
Time taken to retrieve position data in milliseconds.
unrealizedPnldoubleOptional
Unrealized PnL for the instrument in the account.

Errors

401
Unauthorized Error
500
Internal Server Error
503
Service Unavailable Error