Key Definitions
- maintenanceMarginRate:
0.03(or 3%) – the minimum margin requirement - accountLeverage:
totalPositions / totalBalance– leverage used by the trader - averageEntryPrice:
position / positionQuantity– average entry price for the position
Calculation Formulas
| Position Type | Formula | Description |
|---|---|---|
| Long | max(averageEntryPrice × (1 - 1/accountLeverage + maintenanceMarginRate), 0) | Liquidation price for long positions |
| Short | averageEntryPrice × (1 + 1/accountLeverage - maintenanceMarginRate) | Liquidation price for short positions |