Market Cap: $3.8891T 0.190%
Volume(24h): $173.222B 5.870%
Fear & Greed Index:

59 - Neutral

  • Market Cap: $3.8891T 0.190%
  • Volume(24h): $173.222B 5.870%
  • Fear & Greed Index:
  • Market Cap: $3.8891T 0.190%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How to calculate liquidation price on OKX contracts?

In OKX futures, the liquidation price is the threshold where a leveraged position is automatically closed to prevent further losses, calculated based on entry price, leverage, position size, and maintenance margin.

Aug 09, 2025 at 01:43 pm

Understanding Liquidation Price in OKX Futures Trading

In OKX futures trading, the liquidation price is the market price at which a trader’s position is automatically closed by the exchange to prevent further losses. This mechanism protects both traders and the platform from negative equity. The liquidation price depends on several variables, including the entry price, leverage used, position size, maintenance margin, and the contract type (inverse or linear). Understanding how this value is calculated is essential for risk management.

When opening a leveraged futures position on OKX, traders must post initial margin. As the market moves against the position, the unrealized loss increases, reducing the available margin. Once the margin ratio reaches the maintenance margin requirement, the position is liquidated. The liquidation price marks this threshold.

Differentiating Between Isolated and Cross Margin Modes

OKX offers two margin modes: isolated margin and cross margin. The choice between them directly affects the liquidation price calculation.

  • In isolated margin mode, traders allocate a fixed amount of margin to a specific position. The liquidation price is calculated based only on that allocated margin and the position’s performance. If the position moves against the trader, the loss is limited to the isolated margin, and liquidation occurs when the margin is depleted to the maintenance margin level.

  • In cross margin mode, the entire wallet balance is used as collateral for open positions. This means the liquidation price is less likely to be triggered quickly, as unrealized losses can be offset by available funds across all positions. However, the formula still depends on the same core parameters: entry price, position size, leverage, and maintenance margin rate.

The liquidation price will be more favorable (farther from entry) in cross margin under most conditions due to greater available collateral.

Calculating Liquidation Price for Long Positions

For a long position on OKX, the liquidation price is lower than the entry price because the position loses value as the market drops. The formula varies slightly between linear and inverse contracts.

For linear contracts (quoted and settled in USDT), the liquidation price for a long can be approximated as:

  • Determine the position value = contract size × entry price
  • Calculate initial margin = position value / leverage
  • Find maintenance margin = position value × maintenance margin rate (set by OKX per contract)
  • Compute unrealized PnL threshold = initial marginmaintenance margin
  • Solve for the price at which unrealized loss = unrealized PnL threshold

The resulting liquidation price for a long is:

Liquidation Price (Long) = Entry Price × (1 – (Initial MarginMaintenance Margin) / Position Value)

This formula assumes no funding fees or fees affecting margin balance.

Calculating Liquidation Price for Short Positions

For a short position, the liquidation price is higher than the entry price, as losses occur when the market rises.

Using the same structure:

  • Position value = contract size × entry price
  • Initial margin = position value / leverage
  • Maintenance margin = position value × maintenance margin rate
  • The unrealized PnL threshold remains initial marginmaintenance margin

For a short, the liquidation price increases as the market moves up. The formula becomes:

Liquidation Price (Short) = Entry Price × (1 + (Initial MarginMaintenance Margin) / Position Value)

Note that maintenance margin rates vary by contract and leverage level. Higher leverage results in lower maintenance margin, bringing the liquidation price closer to the entry price.

Using OKX Built-in Tools for Real-Time Monitoring

OKX provides real-time liquidation price indicators directly in the trading interface. After opening a position, traders can view the estimated liquidation price displayed beneath the position details.

To locate this:

  • Navigate to the Futures trading page
  • Open the Positions tab
  • Find the active contract
  • Look for the field labeled "Liquidation Price"

This value is dynamically updated based on current mark price, available margin, and fees. The mark price, not the last traded price, is used to determine liquidation to prevent manipulation. The mark price is derived from the underlying spot market and funding rates.

Traders can adjust leverage to influence the liquidation price. Increasing leverage reduces the initial margin percentage, thus bringing the liquidation price closer to the entry price. Conversely, lowering leverage moves it farther away.

Step-by-Step Manual Calculation Example

Suppose a trader opens a long position on OKX for 10,000 USDT worth of BTC/USDT perpetual contract at $60,000, using 10x leverage in isolated margin mode. The maintenance margin rate for this contract is 0.5%.

  • Position value = 10,000 USDT
  • Initial margin = 10,000 / 10 = 1,000 USDT
  • Maintenance margin = 10,000 × 0.005 = 50 USDT
  • Unrealized loss threshold = 1,000 – 50 = 950 USDT

Now, calculate the price drop that causes a 950 USDT loss:

  • Loss per BTC drop = contract size in BTC = 10,000 / 60,000 ≈ 0.1667 BTC
  • Required price drop = 950 / 0.1667 ≈ $5,698
  • Liquidation Price = 60,000 – 5,698 = $54,302

Thus, if BTC/USDT drops to $54,302, the position will be liquidated.

Frequently Asked Questions

What is the difference between liquidation price and bankruptcy price on OKX?

The liquidation price is the price at which the position is closed by the insurance fund. The bankruptcy price is the theoretical price at which the position’s value reaches zero. The liquidation price is always slightly worse than the bankruptcy price due to maintenance margin requirements.

Does funding rate affect the liquidation price?

Funding payments are settled periodically and reduce available margin when paid. While not directly part of the liquidation price formula, frequent funding payments can erode margin over time, indirectly bringing the position closer to liquidation.

Why does my liquidation price change even if the market is flat?

The liquidation price can shift due to changes in the mark price, maintenance margin rate adjustments, or wallet balance fluctuations in cross margin mode. Even without price movement, funding fees or changes in open interest may affect the underlying calculations.

Can I avoid liquidation after it's triggered?

Once the mark price hits the liquidation price, the system begins liquidation. However, traders can avoid it by adding margin or reducing position size before the trigger. In isolated mode, increasing the isolated margin will recalculate and move the liquidation price farther from the current market.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct