Calculating max transfers in Cross and Isolated margin
Pro Mode (Orderbook Trading)
When using Cross or Isolated Margin modes, the amount you can transfer in or out depends on your wallet balance, margin requirements, and unrealized profit and loss. Here’s how to calculate it.
Cross margin
In Cross Margin mode, your margin balance is shared across all open positions. The maximum amount you can transfer out depends on your wallet balance, unrealized PnL, and the required margin for open orders.
If there is no unrealized PnL:
Maximum transferable amount = Cross wallet balance − Σ(Isolated open order initial margin) − Σ(Cross position maintenance margin)
If there is unrealized PnL:
Maximum transferable amount = Cross wallet balance + Σ(Cross unrealized PnL) − Σ(Cross initial margin) − Σ(Isolated open order initial margin)
Note: These calculations assume no gift balance or cross collateral.
Isolated margin
In Isolated Margin mode, margin is dedicated to each individual position. The maximum amount you can transfer in or out depends on the available margin relative to that position’s maintenance requirements.
Maximum transfer-in amount for Isolated Margin:
Maximum transfer-in amount = min (Cross wallet balance − Σ(Isolated open position initial margin) − Σ(Cross position maintenance margin), Available balance)
Maximum transfer-out amount for Isolated Margin:
Maximum transfer-out amount = max (0, min (Isolated wallet balance − Isolated position maintenance margin,
Isolated wallet balance + Size × (Mark price − Entry price) − Mark price × Abs(Size) × Initial margin rate))
Note:
Transferring margin out reduces the buffer protecting your position.
Removing too much margin can increase your risk of liquidation.
Last updated