Understanding margin in perpetual futures

Published on Jun 20, 2022Updated on Apr 4, 20243 min read

Understanding margin

In the crypto derivatives market, margin refers to a percentage of the contract’s value that traders must hold in order to open positions.

Calculating margin

OKX has two margin modes: cross and isolated.

  • Cross margin mode: In cross margin mode, the entire margin balance is shared among all open positions, which can help lower the risk of liquidation.

    • Crypto-margined contracts
      Initial margin = Contract size × |Number of contracts| × Multiplier / (Mark price × Leverage)

    • USDT-margined contracts
      Initial margin = Contract size × |Number of contracts| × Multiplier × Mark price / Leverage

  • Isolated margin mode: In isolated margin mode, each position has its own margin, allowing traders to manage risk per position.

    • Crypto-margined contracts
      Initial margin = Contract size × |Number of contracts| × Multiplier / (Average price of open positions × Leverage)

    • USDT-margined contracts
      Initial margin = Contract size × |Number of contracts| × Multiplier × Average price of open positions / Leverage

Understanding margin and leverage

Leverage is a trading mechanism that amplifies potential returns and risks by allowing traders to trade with more funds than what they have in their trading account.In cross margin mode, when you are opening long or short positions: Initial margin = Position value / Leverage

  • Crypto-margined contracts

    • If the current BTC price is $10,000, the user wants to buy perpetual futures worth 1 BTC with 10x leverage, the Number of Contracts = BTC Quantity x BTC Price / Contract Size = 1 x 10,000 / 100 = 100 contracts.

    • Initial Margin = Contract Size x Number of Contracts / (BTC Price x Leverage) = 100 x 100 / (10,000 x 10) = 0.1 BTC

  • USDT-margined contracts

    • If the current BTC price is 10,000 USDT, the user wants to buy perpetual futures worth 1 BTC with 10x leverage, Number of Contracts = BTC Quantity / Contract Size = 1 / 0.0001 = 10,000 contracts.

    • Initial Margin = Contract Size x Number of Contracts x BTC Price / Leverage) = 0.0001 x 10,000 x 10,000 / 10 = 1,000 USDT

Margin rates and maintenance

  • Initial margin: 1 / Leverage

  • Maintenance margin: The minimum margin required to sustain the current position.

    • Single-currency cross margin mode
      Initial margin = (Currency balance + Earnings – Trading volume of pending maker sell orders in the selected currency – Trading volume of pending maker buy options orders in the selected currency – Trading volume of pending isolated margin positions in the selected currency – Trading fees of all maker orders) / (Maintenance margin + Liquidation fee)

    • Multi-currency cross margin mode
      Initial margin = Adjusted equity / (Maintenance margin + Trading fee)

    • Single- and multi-currency isolated margin mode / portfolio margin mode

      • Crypto-margined contracts
        Initial margin = (Margin balance + Earnings) / (Contract size × |Number of contracts| / Mark price × (Maintenance margin + Trading fee))

      • USDT-margined contracts
        Initial margin = (Margin balance + Earnings) / (Contract size × |Number of contracts| × Mark price × (Maintenance margin + Trading fee))

Managing margin calls

Margin calls are unique to isolated margin mode. You can increase the margin of specific positions to better control your risks.

Adjusting leverage

OKX supports adjusting the leverage of your open positions.You can only increase your leverage if the modified leverage is lower than the maximum leverage allowed for your current position. Once you’ve increased your leverage, the margin required to sustain your current position will be reduced.You can only decrease your leverage if you have enough funds in your trading account to cover the increased margin requirement with the modified leverage.