Appearance
Accounting and PnL
Unrealized PnL
Unrealized PnL reflects the potential gain or loss if a position were closed at the current mark price. For a long position, it is the difference between the current value and the entry cost. For a short position, the sign is reversed.
Where the notional values are the position size multiplied by the mark price and average entry price respectively. When a position is increased, the average entry price adjusts to reflect the blended cost basis. When a position is partially closed, the cost basis scales down proportionally and the closed portion realizes PnL.
Realized PnL
PnL is realized when a position is reduced or closed. It is the difference between the exit notional (at fill price) and the entry notional (at average entry price), sign-adjusted for side. Realized PnL is credited or debited directly to the account's margin balance.
Funding payments also affect the margin balance. Each funding application adjusts the balance by the position's share of the hourly funding rate.
Total Account Value
For cross-margin accounts, equity is the sum of the margin balance and unrealized PnL across all cross-margin positions, minus any margin allocated to isolated positions:
The margin balance includes all deposits, withdrawals, realized PnL, funding payments, and fees accumulated over the account's lifetime.
For isolated-margin positions, equity is evaluated independently per position:
Available Margin
Available cross margin is the portion of equity that can be used to open new positions or be withdrawn. It is equity minus the margin already committed to existing positions and resting orders:
An order or withdrawal is rejected if it would cause available margin to fall below zero. Note that the available margin has no impact on liquidations or account health, which is entirely determined by the account's maintenance margin requirements.