What is margin in X-Perps trading?

Publikováno dne 21. 4. 2026Aktualizováno dne 29. 4. 2026Doba čtení: 5 min

1. Understanding margin

In the crypto X-Perps market, margin is a percentage of the value of the X-Perps contract that traders place in an account to open a position.

2. Calculating margin

OKX has two margin modes: selected and isolated.

  1. Selected mode: In selected margin mode, the entire margin balance is shared among all open positions, which can help lower the risk of liquidation.

    • Margin requirement for positions

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

        • The initial margin fluctuates based on the mark price in selected margin mode.

    • Margin requirement for open orders and positions

      • One-way mode margin requirement

        • Long position: Max ((Position notional value + Buy order value), (Sell order value – Position notional value)) / Leverage

        • Short position: Max ((Buy order value – Position notional value), (Position notional value + Sell order value)) / Leverage

      • Hedge mode margin requirement = |Long position notional value + Open buy order value| / Leverage + |Short position notional value + Open sell order value| / Leverage

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

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

3. 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 selected margin mode, when you are opening long or short positions: Initial margin = Position value / Leverage

  • USD-margined contracts

    • If the current BTC price is 10,000 USDC, the user wants to buy X-Perps 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 USDC

4. Margin requirements

  • Initial margin rate: 1 / Leverage

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

    • Spot and X-Perps selected margin mode
      Maintenance margin ratio = (Balance of an asset in spot and X-Perps selected margin account + PnL in selected margin positions – Amount in open sell orders – Amount required for open orders in isolated margin mode – Order fees) / (Maintenance margin + Liquidation fees)

    • Multi-currency margin mode
      Maintenance margin ratio = Adjusted equity / (Maintenance margin + Liquidation fees)

    • Spot and multi-currency margin mode - isolated margin mode

      • USD-margined contracts
        Maintenance margin ratio = (Margin balance + PnL in isolated margin position) / (Maintenance margin + Liquidation fees)

5. Managing margin calls

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

6. 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.

7. X-Perps order loss

In X-Perps trading, when the order price deviates from the mark price, the system will calculate order loss. For example, when your buy order price is higher than the mark price or your sell order price is lower than the mark price, an unrealised loss will occur if the order is executed. To protect your assets and ensure platform safety, OKX includes order loss as a part of the cost required to open a position to prevent liquidation.

USD-margined contracts

  • Buy order loss: Abs (Contract size × |Number of contracts| × Multiplier × Min [0, (Mark price – Order price)])

  • Sell Order loss: Sell order loss: Abs (Contract size × |Number of contracts| × Multiplier × Min [0, (Order price – Mark price)])

For market orders, the platform uses an estimated fill price as the order price.


Disclaimer:

This content is provided for informational purposes only and may cover products that are not available in your region. It does not constitute investment or financial product advice, not it is a recommendation or solicitation to buy or sell financial instruments or to engage in any specific trading strategy.

Trading in financial instruments involves a significant risk of loss and may not be suitable for all investors. If you invest in X-Perps or other derivatives you may lose some or all of the money you invest. X-Perps are leveraged instruments; leverage can amplify both gains and losses. The value of investments and any income derived from them can go down as well as up, and you may not recover the amount originally invested. Past performance is not a reliable indicator of future results. You should carefully consider your investment objectives, level of experience, and risk appetite before engaging in any trading activity.

OKX Europe Markets Ltd ("OEM"), which is authorised and regulated by the Malta Financial Services Authority (MFSA) under the Investment Services Act (Chapter 370 of the Laws of Malta) as a Investment Services Licence Holder (Licence No. OEML-15905).

© 2026 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less of this article may be used, provided such use is non-commercial. Any reproduction or distribution of the entire article must also prominently state: “This article is © 2026 OKX and is used with permission.”

Permitted excerpts must cite to the name of the article and include attribution, for example “Article Name, [author name if applicable], © 2026 OKX. Some content may be generated or assisted by artificial intelligence (AI) tools. No derivative works or other uses of this article are permitted.