- Cross Margin: This is the default mode and offers the highest capital efficiency. In Cross Margin mode, all of your available USDC collateral in your main account is shared across all of your cross-margin positions. The total profit and loss from all cross positions are aggregated, and the shared collateral pool is used to cover the margin requirements of all of them. This means a profitable position can help support a losing one, preventing liquidation.
- Isolated Margin: This mode allows you to restrict the risk of a position to a specific amount of collateral. When you open an isolated position, you allocate a dedicated amount of collateral (
isolated_collateral) to it. Only this collateral is used to support the position. A liquidation in an isolated position will not affect your other positions (either cross or other isolated positions), and likewise, events in other positions will not affect it. This is useful for managing risk on speculative or high-leverage trades without endangering your entire account.
- Calculation: The formula for Initial Margin is:
Initial Margin = (Position Size * Price) / Leverage - Leverage: Leverage is configured on a per-position basis. Before any order is accepted, the system performs a pre-flight margin check (
check_order_margin) to ensure your account has sufficient available equity to meet the new Initial Margin requirement. - Adjusting Leverage: A critical safety feature prevents users from changing the leverage of a position that has a non-zero size. To adjust leverage, you must first close the existing position.
- Unrealized PnL: Unrealized PnL from your open positions directly impacts your available equity.
- For Cross Margin, the sum of unrealized PnL from all cross positions is added to your total account collateral, affecting your ability to open new positions.
- For Isolated Margin, the unrealized PnL is added to that specific position’s isolated collateral, affecting only its own margin health.
- Liquidation Condition:
Equity < Total Maintenance Margin - Equity Calculation: The way your equity is calculated depends on the margin mode.
- Isolated Equity =
position.isolated_collateral + position.unrealized_pnl - Cross Equity =
account.collateral + sum(unrealized_pnl of all cross-margin positions)
- Isolated Equity =
unrealized_pnl for any position is calculated against the current Mark Price. The specific Maintenance Margin rates are determined by a tiered system based on the notional value of your position. Please refer to the Margin Tierspage for detailed rates.