Key Definitions
| Term | Description |
|---|---|
| totalBalance | Settled cash balance — unaffected by index price movements |
| crossMarginBalance | Portion of totalBalance available as collateral for cross margin positions (i.e. excluding margin locked in isolated positions) |
| isolatedPositionMargin | Margin allocated to an isolated position; for the whole account, the sum across all isolated positions |
| unrealizedPnL | Unrealized profit or loss. For cross margin metrics, use the sum across all cross margin positions. For isolated position metrics, use only that position’s unrealizedPnl (see Unrealized PnL for the per-position formula) |
| crossMarginEquity | crossMarginBalance + unrealizedPnL across all cross margin positions |
| isolatedPositionEquity | isolatedPositionMargin + unrealizedPnL for a single isolated position |
| positionMargin | Collateral locked per open position, calculated from the current index price |
| openOrderMargin | Collateral reserved for open (unfilled) orders |
Total Balance
Total balance accumulates all settled cash flows and does not fluctuate with index price movements.Cross Margin Balance
Cross margin balance is the portion oftotalBalance available as collateral for cross margin positions. Margin allocated to isolated positions is excluded.
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 index 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.| Cross Margin Ratio | Account Status |
|---|---|
| < 100% | Healthy — positions are safe |
| ≥ 100% | Liquidation triggered — all cross margin positions closed |
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.
| Simulated Cross Margin Ratio | Action |
|---|---|
| < 90% | No action |
| ≥ 90% | Risk-increasing open orders are cancelled |
Available Balance
Available balance is the amount free for new orders or withdrawals. It deducts cross position margin (computed at the current index price) and open order margin from cross margin equity. Isolated positions are excluded — their margin is already deducted viacrossMarginBalance.
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 index price.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
crossMarginEquityby addingcrossMarginBalanceto the sum ofunrealizedPnlfor markets wheremarginModeisC. - Derive
isolatedPositionEquityfor an isolated market by adding that market’smarginto that market’sunrealizedPnlwheremarginModeisI.
margin field in the balances response represents the total position margin in use across all markets.