# Accounts ## Get Accounts `client.v1.accounts.getAccounts(AccountGetAccountsParamsquery?, RequestOptionsoptions?): AccountGetAccountsResponse` **get** `/v1/accounts` List accounts the authenticated user has permission to access ### Parameters - `query: AccountGetAccountsParams` - `page_size?: number` The number of items to return per page. Only used when page_token is not provided. - `page_token?: string` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. ### Returns - `AccountGetAccountsResponse extends BaseResponse` - `data: AccountList` - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Example ```typescript import ClearStreet from '@clear-street-internal/sdk'; const client = new ClearStreet({ apiKey: 'My API Key', }); const response = await client.v1.accounts.getAccounts(); console.log(response); ``` #### Response ```json { "data": [ { "account_holder_entity_id": 987654321, "close_date": null, "full_name": "Test Trading Account", "id": 19816, "open_date": "2023-01-15", "short_name": "TST-ACCOUNT-01", "status": "ACTIVE", "subtype": "MARGIN", "type": "CUSTOMER" }, { "account_holder_entity_id": 987654322, "close_date": "2024-08-01", "full_name": "Old Test Account", "id": 19817, "open_date": "2021-05-20", "short_name": "TST-ACCOUNT-02-CLOSED", "status": "CLOSED", "subtype": "CASH", "type": "CUSTOMER" } ], "error": null, "metadata": { "next_page_token": "cGFnZT0yJmxhc3RfaWQ9MTk4MTc=", "page_number": 1, "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "total_items": 25, "total_pages": 3 } } ``` ## Get Account By ID `client.v1.accounts.getAccountByID(numberaccountID, RequestOptionsoptions?): AccountGetAccountByIDResponse` **get** `/v1/accounts/{account_id}` Fetch account details by ID ### Parameters - `accountID: number` ### Returns - `AccountGetAccountByIDResponse extends BaseResponse` - `data: Account` Represents a trading account - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Example ```typescript import ClearStreet from '@clear-street-internal/sdk'; const client = new ClearStreet({ apiKey: 'My API Key', }); const response = await client.v1.accounts.getAccountByID(0); console.log(response); ``` #### Response ```json { "data": { "account_holder_entity_id": 987654321, "close_date": null, "full_name": "Test Trading Account", "id": 19816, "open_date": "2023-01-15", "short_name": "TST-ACCOUNT-01", "status": "ACTIVE", "subtype": "MARGIN", "type": "CUSTOMER" }, "error": null, "metadata": { "request_id": "b7e2d3f4-a1b2-4c3d-8e4f-5a6b7c8d9e0f" } } ``` ## Patch Account By ID `client.v1.accounts.patchAccountByID(numberaccountID, AccountPatchAccountByIDParamsbody, RequestOptionsoptions?): AccountPatchAccountByIDResponse` **patch** `/v1/accounts/{account_id}` Update account risk settings ### Parameters - `accountID: number` - `body: AccountPatchAccountByIDParams` - `risk?: RiskSettings | null` Risk settings for the account - `max_notional?: string | null` The maximum notional value available to the account ### Returns - `AccountPatchAccountByIDResponse extends BaseResponse` - `data: AccountSettings` - `risk?: RiskSettings | null` Risk settings for the account - `max_notional?: string | null` The maximum notional value available to the account ### Example ```typescript import ClearStreet from '@clear-street-internal/sdk'; const client = new ClearStreet({ apiKey: 'My API Key', }); const response = await client.v1.accounts.patchAccountByID(0); console.log(response); ``` #### Response ```json { "data": { "risk": { "max_notional": "5000000.00" } }, "error": null, "metadata": { "request_id": "c8f3e4a5-b2c3-5d4e-9f0a-6b7c8d9e0f1a" } } ``` ## Get Account Balances `client.v1.accounts.getAccountBalances(numberaccountID, AccountGetAccountBalancesParamsquery?, RequestOptionsoptions?): AccountGetAccountBalancesResponse` **get** `/v1/accounts/{account_id}/balances` Fetch account balance information ### Parameters - `accountID: number` - `query: AccountGetAccountBalancesParams` - `top_margin_contributors_limit?: number` Limit the number of top margin contributors returned by the engine. ### Returns - `AccountGetAccountBalancesResponse extends BaseResponse` - `data: AccountBalances` Represents the balance details for a trading account - `account_id: number` The unique identifier for the account - `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 - `"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` 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. - `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 | null` Margin-account-only details. - `day_trade_count: number` The number of day trades executed over the 5 most recent trading days. - `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` 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. - `usage?: MarginDetailsUsage | 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. ### Example ```typescript import ClearStreet from '@clear-street-internal/sdk'; const client = new ClearStreet({ apiKey: 'My API Key', }); const response = await client.v1.accounts.getAccountBalances(0); console.log(response); ``` #### Response ```json { "data": { "account_id": 19816, "buying_power": "45000.00", "currency": "USD", "daily_realized_pnl": "700.00", "daily_total_pnl": "1250.00", "daily_unrealized_pnl": "550.00", "equity": "100000.00", "long_market_value": "30000.00", "margin_type": "NONE", "open_order_adjustment": "-5000.00", "settled_cash": "60000.00", "sod": { "asof": "2023-09-27", "buying_power": "45000.00", "equity": "100000.00", "long_market_value": "30000.00" }, "trade_cash": "60000.00", "unsettled_credits": "20000.00", "unsettled_debits": "10000.00", "withdrawable_cash": "55000.00" }, "error": null, "metadata": { "request_id": "b7e2d3f4-a1b2-4c3d-8e4f-5a6b7c8d9e0f" } } ``` ## Get Portfolio History `client.v1.accounts.getPortfolioHistory(numberaccountID, AccountGetPortfolioHistoryParamsquery, RequestOptionsoptions?): AccountGetPortfolioHistoryResponse` **get** `/v1/accounts/{account_id}/portfolio-history` Retrieves daily portfolio history for the specified account. ### Parameters - `accountID: number` - `query: AccountGetPortfolioHistoryParams` - `start_date: string` Start date for the portfolio history range, in YYYY-MM-DD format. - `end_date?: string` Defaults to today in America/New_York when omitted. ### Returns - `AccountGetPortfolioHistoryResponse extends BaseResponse` - `data: PortfolioHistoryResponse` - `segments: Array` - `date: string` The date for this segment - `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 ### Example ```typescript import ClearStreet from '@clear-street-internal/sdk'; const client = new ClearStreet({ apiKey: 'My API Key', }); const response = await client.v1.accounts.getPortfolioHistory(0, { start_date: '2019-12-27' }); console.log(response); ``` #### Response ```json { "data": { "segments": [ { "bought_notional": "39800.00", "date": "2026-04-15", "day_pnl": "850.25", "eod_equity": "100850.25", "net_pnl": "850.25", "position_pnl": "-350.25", "realized_pnl": "1200.50", "sod_equity": "100000.00", "sold_notional": "42500.00", "unrealized_pnl": "-350.25" } ] }, "error": null, "metadata": { "request_id": "f076d6f6-10c9-42a0-98c5-18cebc427e80" } } ``` ## Domain Types ### Account - `Account` Represents a trading account - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Account Balances - `AccountBalances` Represents the balance details for a trading account - `account_id: number` The unique identifier for the account - `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 - `"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` 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. - `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 | null` Margin-account-only details. - `day_trade_count: number` The number of day trades executed over the 5 most recent trading days. - `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` 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. - `usage?: MarginDetailsUsage | 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. ### Account Balances Sod - `AccountBalancesSod` - `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. - `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. ### Account List - `AccountList = Array` - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Account Settings - `AccountSettings` - `risk?: RiskSettings | null` Risk settings for the account - `max_notional?: string | null` The maximum notional value available to the account ### Account Status - `AccountStatus = "ACTIVE" | "INACTIVE" | "CLOSED"` Account status - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` ### Account Subtype - `AccountSubtype = "CASH" | "MARGIN" | "OTHER"` Account subtype classification providing more granular categorization - `"CASH"` - `"MARGIN"` - `"OTHER"` ### Account Type - `AccountType = "CUSTOMER" | "OTHER"` Account type classification - `"CUSTOMER"` - `"OTHER"` ### Margin Details - `MarginDetails` - `day_trade_count: number` The number of day trades executed over the 5 most recent trading days. - `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` 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. - `usage?: MarginDetailsUsage | 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. ### Margin Details Usage - `MarginDetailsUsage` - `total: string` The total margin available in the current model. - `used: string` The amount of margin that is currently being utilized. ### Margin Top Contributor - `MarginTopContributor` - `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. ### Margin Type - `MarginType = "OTHER" | "NONE" | "PORTFOLIO_MARGIN" | 6 more` An account's margin type - `"OTHER"` - `"NONE"` - `"PORTFOLIO_MARGIN"` - `"RISK_BASED_HAIRCUT_BROKER_DEALER"` - `"REG_T"` - `"RISK_BASED_HAIRCUT_MARKET_MAKER"` - `"CIRO"` - `"FUTURES_NLV"` - `"FUTURES_TOT_EQ"` ### Portfolio History Response - `PortfolioHistoryResponse` - `segments: Array` - `date: string` The date for this segment - `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 ### Portfolio History Segment - `PortfolioHistorySegment` - `date: string` The date for this segment - `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 ### Risk Settings - `RiskSettings` Risk settings for an account - `max_notional?: string | null` The maximum notional value available to the account ### Account Get Accounts Response - `AccountGetAccountsResponse extends BaseResponse` - `data: AccountList` - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Account Get Account By ID Response - `AccountGetAccountByIDResponse extends BaseResponse` - `data: Account` Represents a trading account - `id: number` The unique identifier for the account - `account_holder_entity_id: number` The account holder entity identifier - `full_name: string` The full legal name of the account - `open_date: string` The date the account was opened - `options_level: number` The options level of the account - `short_name: string` The short name of the account - `status: AccountStatus` The current status of the account - `"ACTIVE"` - `"INACTIVE"` - `"CLOSED"` - `subtype: AccountSubtype` The sub-type of account - `"CASH"` - `"MARGIN"` - `"OTHER"` - `type: AccountType` The type of account - `"CUSTOMER"` - `"OTHER"` - `close_date?: string | null` The date the account was closed, if applicable ### Account Patch Account By ID Response - `AccountPatchAccountByIDResponse extends BaseResponse` - `data: AccountSettings` - `risk?: RiskSettings | null` Risk settings for the account - `max_notional?: string | null` The maximum notional value available to the account ### Account Get Account Balances Response - `AccountGetAccountBalancesResponse extends BaseResponse` - `data: AccountBalances` Represents the balance details for a trading account - `account_id: number` The unique identifier for the account - `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 - `"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` 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. - `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 | null` Margin-account-only details. - `day_trade_count: number` The number of day trades executed over the 5 most recent trading days. - `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` 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. - `usage?: MarginDetailsUsage | 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. ### Account Get Portfolio History Response - `AccountGetPortfolioHistoryResponse extends BaseResponse` - `data: PortfolioHistoryResponse` - `segments: Array` - `date: string` The date for this segment - `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