Skip to content
Get started

Accounts

Manage trading accounts, balances, and portfolio history.

Get Accounts
client.v1.accounts.getAccounts(AccountGetAccountsParams { page_size, page_token } query?, RequestOptionsoptions?): AccountGetAccountsResponse { data }
GET/v1/accounts
Get Account By ID
client.v1.accounts.getAccountByID(numberaccountID, RequestOptionsoptions?): AccountGetAccountByIDResponse { data }
GET/v1/accounts/{account_id}
Patch Account By ID
client.v1.accounts.patchAccountByID(numberaccountID, AccountPatchAccountByIDParams { risk } body, RequestOptionsoptions?): AccountPatchAccountByIDResponse { data }
PATCH/v1/accounts/{account_id}
Get Account Balances
client.v1.accounts.getAccountBalances(numberaccountID, AccountGetAccountBalancesParams { top_margin_contributors_limit } query?, RequestOptionsoptions?): AccountGetAccountBalancesResponse { data }
GET/v1/accounts/{account_id}/balances
Get Portfolio History
client.v1.accounts.getPortfolioHistory(numberaccountID, AccountGetPortfolioHistoryParams { start_date, end_date } query, RequestOptionsoptions?): AccountGetPortfolioHistoryResponse { data }
GET/v1/accounts/{account_id}/portfolio-history
ModelsExpand Collapse
Account { id, account_holder_entity_id, full_name, 7 more }

Represents a trading account

id: number

The unique identifier for the account

formatint64
account_holder_entity_id: number

The account holder entity identifier

formatint64
full_name: string

The full legal name of the account

open_date: string

The date the account was opened

formatdate
options_level: number

The options level of the account

formatint64
short_name: string

The short name of the account

The current status of the account

One of the following:
"ACTIVE"
"INACTIVE"
"CLOSED"

The sub-type of account

One of the following:
"CASH"
"MARGIN"
"OTHER"

The type of account

One of the following:
"CUSTOMER"
"OTHER"
close_date?: string | null

The date the account was closed, if applicable

formatdate
AccountBalances { account_id, buying_power, currency, 16 more }

Represents the balance details for a trading account

account_id: number

The unique identifier for the account

formatint64
buying_power: string

The total buying power available in the account.

currency: string

Currency identifier for all monetary values.

daily_realized_pnl: string

Realized profit or loss since start of day.

daily_total_pnl: string

Total profit or loss since start of day.

daily_unrealized_pnl: string

Total unrealized profit or loss across all positions relative to prior close.

equity: string

The total equity in the account.

long_market_value: string

The total market value of all long positions.

margin_type: MarginType

The applicable margin model for the account

One of the following:
"OTHER"
"NONE"
"PORTFOLIO_MARGIN"
"RISK_BASED_HAIRCUT_BROKER_DEALER"
"REG_T"
"RISK_BASED_HAIRCUT_MARKET_MAKER"
"CIRO"
"FUTURES_NLV"
"FUTURES_TOT_EQ"
open_order_adjustment: string

Signed buying-power correction from open orders.

settled_cash: string

The amount of cash that is settled and available for withdrawal or trading.

sod: AccountBalancesSod { buying_power, equity, long_market_value, 6 more }

Start-of-day snapshot balances.

buying_power: string

Start-of-day buying power.

equity: string

Start-of-day equity.

long_market_value: string

Start-of-day long market value.

short_market_value: string

Start-of-day short market value.

asof?: string | null

Timestamp for the start-of-day values.

formatdate
day_trade_buying_power?: string | null

Start-of-day day-trade buying power.

maintenance_margin_excess?: string | null

Start-of-day maintenance margin excess.

maintenance_margin_requirement?: string | null

Start-of-day maintenance margin requirement.

trade_cash?: string | null

Start-of-day trade cash.

trade_cash: string

Trade-date effective cash.

unsettled_credits: string

Trade-date unsettled cash credits.

unsettled_debits: string

Trade-date unsettled cash debits.

withdrawable_cash: string

The amount of cash currently available to withdraw.

margin_details?: MarginDetails { day_trade_count, initial_margin_excess, initial_margin_requirement, 6 more } | null

Margin-account-only details.

day_trade_count: number

The number of day trades executed over the 5 most recent trading days.

formatint32
minimum0
initial_margin_excess: string

Initial margin excess for trade-date balances.

initial_margin_requirement: string

Initial margin requirement for trade-date balances.

maintenance_margin_excess: string

Maintenance margin excess for trade-date balances.

maintenance_margin_requirement: string

Maintenance margin requirement for trade-date balances.

pattern_day_trader: boolean

true if the account is currently flagged as a PDT, otherwise false.

day_trade_buying_power_usage?: string | null

The amount of day-trade buying power used during the current trading day.

top_contributors?: Array<MarginTopContributor { day_trade_buying_power_usage, initial_margin_requirement, maintenance_margin_requirement, 2 more } >

Optional top margin contributors, returned only when explicitly requested.

day_trade_buying_power_usage: string

Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts.

initial_margin_requirement: string

Initial margin requirement attributable to this underlying.

maintenance_margin_requirement: string

Maintenance margin requirement attributable to this underlying.

market_value: string

Net market value attributable to this underlying.

underlying_instrument_id: string

UUID of the underlying security contributing to margin requirement.

formatuuid
usage?: MarginDetailsUsage { total, used } | null

Current usage totals.

total: string

The total margin available in the current model.

used: string

The amount of margin that is currently being utilized.

multiplier?: string | null

Applied multiplier for margin calculations.

short_market_value?: string | null

The total market value of all short positions.

AccountBalancesSod { buying_power, equity, long_market_value, 6 more }
buying_power: string

Start-of-day buying power.

equity: string

Start-of-day equity.

long_market_value: string

Start-of-day long market value.

short_market_value: string

Start-of-day short market value.

asof?: string | null

Timestamp for the start-of-day values.

formatdate
day_trade_buying_power?: string | null

Start-of-day day-trade buying power.

maintenance_margin_excess?: string | null

Start-of-day maintenance margin excess.

maintenance_margin_requirement?: string | null

Start-of-day maintenance margin requirement.

trade_cash?: string | null

Start-of-day trade cash.

AccountList = Array<Account { id, account_holder_entity_id, full_name, 7 more } >
id: number

The unique identifier for the account

formatint64
account_holder_entity_id: number

The account holder entity identifier

formatint64
full_name: string

The full legal name of the account

open_date: string

The date the account was opened

formatdate
options_level: number

The options level of the account

formatint64
short_name: string

The short name of the account

The current status of the account

One of the following:
"ACTIVE"
"INACTIVE"
"CLOSED"

The sub-type of account

One of the following:
"CASH"
"MARGIN"
"OTHER"

The type of account

One of the following:
"CUSTOMER"
"OTHER"
close_date?: string | null

The date the account was closed, if applicable

formatdate
AccountSettings { risk }
risk?: RiskSettings { max_notional } | null

Risk settings for the account

max_notional?: string | null

The maximum notional value available to the account

AccountStatus = "ACTIVE" | "INACTIVE" | "CLOSED"

Account status

One of the following:
"ACTIVE"
"INACTIVE"
"CLOSED"
AccountSubtype = "CASH" | "MARGIN" | "OTHER"

Account subtype classification providing more granular categorization

One of the following:
"CASH"
"MARGIN"
"OTHER"
AccountType = "CUSTOMER" | "OTHER"

Account type classification

One of the following:
"CUSTOMER"
"OTHER"
MarginDetails { day_trade_count, initial_margin_excess, initial_margin_requirement, 6 more }
day_trade_count: number

The number of day trades executed over the 5 most recent trading days.

formatint32
minimum0
initial_margin_excess: string

Initial margin excess for trade-date balances.

initial_margin_requirement: string

Initial margin requirement for trade-date balances.

maintenance_margin_excess: string

Maintenance margin excess for trade-date balances.

maintenance_margin_requirement: string

Maintenance margin requirement for trade-date balances.

pattern_day_trader: boolean

true if the account is currently flagged as a PDT, otherwise false.

day_trade_buying_power_usage?: string | null

The amount of day-trade buying power used during the current trading day.

top_contributors?: Array<MarginTopContributor { day_trade_buying_power_usage, initial_margin_requirement, maintenance_margin_requirement, 2 more } >

Optional top margin contributors, returned only when explicitly requested.

day_trade_buying_power_usage: string

Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts.

initial_margin_requirement: string

Initial margin requirement attributable to this underlying.

maintenance_margin_requirement: string

Maintenance margin requirement attributable to this underlying.

market_value: string

Net market value attributable to this underlying.

underlying_instrument_id: string

UUID of the underlying security contributing to margin requirement.

formatuuid
usage?: MarginDetailsUsage { total, used } | null

Current usage totals.

total: string

The total margin available in the current model.

used: string

The amount of margin that is currently being utilized.

MarginDetailsUsage { total, used }
total: string

The total margin available in the current model.

used: string

The amount of margin that is currently being utilized.

MarginTopContributor { day_trade_buying_power_usage, initial_margin_requirement, maintenance_margin_requirement, 2 more }
day_trade_buying_power_usage: string

Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts.

initial_margin_requirement: string

Initial margin requirement attributable to this underlying.

maintenance_margin_requirement: string

Maintenance margin requirement attributable to this underlying.

market_value: string

Net market value attributable to this underlying.

underlying_instrument_id: string

UUID of the underlying security contributing to margin requirement.

formatuuid
MarginType = "OTHER" | "NONE" | "PORTFOLIO_MARGIN" | 6 more

An account’s margin type

One of the following:
"OTHER"
"NONE"
"PORTFOLIO_MARGIN"
"RISK_BASED_HAIRCUT_BROKER_DEALER"
"REG_T"
"RISK_BASED_HAIRCUT_MARKET_MAKER"
"CIRO"
"FUTURES_NLV"
"FUTURES_TOT_EQ"
PortfolioHistoryResponse { segments }
segments: Array<PortfolioHistorySegment { date, eod_equity, realized_pnl, 7 more } >
date: string

The date for this segment

formatdate
eod_equity: string

The equity at the end of the trading day.

realized_pnl: string

Sum of the profit and loss realized from position closing trading activity.

sod_equity: string

The equity at the start of the trading day.

unrealized_pnl: string

Sum of the profit and loss from market changes.

bought_notional?: string | null

Amount bought MTM

day_pnl?: string | null

Sum of the profit and loss from intraday trading activities for the trading day.

net_pnl?: string | null

P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses

position_pnl?: string | null

P&L attributable to start-of-day (carried) positions from market movement during this trading day.

sold_notional?: string | null

Amount sold MTM

PortfolioHistorySegment { date, eod_equity, realized_pnl, 7 more }
date: string

The date for this segment

formatdate
eod_equity: string

The equity at the end of the trading day.

realized_pnl: string

Sum of the profit and loss realized from position closing trading activity.

sod_equity: string

The equity at the start of the trading day.

unrealized_pnl: string

Sum of the profit and loss from market changes.

bought_notional?: string | null

Amount bought MTM

day_pnl?: string | null

Sum of the profit and loss from intraday trading activities for the trading day.

net_pnl?: string | null

P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses

position_pnl?: string | null

P&L attributable to start-of-day (carried) positions from market movement during this trading day.

sold_notional?: string | null

Amount sold MTM

RiskSettings { max_notional }

Risk settings for an account

max_notional?: string | null

The maximum notional value available to the account

AccountGetAccountsResponse extends BaseResponse { metadata, error } { data }
data: AccountList { id, account_holder_entity_id, full_name, 7 more }
id: number

The unique identifier for the account

formatint64
account_holder_entity_id: number

The account holder entity identifier

formatint64
full_name: string

The full legal name of the account

open_date: string

The date the account was opened

formatdate
options_level: number

The options level of the account

formatint64
short_name: string

The short name of the account

The current status of the account

One of the following:
"ACTIVE"
"INACTIVE"
"CLOSED"

The sub-type of account

One of the following:
"CASH"
"MARGIN"
"OTHER"

The type of account

One of the following:
"CUSTOMER"
"OTHER"
close_date?: string | null

The date the account was closed, if applicable

formatdate
AccountGetAccountByIDResponse extends BaseResponse { metadata, error } { data }
data: Account { id, account_holder_entity_id, full_name, 7 more }

Represents a trading account

id: number

The unique identifier for the account

formatint64
account_holder_entity_id: number

The account holder entity identifier

formatint64
full_name: string

The full legal name of the account

open_date: string

The date the account was opened

formatdate
options_level: number

The options level of the account

formatint64
short_name: string

The short name of the account

The current status of the account

One of the following:
"ACTIVE"
"INACTIVE"
"CLOSED"

The sub-type of account

One of the following:
"CASH"
"MARGIN"
"OTHER"

The type of account

One of the following:
"CUSTOMER"
"OTHER"
close_date?: string | null

The date the account was closed, if applicable

formatdate
AccountPatchAccountByIDResponse extends BaseResponse { metadata, error } { data }
data: AccountSettings { risk }
risk?: RiskSettings { max_notional } | null

Risk settings for the account

max_notional?: string | null

The maximum notional value available to the account

AccountGetAccountBalancesResponse extends BaseResponse { metadata, error } { data }
data: AccountBalances { account_id, buying_power, currency, 16 more }

Represents the balance details for a trading account

account_id: number

The unique identifier for the account

formatint64
buying_power: string

The total buying power available in the account.

currency: string

Currency identifier for all monetary values.

daily_realized_pnl: string

Realized profit or loss since start of day.

daily_total_pnl: string

Total profit or loss since start of day.

daily_unrealized_pnl: string

Total unrealized profit or loss across all positions relative to prior close.

equity: string

The total equity in the account.

long_market_value: string

The total market value of all long positions.

margin_type: MarginType

The applicable margin model for the account

One of the following:
"OTHER"
"NONE"
"PORTFOLIO_MARGIN"
"RISK_BASED_HAIRCUT_BROKER_DEALER"
"REG_T"
"RISK_BASED_HAIRCUT_MARKET_MAKER"
"CIRO"
"FUTURES_NLV"
"FUTURES_TOT_EQ"
open_order_adjustment: string

Signed buying-power correction from open orders.

settled_cash: string

The amount of cash that is settled and available for withdrawal or trading.

sod: AccountBalancesSod { buying_power, equity, long_market_value, 6 more }

Start-of-day snapshot balances.

buying_power: string

Start-of-day buying power.

equity: string

Start-of-day equity.

long_market_value: string

Start-of-day long market value.

short_market_value: string

Start-of-day short market value.

asof?: string | null

Timestamp for the start-of-day values.

formatdate
day_trade_buying_power?: string | null

Start-of-day day-trade buying power.

maintenance_margin_excess?: string | null

Start-of-day maintenance margin excess.

maintenance_margin_requirement?: string | null

Start-of-day maintenance margin requirement.

trade_cash?: string | null

Start-of-day trade cash.

trade_cash: string

Trade-date effective cash.

unsettled_credits: string

Trade-date unsettled cash credits.

unsettled_debits: string

Trade-date unsettled cash debits.

withdrawable_cash: string

The amount of cash currently available to withdraw.

margin_details?: MarginDetails { day_trade_count, initial_margin_excess, initial_margin_requirement, 6 more } | null

Margin-account-only details.

day_trade_count: number

The number of day trades executed over the 5 most recent trading days.

formatint32
minimum0
initial_margin_excess: string

Initial margin excess for trade-date balances.

initial_margin_requirement: string

Initial margin requirement for trade-date balances.

maintenance_margin_excess: string

Maintenance margin excess for trade-date balances.

maintenance_margin_requirement: string

Maintenance margin requirement for trade-date balances.

pattern_day_trader: boolean

true if the account is currently flagged as a PDT, otherwise false.

day_trade_buying_power_usage?: string | null

The amount of day-trade buying power used during the current trading day.

top_contributors?: Array<MarginTopContributor { day_trade_buying_power_usage, initial_margin_requirement, maintenance_margin_requirement, 2 more } >

Optional top margin contributors, returned only when explicitly requested.

day_trade_buying_power_usage: string

Day-trade buying power consumed by fills against this underlying on the current trade date. Populated only for pattern day trader accounts.

initial_margin_requirement: string

Initial margin requirement attributable to this underlying.

maintenance_margin_requirement: string

Maintenance margin requirement attributable to this underlying.

market_value: string

Net market value attributable to this underlying.

underlying_instrument_id: string

UUID of the underlying security contributing to margin requirement.

formatuuid
usage?: MarginDetailsUsage { total, used } | null

Current usage totals.

total: string

The total margin available in the current model.

used: string

The amount of margin that is currently being utilized.

multiplier?: string | null

Applied multiplier for margin calculations.

short_market_value?: string | null

The total market value of all short positions.

AccountGetPortfolioHistoryResponse extends BaseResponse { metadata, error } { data }
data: PortfolioHistoryResponse { segments }
segments: Array<PortfolioHistorySegment { date, eod_equity, realized_pnl, 7 more } >
date: string

The date for this segment

formatdate
eod_equity: string

The equity at the end of the trading day.

realized_pnl: string

Sum of the profit and loss realized from position closing trading activity.

sod_equity: string

The equity at the start of the trading day.

unrealized_pnl: string

Sum of the profit and loss from market changes.

bought_notional?: string | null

Amount bought MTM

day_pnl?: string | null

Sum of the profit and loss from intraday trading activities for the trading day.

net_pnl?: string | null

P&L after netting all realized and unrealized P&L, adjustments, dividends, change in accruals, income and expenses

position_pnl?: string | null

P&L attributable to start-of-day (carried) positions from market movement during this trading day.

sold_notional?: string | null

Amount sold MTM