Skip to main content
In our trading system, account balances aggregate settled cash activity and open position metrics to reflect your real-time financial state. Balances are split across two collateral pools — cross margin (shared across all cross positions) and isolated margin (dedicated to a single position) — and several balance views are derived from them.

Key Definitions

Total Balance

Total balance accumulates all settled cash flows and does not fluctuate with mark price movements.

Cross Margin Balance

Cross margin balance is the portion of totalBalance available as collateral for cross margin positions. Margin allocated to isolated positions is excluded.
When an isolated position is opened or increased, the order margin moves out of crossMarginBalance into isolatedPositionMargin. Partially closing an isolated position releases the corresponding proportion (plus realized PnL) back to crossMarginBalance.

Cross Margin Equity

Cross margin equity includes unrealized PnL from all cross margin positions, so it fluctuates in real time as the mark price moves. It is the figure used in the Cross Margin Ratio.

Isolated Position Equity

For an isolated position, equity is self-contained — only that position’s margin and unrealized PnL contribute. It is the figure used to evaluate liquidation for the isolated position.

Cross Margin Ratio

The cross margin ratio measures the health of your cross margin pool — what percentage of cross margin equity is consumed by maintenance margin requirements across all cross margin positions. Isolated positions are excluded from this calculation.
See Maintenance Margin for the per-position formula.

Simulated Cross Margin Ratio

Rails also computes a simulated ratio assuming all qualifying open orders are executed. This drives the Proactive Order Cancellation mechanism. The simulation includes position-increasing orders on both cross and isolated margin positions, with different effects on the ratio:
  • Cross margin orders increase simulated maintenance margin.
  • Isolated margin orders reduce simulated cross margin equity because filling them moves margin out of crossMarginBalance.

Available Balance

Available balance is the amount free for new orders or withdrawals. It deducts cross position margin (computed at the current mark price) and open order margin from cross margin equity. Isolated positions are excluded — their margin is already deducted via crossMarginBalance.

Withdrawable Balance

Withdrawable balance is a more conservative measure than available balance. Unrealized profits cannot be withdrawn — only realized gains contribute. Unrealized losses reduce the withdrawable balance immediately, and margin is locked at the entry price rather than the current mark price.
The sums above span all open positions — both cross and isolated. Withdrawable balance is a single account-wide figure and is not split by margin mode.

Usage in API

These calculations are used in the Get Account Balances response. totalBalance and crossMarginBalance are returned at the top level; each market’s marginMode (C or I) is reported under marketBalancesMap. Use the returned balance and position fields to derive equity by margin mode:
  • Derive crossMarginEquity by adding crossMarginBalance to the sum of unrealizedPnl for markets where marginMode is C.
  • Derive isolatedPositionEquity for an isolated market by adding that market’s margin to that market’s unrealizedPnl where marginMode is I.
The top-level margin field in the balances response represents the total position margin in use across all markets. Each market’s markPrice under marketBalancesMap is the value used to compute that market’s margin, maintenanceMargin, and unrealizedPnl — see Mark Price. The market’s indexPrice is also returned alongside it, but only feeds the mark price formula and funding — it is not the basis for margin or PnL.