Skip to main content
Understanding margin used, maintenance margin, and account leverage calculations is essential for effective risk management on the Rails platform. These metrics help determine your account’s leverage usage, margin requirements, and liquidation risk.

Key Definitions

  • marginUsed: The amount of margin used to support your open positions based on your current leverage settings (e.g., 1x, 5x).
  • maintenanceMargin: The minimum margin required to keep positions open (3% of total position value)
  • accountLeverage: Leverage used by the trader (total position value divided by account balance)

Calculation Formulas

FieldFormulaDescription
marginUsedtotalPositions / currentLeverageMargin used for current positions
maintenanceMargintotalPositions × 0.03Minimum margin requirement
accountLeveragetotalPositions / totalBalanceLeverage used by the trader

Usage in API

These calculations are used in the Get Account Balances response to provide real-time margin used and leverage information for your account. Note that the margin field returned from the endpoint represents margin used, and will be renamed to marginUsed in v2 for clarity.