Build with the AI Skill
Trade ItTrade ItDocs
Data Models

Holding

A position in a brokerage account. Get holdings returns an array of holdings.

Note

Optional fields are not returned by every brokerage. Valuation fields like market_price can be absent or null when unavailable. warning, when present, explains missing values.

Fields

keystringoptional

Stable identifier for the position: the normalized symbol, or the compact OCC symbol for options.

symbolstring

Ticker, crypto pair, or brokerage-reported option symbol. For options, this can be the underlying ticker; use option_symbol to identify the contract.

display_symbolstringoptional

Symbol to show users.

quantitynumber

Shares, coins, or contracts held. Negative for a short position.

average_priceBalancedeprecated

Brokerage-specific legacy value; may be per contract for options (including multiplier). Use average_unit_cost to compare with market_price.

average_unit_costBalance | nulloptional

Average cost per share, coin, or option share, before multiplier. Null when the brokerage does not report it.

descriptionstringoptional

Security name or brokerage description; may be a ticker or OCC option symbol.

typeenum

Asset type: 2 for stocks and options, 4 for crypto.

0248
sideenumoptional

Whether the position is long or short.

longshort
instrument_kindenumoptional

Whether the position is an equity, crypto, or option.

equitycryptooption
option_symbolstringoptional

The option's OCC symbol as the brokerage reports it.

multipliernumberoptional

Shares each unit controls: 100 for standard options, 1 otherwise.

total_costBalance | nulloptional

Opening cost basis. Can be a positive magnitude for short positions: abs(quantity) × average_unit_cost × multiplier. Brokerage sign conventions can vary.

market_priceBalance | nulloptional

Current price per share, coin, or option share. Null when no price is available.

market_valueBalance | nulloptional

quantity × market_price × multiplier.

unrealized_pnlBalance | nulloptional

Unrealized gain or loss, accounting for position side. When calculated from unit prices: (market_price − average_unit_cost) × quantity × multiplier.

unrealized_pnl_percentnumber | nulloptional

unrealized_pnl as a percent of the absolute cost basis, such as 12.5 for 12.5%. Null when it cannot be calculated.

price_kindenumoptional

Where market_price came from. midpoint is the option bid/ask midpoint.

last_trademinute_closemidpointbrokerageunavailable
price_as_ofstring | nulloptional

ISO 8601 timestamp for the price or brokerage holdings snapshot. Null when unavailable.

delayedbooleanoptional

Whether market_price is delayed.

underlying_symbolstringoptional

The option's underlying ticker.

warningstringoptional

Why a value is missing, such as Current price unavailable.

Balance

Money fields are Balance objects.

amountnumber

Amount in currency.

currencystring

ISO 4217 currency code, such as USD.

On this page