Trading Account Metrics
Learn about account metrics like balance, positions, and portfolio history.
Trading Account Metrics
Section titled “Trading Account Metrics”Balances
Section titled “Balances”Balances endpoint gives you a real-time view of your account’s financial state. There is an optional query parameter called top_margin_contributors_limit which provides the top margin contributors for your account.
Balances Response
Section titled “Balances Response”Data Fields
| Field | Type | Description |
|---|---|---|
| account_id | integer | Account identifier. |
| buying_power | decimal string | Projected buying power available after current positions and risk-increasing open orders. |
| currency | string | Currency for monetary values, USD. |
| daily_realized_pnl | decimal string | Realized daily P&L, calculated as daily_total_pnl - daily_unrealized_pnl. |
| daily_total_pnl | decimal string | Total daily P&L, calculated as current equity minus start-of-day equity. |
| daily_unrealized_pnl | decimal string | Total unrealized P&L across positions versus prior close. |
| equity | decimal string | Current trade-date account equity based on cash and positions. trade_cash + long_market_value - short_market_value |
| long_market_value | decimal string | Current market value of long positions, excluding cash. |
| margin_type | string | Account margin model, such as NONE, REG_T, or PORTFOLIO_MARGIN. |
| open_order_adjustment | decimal string | Buying-power adjustment from open orders.Negative means open orders are consuming buying power. |
| settled_cash | decimal string | Settle-date cash balance. |
| sod | object | Start-of-day balance snapshot. |
| trade_cash | decimal string | Trade-date cash balance. |
| unsettled_credits | decimal string | Trade-date unsettled cash credits. |
| unsettled_debits | decimal string | Trade-date unsettled cash debits. |
| withdrawable_cash | string | The amount of cash currently available to withdraw. |
| margin_details | object, optional | Reg T margin-specific details. Omitted for non-Reg T accounts. |
| multiplier | decimal string, optional | Effective margin multiplier. Present for Reg T accounts. |
| short_market_value | decimal string | Current market value of short positions, excluding cash. |
SOD Fields
Section titled “SOD Fields”| Field | Type | Description |
|---|---|---|
| buying_power | decimal string | Start-of-day buying power. For cash accounts, this maps to SOD cash. |
| equity | decimal string | Start-of-day account equity. |
| long_market_value | decimal string | Start-of-day long market value. |
| short_market_value | decimal string | Start-of-day short market value. |
| asof | date, optional | Date of the start-of-day snapshot. |
| day_trade_buying_power | decimal string, optional | Deprecated legacy field indicating start-of-day day-trade buying power. Reg T/PDT only. |
| maintenance_margin_excess | decimal string, optional | Start-of-day maintenance margin excess. Reg T only. |
| maintenance_margin_requirement | decimal string, optional | Start-of-day maintenance margin requirement. Reg T only. |
| trade_cash | decimal string, optional | Start-of-day trade cash. Reg T only. |
Margin Details Fields
| Field | Type | Description |
|---|---|---|
| day_trade_count | integer | Deprecated legacy field indicating number of day trades over the five most recent trading days. |
| initial_margin_excess | decimal string | Current equity above initial margin requirement. |
| initial_margin_requirement | decimal string | Current initial margin requirement. |
| maintenance_margin_excess | decimal string | Current maintenance margin excess. |
| maintenance_margin_requirement | decimal string | Current maintenance margin requirement. |
| pattern_day_trader | boolean | Deprecated legacy field indicating whether the account is currently flagged as a Pattern Day Trader. |
| day_trade_buying_power_usage | decimal string, optional | Deprecated legacy field indicating day-trade buying power used today. |
| top_contributors | array, optional | Top per-underlying margin contributors. Returned only when requested with top_margin_contributors_limit. |
| usage | object, optional | Current margin usage totals. |
Margin Details Usage Fields
| Field | Type | Description |
|---|---|---|
| total | decimal string | Total available capacity, calculated as used plus excess. |
| used | decimal string | Amount of margin or day-trade buying power currently being used. |
Margin Details Top Contributors
| Field | Type | Description |
|---|---|---|
| day_trade_buying_power_usage | string | Deprecated legacy field indicating 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 | decimal string | Initial margin requirement attributable to this underlying. |
| maintenance_margin_requirement | decimal string | Maintenance margin requirement attributable to this underlying. |
| market_value | decimal string | Net market value attributable to this underlying. |
| underlying_instrument_id | UUID string | Underlying instrument contributing to margin requirement. |
Positions
Section titled “Positions”The Positions API lets clients retrieve current account holdings. It also supports close-position workflows that submit market DAY orders to flatten one or all non-cash positions, with trade permission required for those actions.
| Name | Method | Path | Description |
|---|---|---|---|
| List Positions | GET | /v1/accounts/{account_id}/positions | Returns current positions for the account, with optional filtering, sorting, and pagination. Requires view permission. |
| Close Position | DELETE | /v1/accounts/{account_id}/positions/{instrument_id} | Submits a market DAY order to flatten one non-cash position for the specified instrument. Optionally cancels related open orders first. Important to note that if there are open orders close positon will reject unless open orders are canceled. |
| Close Positions | DELETE | /v1/accounts/{account_id}/positions | Submits market DAY orders to flatten all non-cash positions in the account. Optionally cancels related open orders first. Important to note that if there are open orders close positons will reject unless open orders are canceled. |
List Positions
Section titled “List Positions”The list positions endpoint returns your current holdings, including real-time P&L calculations.
List Positions Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| instrument_ids | string | No | Comma-separated instrument UUIDs |
| page_size | integer | No | Number of positions to return. Defaults to 1000; maximum 1000. |
| page_token | string | No | Pagination token from metadata.next_page_token or metadata.previous_page_token. |
| sort_by | enum | No | One of SYMBOL, INSTRUMENT_TYPE, QUANTITY, MARKET_VALUE, POSITION_TYPE, UNREALIZED_PNL, or DAILY_UNREALIZED_PNL. Defaults to SYMBOL. |
| sort_direction | enum | No | ASC or DESC. Defaults to ASC. |
List Positions Response
| Field | Description |
|---|---|
| account_id | Account that owns the position. |
| available_quantity | Quantity currently available to act on. May differ from quantity due to open orders or other constraints. |
| instrument_id | UUID for an instrument |
| instrument_type | Instrument type, such as COMMON_STOCK, OPTION, or CASH. |
| market_value | Current market value. |
| position_type | Position direction, such as LONG or SHORT. |
| quantity | Signed position quantity. Positive is long; negative is short. |
| symbol | Display symbol. For cash positions, this is usually the currency, such as USD. |
| avg_price | Average position price, when available. |
| closing_price | Previous close price used for valuation, when available. |
| closing_price_date | The market date associated with closing_price |
| cost_basis | Total cost basis, when available. |
| daily_unrealized_pnl | Current-day unrealized P&L, when available. |
| daily_unrealized_pnl_pct | Current-day unrealized P&L percentage, when available. |
| instrument_price | Current market price, of the instrument. |
| underlying_instrument_id | Underlying instrument ID for options, when available. |
| unrealized_pnl | Total unrealized P&L, when available. |
| unrealized_pnl_pct | Total unrealized P&L percentage, when available. |
Close Position
Section titled “Close Position”Closes an open position positions.
Close One Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| account_id | integer | Yes | Clear Street account identifier. |
| instrument_id | string | Yes | UUID for an instrument |
Behavior
- For a long position, a market DAY sell order is sent for the net quantity.
- For a short position, a market DAY buy order for the absolute net quantity.
- Cash positions and already-flat positions are skipped. If no order is needed, the endpoint returns an empty data array.
Close Position Response
Returns order status for generated order.
Close All Positions
Section titled “Close All Positions”Closes all positions
Behavior
Evaluates every current non-cash position in the account and submits market DAY orders to flatten them. Long positions generate sell orders. Short positions generate buy orders. Cash positions and already-flat positions are skipped.
Portfolio History
Section titled “Portfolio History”Get portfolio history endpoint returns daily snapshots of your account equity, letting you track performance over time. Each snapshot includes the opening equity, closing equity, and daily P&L for that trading day.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date | Yes | Inclusive start date in YYYY-MM-DD format. |
| end_date | date | No | Inclusive end date in YYYY-MM-DD format. Must be on or before the current UTC date. |
Note start_date must be on or before end_date.
When end_date is the current UTC date, the response includes an intraday segment computed from current balances. Some fields for that segment may be null because finalized order-flow, adjustment, dividend, accrual, income, or expense data may not yet be available.
The response may contain fewer segments than calendar days in the requested range. Non-trading days or dates with no available account history may be omitted.
Portfolio History Response
Section titled “Portfolio History Response”| Field | Description |
|---|---|
| date | Date for the segment. |
| eod_equity | Equity at the end of the trading day, or current intraday equity for the current-day segment. |
| realized_pnl | P&L realized from position-closing activity. |
| sod_equity | Equity at the start of the trading day. |
| unrealized_pnl | P&L from market changes. |
| bought_notional | Mark-to-market amount bought, when available. |
| day_pnl | P&L from intraday trading activity, when available. |
| net_pnl | Net P&L after realized P&L, unrealized P&L, adjustments, dividends, accrual changes, income, and expenses, when available. |
| position_pnl | P&L attributable to start-of-day carried positions, when available. |
| sold_notional | Mark-to-market amount sold, when available. |
Monetary values are returned as decimal strings. Nullable fields are returned as null when unavailable.