# Mark price

*https://cryptomarkets.tools/glossary/mark-price · next to Backtesting & Research Libraries*

**Definition:** The price a derivatives venue uses to value open positions — for unrealised profit and loss, margin checks and the liquidation trigger — in place of the last traded price. Each venue computes its own, usually from an index of spot prices on other exchanges plus a smoothed basis, so the mark price of a BTC perpetual differs between venues and from the price a chart of trades shows.

Every perpetual and futures venue in this catalogue prices a position twice: once on the tape, where
it trades, and once on the mark, where it is valued. The second number decides who is liquidated,
and it is the one a chart does not show by default.

## How it works

The reason for a second price is the thinness of a single book. A last trade can be printed by one
order into an empty side, and a venue that valued positions on it would let one print close
thousands of them. Binance's explanation is that "unrealized PnL is the key factor in triggering
liquidations" and has to be computed accurately "to prevent unnecessary liquidations". Bybit calls
its version a "Dual-Price mechanism" and says it exists to stop manipulation. The solution everywhere
is to anchor on spot prices from other venues, and to let the contract's own market in only through
a smoothed term.

**The recipe is the venue's, and it changes.**

- **Binance** takes the median of three prices for a USDⓈ-M perpetual. The first is the index
  adjusted by the last funding rate, prorated for the time until the next funding. The second is the
  index plus a 30-second moving average of the gap between mid-price and index, sampled every
  second. The third is the contract's last price. The help page describing this was updated on 25
  September 2026, and it reserves "additional protective measures, such as calculating Mark Price =
  Price 2" in extreme conditions.
- **Bybit** uses the same median shape with a 2.5-minute basis average and a funding term divided by
  eight. It falls back to its own last traded price when an index source is abnormal or the moving
  average lacks data. It "reserves the right to update the mark price selection criteria in real
  time according to market conditions without prior notice."
- **OKX** writes it as the spot index price plus a moving average of the basis, with the index
  taken from at least three exchanges.
- **Hyperliquid** takes the median of three inputs: its oracle price plus a 150-second EMA of mid
  minus oracle; the median of its own best bid, best ask and last trade; and a weighted median of
  the perpetual mid-prices on Binance, OKX, Bybit, Gate and MEXC, weighted 3, 2, 2, 1, 1. It updates
  roughly every three seconds. Funding uses the oracle price instead.
- **dYdX** documents no separate mark price. Its validator-aggregated oracle price does the job —
  collateral checks, liquidations and triggering stop and take-profit orders.

**The index underneath is also a choice.** Binance's price index is a weighted average of spot prices
from a list of exchanges which, for contracts listed since 10 February 2025, can include PancakeSwap,
Uniswap and Raydium. A source more than 3% from the median of all sources is capped at that
distance, 1% on a named list that includes BTCUSDT, ETHUSDT and SOLUSDT. An exchange that has not
updated for five minutes drops to zero weight. [Aster's API](https://cryptomarkets.tools/tools/aster-api) publishes the weights behind each contract. For BTCUSDT on
24 September 2026, 43.5% of the index was Binance.

## Why it matters here

**Liquidations are decided on a series most charts do not draw.** A candle chart of trades and the
price a venue liquidates on are two series, and they part company exactly when it matters — in a
thin, fast market. Comparing a [liquidation](https://cryptomarkets.tools/glossary/liquidation) print to last-price candles and
concluding that the venue liquidated early or late compares two different prices. The same goes for
comparing venues: three recipes, three indices and three smoothing windows mean three mark prices
for one underlying at one instant.

**Mark history is its own dataset, and a thin one.** Binance's `markPriceKlines` and Bybit's
`mark-price-kline` return open, high, low and close with no volume — Binance labels those fields
"Ignore". [CCXT](https://cryptomarkets.tools/tools/ccxt) exposes them through `fetchOHLCV` with `price: 'mark'`.
[Tardis.dev](https://cryptomarkets.tools/tools/tardis-dev) records mark and index price in its `derivative_ticker` rows,
"empty if exchange does not provide one". Retention is the venue's call: [Freqtrade's
card](https://cryptomarkets.tools/tools/freqtrade) notes that OKX serves only about three months of mark candles, so funding
before that window cannot be computed correctly. A vendor selling "candles" is almost always selling
trade candles. Ask for mark separately, and ask how far back.

**A backtest that liquidates on last price is testing a different venue.**
[NautilusTrader](https://cryptomarkets.tools/tools/nautilus-trader) reads mark prices for margining and liquidation checks when
you supply them, and marks against the last traded price when you do not. Several engines here have no
concept of a mark price at all — backtesting.py, VectorBT and VectorBT PRO among them. [What a crypto backtest silently
assumes](https://cryptomarkets.tools/guides/what-a-crypto-backtest-assumes) goes through them one by one.

**A library's field name is not the venue's definition.** CCXT's position structure annotates
`markPrice` as "a price that is used for funding calculations". That is true of OKX, whose funding
payment is computed on a position value marked at the mark price. It is not true of Hyperliquid,
which sizes funding at its oracle price. See [funding rate](https://cryptomarkets.tools/glossary/funding-rate) for the rest of
that arithmetic.

**Off-hours, the mark is a model of a closed market.** Stock-tagged perpetuals on Aster switch their
mark to an EWMA-smoothed mode overnight, at weekends and on holidays. trade[XYZ] on Hyperliquid holds its
mark inside a band around the Friday close. [What a tokenized stock is](https://cryptomarkets.tools/guides/what-a-tokenized-stock-is) covers
whose weekend price that is.

## Where you will meet this

- [NautilusTrader](https://cryptomarkets.tools/tools/nautilus-trader.md)
- [Freqtrade](https://cryptomarkets.tools/tools/freqtrade.md)
- [Binance Market Data API](https://cryptomarkets.tools/tools/binance-api.md)
- [Bybit Market Data API](https://cryptomarkets.tools/tools/bybit-api.md)
- [OKX Market Data API](https://cryptomarkets.tools/tools/okx-api.md)
- [Aster Market Data API](https://cryptomarkets.tools/tools/aster-api.md)
- [Tardis.dev](https://cryptomarkets.tools/tools/tardis-dev.md)
- [CCXT](https://cryptomarkets.tools/tools/ccxt.md)
- [Backtesting.py](https://cryptomarkets.tools/tools/backtesting-py.md)
- [CoinAPI Market Data API](https://cryptomarkets.tools/tools/coinapi.md)
- [Hummingbot](https://cryptomarkets.tools/tools/hummingbot.md)
- [Paradigm](https://cryptomarkets.tools/tools/paradigm.md)

## FAQ

### Why was a position liquidated when the chart never touched the liquidation price?

Because the chart plots trades and the venue liquidates on its mark price, which is a different series. Binance, Bybit, OKX and Hyperliquid all state that the mark price, not the last trade, decides liquidation. The reverse also happens: a wick on the tape that the mark price does not follow liquidates nobody. To see what the venue saw, chart the mark price, which both Binance and Bybit publish as candles.

### Is the mark price the same as the index price?

No. The index is a weighted spot price taken from other exchanges. The mark price starts from the index and adds a basis term, so it sits where the perpetual has recently been trading relative to spot. OKX writes it as index price plus a moving average of the basis; Binance and Bybit take a median of three candidates, two of them built on the index and one the contract's own last price.

### Can I download mark price history?

From some venues, and not with volume. Binance's markPriceKlines and Bybit's mark-price-kline endpoints return open, high, low and close with no volume; Binance's response marks the volume fields as ignore. CCXT reaches them through fetchOHLCV with a price parameter of mark. How far back they go is the venue's decision: this catalogue's Freqtrade card records roughly three months of mark candles from OKX.

## Sources

1. [What Are Mark Price and Price Index in USDⓈ-Margined Futures?](https://www.binance.com/en/support/faq/what-are-mark-price-and-price-index-in-usd%E2%93%A2-margined-futures-360033525071) — Binance, 2026-09-25
2. [Mark Price (Perpetual and Expiry Contracts)](https://www.bybit.com/en/help-center/article/Mark-Price-Calculation-Perpetual-Expiry-Contracts) — Bybit, 2026-09-04
3. [What are the index price and mark price of margined contracts?](https://www.okx.com/en-us/learn/mark-price-and-index-price-of-margined-contracts) — OKX, 2026-09-11
4. [Robust price indices](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/robust-price-indices) — Hyperliquid, read 2026-09-26
5. [Oracle Prices](https://docs.dydx.xyz/concepts/trading/oracle) — dYdX, read 2026-09-26
6. [USDⓈ-M Futures REST API, market data — markPriceKlines, indexPriceKlines, premiumIndex](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/market-data) — Binance, read 2026-09-26
7. [Get Mark Price Kline, V5 market endpoints](https://bybit-exchange.github.io/docs/v5/market/mark-kline) — Bybit, read 2026-09-26
8. [Manual — mark, index and premium index candlestick charts; position structure](https://github.com/ccxt/ccxt/wiki/Manual) — CCXT, read 2026-09-26
9. [Downloadable CSV files — data types, derivative_ticker](https://docs.tardis.dev/downloadable-csv-files/data-types) — Tardis.dev, read 2026-09-26

*Last updated 2026-09-26. A reference page, corrected in place — not a dated post.*
