How do I calculate the liquidation price for futures? What are the conditions for liquidation?

Publisert 20. mars 2023Oppdatert 30. jan. 20265 minutter å lese78

When the maintenance margin ratio of a futures position is ≤100%, position reduction or forced liquidation may be triggered. Liquidation does not occur all at once. The system will first reduce the position and may proceed to full liquidation if risk conditions are not met.

Before placing an order, you can use the calculator to estimate the liquidation price or assess the potential liquidation price range based on your position parameters.

The liquidation price is based on the mark price. You can switch the price type on the candlestick chart to view the mark price and its historical movements. During liquidation, standard trading fees apply, and additional liquidation-related costs may be incurred to cover execution slippage and potential losses during the liquidation process.

1. What is the forced liquidation system?

The forced liquidation mechanism refers to the process by which the system manages a user’s risk positions when the maintenance margin ratio of a position or account reaches a defined risk threshold. This process generally includes pre-reduction checks (order cancellation), position reduction, and forced liquidation.
The specific liquidation process may vary depending on the margin mode. For more details, please refer to the cross margin trading rules for each mode.

For futures trading, liquidation conditions are primarily determined by the maintenance margin ratio. When the maintenance margin ratio of a futures position is ≤100%, position reduction or forced liquidation may be triggered.

OKX futures trading adopts a tiered liquidation mechanism. When a user’s position reaches liquidation risk, the system will first reduce the position instead of liquidating the entire position immediately. If, after position reduction, the remaining position still fails to meet the maintenance margin ratio requirements for the new position tier, the system will continue to reduce the position in stages until the position is fully liquidated.
This mechanism is designed to help reduce potential market impact caused by the liquidation of large positions.

2. Calculating the liquidation price for a specific position

1. Futures Calculator (App)

  1. On the futures trading page, click "···" > Features – Calculator > Liquidation Price.

  2. Then select the trading pair BTCUSDT Perpetual, margin mode Cross, and select Long or Short.

  3. Enter the leverage, entry price, number of contracts, and available margin, and click Calculate.

For example, BTCUSDT perpetual futures position with 3× leverage, an entry price of 60,996, 50 contracts (0.5 BTC), and 5,000 USDT of available margin, clicking Calculate will display an estimated liquidation price of 51,226.5 USDT for the position.

2. Futures Calculator (Web)

  1. On the official website, click Trade > Futures. On the trading page, scroll down and click the Calculator icon in the lower-left corner, then select Liquidation Price.

  2. Then select the trading pair BTCUSDT Perpetual, select Long or Short, then select margin mode Isolated.

  3. Enter the leverage, entry price, number of contracts, and available margin, and click Calculate.

3. Forced liquidation fee

When the maintenance margin ratio of the relevant account or position falls ≤ 100% , depending on the applicable trading account mode, the account will enter the forced position reduction process.

The liquidation fee is charged during the forced liquidation process and is calculated based on the taker fee rate applicable to the user’s current fee tier. For options positions, the liquidation fee is calculated as the lower of the taker fee rate or 12.5% of the options fee.

Liquidation-related costs refer to additional amounts charged during the forced liquidation process to cover market volatility risks. These costs are used to offset execution slippage and potential losses incurred during position handling.

Any net gain or loss from these amounts will be transferred to the insurance fund to further enhance system-wide risk protection. The maintenance margin and liquidation-related costs are closely linked.

For specific rules, please refer to this article.

5. How is the maintenance margin ratio calculated?

1. Single-currency margin mode (Cross margin trading)

Maintenance margin ratio = (Cross margin balance of the currency+Unrealized PnL−Currency reserved for open sell orders−Currency required for options buy orders−Currency required for isolated margin positions−Fees for open orders) / (MMR + forced liquidation fees)

The maintenance margin is the sum of the maintenance margin requirements for leveraged loan, expiry, perpetual and options, including open orders.

The liquidation fee is the total of leveraged borrowing fees, expiry futures fees, perpetual swaps fees, and options fees, including open orders, and is designed to prevent sudden increases in account risk after open orders are filled that could trigger liquidation.

Liquidation fee = Leveraged borrowing fee + Expiry and perpetual futures fee + Options fee

Where:

  • Leveraged borrowing fee = Borrowed position value × taker fee rate

  • Expiry futures and perpetual swaps fee = Position value × taker fee rate

  • Options fee = Options position value × taker fee rate

2. Multi-currency margin mode (Cross margin trading)

Maintenance margin ratio = Effective margin / (MMR + Position reduction fee)

MMR is calculated based on (numbers of position quantity + numbers of open orders).

Position reduction fees are calculated based on (numbers of position quantity + numbers of open orders).

3. Single/multi-currency margin mode (Isolated margin trading)

Long position: Maintenance margin ratio = [Position assets - (Liabilities + Interest) / Mark price] / (MMR + Fees)

Short Position: Maintenance Margin Ratio = [Position Assets - |Liabilities + Interest| * Mark Price] / (MMR + Fees)