What is mark price? Why venues liquidate on it, not the last trade
Figures on this page are as of 2026-09. Fees, limits and margin tiers change — check the venue's own docs.
Mark price is a derivatives venue’s own estimate of a contract’s fair value, built from an external spot index plus a smoothed reading of the contract’s order book, and it — not the last traded price — is what the venue uses to value open positions and decide when to liquidate them.
This page is for anyone who trades perpetuals, or writes code that does, and has seen a liquidation the chart did not seem to explain. It covers why venues use a separate price at all, how Binance, Bybit, OKX and Hyperliquid each build theirs, and what to do about the gap between mark and last when the market moves fast.
Why this matters now
On a perpetual, three prices are live at once: the last trade on the venue’s own book, an index of spot prices from other exchanges, and the mark price derived from the two. Your chart almost always shows the first. Your liquidation is checked against the third.
All four venues covered here say so directly. Binance: “Liquidation occurs when the Mark Price hits the liquidation price of a position.” Bybit, OKX and Hyperliquid document the same rule. Mark price also drives unrealised PnL on all four, and on Bybit it sets the position value that tiered maintenance margin is charged on.
Why not just use the last trade
The last trade is one print from one order book. A single large market order into a thin book can trade far from the price everywhere else, briefly. If that print were the liquidation trigger, every position whose level sat inside the wick would be closed — by market orders into the same thin book, stretching the wick further. Binance describes the purpose of its mark price as preventing “unnecessary liquidations”.
Mark price blunts that in two ways:
- It anchors to an external index. A spot index built from other exchanges cannot be moved by one order on this venue’s book.
- It smooths the venue’s own contribution. Where the book enters, it enters as a moving average of the basis — mid price minus index — or as one input among several, so a single print carries limited weight.
The median construction three of the four venues use matters too. With three inputs, the median discards the most extreme one, so a single input going wrong — a spiking last trade, a stale index — cannot set the price on its own.
How each venue builds it
| Venue | Mark price construction | Worth knowing |
|---|---|---|
| Binance USDⓈ-M | Median(Price 1, Price 2, Contract Price). Price 1 = index × (1 + last funding rate × time until next funding ÷ funding period). Price 2 = index + moving average of (mid − index). | The index is a weighted average of the symbol’s spot price on multiple external exchanges. |
| Bybit (linear) | Median(Price 1, Price 2, Last Traded Price). Price 1 = index × [1 + last funding rate × (time until funding ÷ 8)]. Price 2 = index + moving average of basis, where basis = (bid1 + ask1) ÷ 2 − index, sampled every second. | Falls back to Bybit’s last traded price if an index source is abnormal or the average lacks data. |
| OKX (SWAP) | Index + moving average of [(best ask + best bid) ÷ 2 − index]. | USDT-margined contracts reference the base currency’s index against USDT. |
| Hyperliquid | Median of three inputs: the oracle price plus an EMA of (Hyperliquid mid − oracle); the median of best bid, best ask and last trade on Hyperliquid; a weighted median of several other exchanges’ perp mid prices. | A fallback EMA input is added when exactly two inputs exist. Funding uses a separate oracle price. |
The averaging windows, index constituents and weights change, so they are not reproduced here. Read them on Binance’s mark price FAQ, Bybit’s mark price article, OKX’s mark and last price page and Hyperliquid’s price indices page. Bybit adds that it can change its selection criteria in real time without prior notice.
Two details in the table are worth reading slowly.
Price 1 on Binance and Bybit carries the funding term. It is the index adjusted by the last funding rate, scaled by how much of the funding period is left. As settlement approaches, the remaining time shrinks and Price 1 converges on the index. That is how the expected funding payment shows up in fair value between settlements — see what is a funding rate.
Hyperliquid runs two reference prices, not one. Its oracle price is a stake-weighted median of validators’ submissions, each a weighted median of external spot prices, published roughly every three seconds. The oracle is used to compute funding and the notional that funding payments are charged on. The mark price is used for margining, liquidations, triggering TP/SL orders and unrealised PnL. Code that reads “the price” from Hyperliquid has to know which one it wants.
Mark vs last in fast markets
In calm conditions mark and last sit close together. The gap opens when the book moves faster than the index and the average can follow. Hyperliquid’s docs say that in high volatility mark may differ significantly from book price, and any construction that deliberately lags the book behaves the same way.
Three consequences follow:
- A wick through your liquidation level on the chart does not mean you were liquidated, and a liquidation with no matching wick is not necessarily an error. Compare against the venue’s mark price history, not last-trade candles.
- The distance on the chart is not the distance that matters. In a sharp sell-off the contract can trade below its mark, so a long looks closer to liquidation than it is; on a sharp rebound, the reverse. Measure against mark.
- Your fill is at the book, not the mark. Mark decides when a position is liquidated; the closing order then executes against the real book, and Binance and Bybit both state that realised PnL uses executed prices. The gap between trigger and fill is where liquidation cascades do their damage.
Whether your own stop or take-profit triggers on mark or on last is a separate question. Hyperliquid documents that mark price triggers TP/SL. Elsewhere, check the order endpoint rather than assuming.
Mark price vs index price vs last price
| Last traded price | Index price | Mark price | |
|---|---|---|---|
| What it is | Most recent fill on this venue | Weighted spot price from external exchanges | The venue’s fair-value estimate from index and book |
| Moved by one large order here | Yes | No | Only partly, by design |
| Triggers liquidation (on these four venues) | No | Not directly | Yes |
| Values unrealised PnL | No | No | Yes |
| Values realised PnL | Executed prices | No | No |
The gap between a contract and its index is its basis. Mark price is, in effect, the index plus a smoothed basis.
Where the boundary should sit
- Monitor distance to liquidation against mark. Binance returns
markPriceandindexPricefromGET /fapi/v1/premiumIndex; Bybit returns both fromGET /v5/market/tickers; OKX hasGET /api/v5/public/mark-price. On Hyperliquid, read the mark from the API rather than the chart. An alert keyed to last price fires late in exactly the conditions it exists for. - Do not rebuild the mark yourself. The formulas explain the behaviour, but the windows and weights are parameters the venue changes. Read its number.
- Leave room for the gap. A level from the calculators for Binance Futures, Bybit, OKX or Hyperliquid is checked against mark, while a stop may fill against last. A stop placed hard against the liquidation level can lose that race.
- Value positions the way the venue does. If your own PnL tracking uses last price and the venue uses mark, the two disagree in precisely the moments you care about — see unrealised vs realised PnL.
FAQ
Why was I liquidated when the chart never reached my liquidation price?
On Binance, Bybit, OKX and Hyperliquid, liquidation is triggered by mark price, not the last traded price most charts display. The two can diverge, especially in fast markets. Compare your liquidation price against the venue’s mark price history for that period, because that is the series the liquidation engine checked.
How is mark price calculated?
Each venue publishes its own construction. Binance and Bybit take the median of three inputs built from an external spot index, a funding-adjusted index and the contract’s own price. OKX adds a moving average of the contract’s basis to its index. Hyperliquid takes the median of an oracle-based input, its own book and other exchanges’ perp prices.
Is mark price the same as index price?
No. The index price is a weighted average of spot prices on external exchanges. Mark price starts from the index and adds a smoothed measure of where the contract itself trades, so it follows the contract’s fair value rather than spot alone. Hyperliquid additionally keeps a separate oracle price, which it uses for funding.
Does mark price affect my realised profit?
Not directly. Mark price sets unrealised PnL and the liquidation trigger, while realised PnL comes from the prices your orders actually fill at — Binance and Bybit both state this. The difference matters most in a liquidation, where the trigger is the mark but the closing order fills against the book.