Tools / Liquidation Price Calculator
OKX Liquidation Price Calculator (Isolated USDT-Margined Swaps)
OKX's published isolated liquidation formula for USDT-margined perpetual swaps, including the fee rate term, position tiers and how account mode changes what gets liquidated.
Venue mechanics on this page are as of 2026-09. Fees, limits and margin tiers change — check the venue's own docs before acting on a number.
Enter entry, size, leverage and the maintenance margin rate for your position's tier on OKX.
OKX's published isolated-margin formula for a USDT-margined perpetual in one-way mode. If the notional at the liquidation price falls in a different tier, re-enter that tier's rate and recalculate. Cross margin depends on the rest of the account and is not modelled. Treat this as an estimate and read the number OKX shows.
The formula OKX publishes
OKX’s liquidation help page gives an estimated liquidation price for an isolated, USDT-margined perpetual:
Long: (margin balance − Q × avg open price) / [Q × (tier mmr + fee rate − 1)]
Short: (margin balance + Q × avg open price) / [Q × (tier mmr + fee rate + 1)]
Q = face value × |number of contracts|
margin balance = initial margin + margin added to or reduced from the position
Two things differ from most venues. The formula is written in contracts, so the calculator’s size field wants face value × contracts, not the contract count. And the fee rate sits next to the maintenance rate in the denominator.
Why the fee rate is there
OKX defines its trigger in terms of a maintenance margin ratio:
MMR% = (margin balance + P&L) / [Q × mark price × (tier mmr + fee rate)]
Liquidation may be triggered at MMR% ≤ 100%, which OKX glosses as equity at or below “maintenance margin + applicable liquidation fees”. The fee is real: a forced liquidation is charged at your current tier’s taker rate, and an additional liquidation clearance fee may apply, with net proceeds going to OKX’s security fund. So the level is set to leave room for the cost of closing you.
Worked example
Illustrative rates only — not OKX’s values. A long of 1 BTC (for example, face value 0.01 BTC × 100 contracts — check the real face value) at 60,000, 10× isolated, so margin balance = 6,000 USDT. Tier MMR 0.5%, fee rate 0.05%.
| Case | Liquidation price | Distance |
|---|---|---|
| Long, fee term ignored | 54,271.36 | 9.55% |
| Long, OKX formula | 54,298.64 | 9.50% |
| Short, fee term ignored | 65,671.64 | 9.45% |
| Short, OKX formula | 65,638.99 | 9.40% |
| Long, OKX formula, 500 USDT added | 53,795.88 | 10.34% |
The fee term moves each level about 27–33 USDT toward entry. Check the second row with OKX’s own ratio: at 54,298.64 the loss is 5,701.36, leaving 298.64; the denominator is 54,298.64 × (0.5% + 0.05%) = 298.64. MMR% = 100%.
Account mode decides what is at risk
OKX has four account modes (acctLv in GET /api/v5/account/config), and
cross-margin liquidation scope depends on which one you are in:
| Account mode | Perpetuals? | Cross-margin liquidation scope |
|---|---|---|
| Spot mode | No — perpetual swap trading “not supported” | — |
| Futures mode | Yes | Per margin currency, when that currency’s MMR% reaches 100% |
| Multi-currency margin | Yes | Account-wide in USD, all cross collateral at risk |
| Portfolio margin | Yes | Per risk unit, maintenance from stress-test losses |
Isolated risk is per position and segregated from cross in every mode that allows it, which is why only the isolated formula is simple enough for a closed-form calculator. OKX itself says the futures-mode cross estimate cannot be calculated when there are options, non-USDT margin positions, or different underlyings in USDT cross. Isolated vs cross margin covers the general trade-off.
Position tiers and partial liquidation
Maintenance margin is position value × the position tier’s rate; bigger
positions sit in higher tiers with higher rates and lower max leverage. In
isolated margin, each direction of each contract is tiered separately; in
cross, all directions of a contract are summed to find the tier. Read tiers
from GET /api/v5/public/position-tiers or OKX’s
position tiers page.
What is maintenance margin explains the
underlying idea.
The tier also shapes what happens at the trigger. OKX sends an alert when MMR% falls to a warning level, then at 100% cancels open orders (for isolated, all orders related to the position), and if that is not enough runs tiered partial liquidation — one tier at a time, re-checking in between, until the position is safe or fully closed.
Mark price, not last price
“The liquidation price is based on the mark price.” OKX defines mark price as
the index price plus a moving average of the basis, where the basis is the
contract’s mid price minus the index; a USDT-margined perpetual references the
coin’s index against USDT. GET /api/v5/public/mark-price returns it. See
what is mark price.
For the number OKX itself computes, GET /api/v5/account/positions returns
liqPx — labelled an estimate that “can change quickly” — with mgnRatio,
mmr and markPx.
After liquidation
OKX’s security fund — its name for an insurance fund — absorbs the deficit when a liquidated position fills worse than its bankruptcy price. If the fund drops significantly below a preset threshold, auto-deleveraging closes opposing positions ranked by leveraged PnL%, normally at mark price, with no trading fee on the deleveraged side.
FAQ
Why is there a fee rate in OKX's liquidation formula?
OKX defines a maintenance margin ratio of 100% as equity at or below maintenance margin plus the applicable liquidation fees. Its isolated formula therefore adds the fee rate to the position tier's maintenance margin rate, which moves the liquidation price closer to entry. The liquidation fee is charged at your current tier's taker rate.
What position size do I enter for an OKX swap?
Face value times the absolute number of contracts, in coin. OKX's formula is written in contracts, and one contract is not one coin, so entering the contract count directly gives a wrong answer. Read the contract's face value from OKX's contract specifications.
Does my OKX account mode affect liquidation?
Yes. Spot mode cannot trade perpetual swaps at all. In futures mode, cross margin is assessed per margin currency; in multi-currency margin mode, account-wide in USD; portfolio margin uses stress-test losses per risk unit. Isolated positions are assessed per position in every mode that allows them.
Does OKX liquidate the whole position at once?
Not necessarily. When the maintenance margin ratio falls to 100% or below, OKX first cancels open orders, then runs tiered partial liquidation: it reduces the position by one tier at a time and re-checks, until the position is safe or fully liquidated.
Where do I find the live OKX liquidation price?
GET /api/v5/account/positions returns liqPx, which OKX labels an estimate that can change quickly, alongside mgnRatio, mmr and markPx. GET /api/v5/account/adjust-leverage-info returns an estimated liquidation price before you change leverage.