Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.astaria.trade/llms.txt

Use this file to discover all available pages before exploring further.

Astaria tracks both realized and unrealized profit and loss for every account.

Position Value

For a position of size Q at current Mark Price M:
current_notional = |Q| × M

Unrealized PnL

For a long position:
unrealized_pnl = position_size × (mark_price - entry_price)
For a short position:
unrealized_pnl = position_size × (entry_price - mark_price)

Realized PnL

Realized PnL is created when a position is partially or fully closed. It is settled into the account’s collateral balance.

Account Value

Account Value reflects the total value of the account after incorporating open risk:
account_value = collateral_balance + realized_pnl + unrealized_pnl + funding_payments - trading_fees

Account Equity

Account Equity is the value used to determine whether an account satisfies margin requirements.
account_equity = account_value
Account Equity is used in:
  • Initial margin checks when opening positions
  • Maintenance margin checks for existing positions
  • Liquidation eligibility
  • Withdrawal limits