How Hyperliquid's order book works

A central limit order book like a big exchange's, except every order and cancel is a blockchain transaction.

Updated Fact-checked November 4, 2026 9 sources
Short answer

Hyperliquid runs a fully onchain central limit order book for every market, matching orders by price, then time. Within each block it processes cancels before new orders that could fill, which protects people quoting prices; the docs give a median order latency of 0.2 seconds and capacity of about 200,000 orders per second.

An order book is a list of everyone’s standing offers to buy (bids) and sell (asks) at specific prices. When a new order crosses an existing one, they trade. Stock exchanges and big crypto exchanges work this way. Hyperliquid does too, but the book lives on its own blockchain, HyperCore, instead of on a company’s servers.

Most onchain trading elsewhere uses automated market makers (pools with a pricing formula). Hyperliquid chose the order book because it lets professional market makers quote tight prices, and lets you see exactly what liquidity is available at each price.

Matching: price, then time

Orders are matched in price-time priority: the best price fills first, and among orders at the same price, the earliest fills first. It’s a queue at each price level.

Two rules shape what you can place:

  • Tick size (price steps). Prices can have up to 5 significant figures, and no more than 6 decimal places minus the asset’s size decimals on perps (8 minus on spot). Whole-number prices are always allowed. So 1234.5 is valid; 1234.56 isn’t.
  • Lot size (size steps). Size must be a whole multiple of the market’s lot size.

Margin is checked when you place an order, and again for the resting order at the moment it’s matched, so a resting order can’t fill if the account no longer has margin for it.

Self-trade prevention: if two of your own orders would match, the resting one is cancelled instead of filling, with no fee.

Why cancels go first

Here is a detail that matters more than it sounds. Within each block, Hyperliquid’s mempool and consensus logic sort actions into three groups and process them in this order:

  1. Actions that don’t send fill-able orders (for example transfers, leverage changes)
  2. Cancels
  3. Actions that send at least one order that can fill immediately or rest (GTC or IOC)

Within each group, actions keep the order the block proposer saw them in.

The effect: a market maker who cancels a stale quote in the same block as your aggressive order gets the cancel processed first. That lowers the risk of quoting, which is one reason makers can quote tighter spreads.

Order types

From the order types docs:

Order typeWhat it does
MarketFills now at the best available prices
LimitFills at your price or better
Stop market / stop limitBecomes a market or limit order when the trigger price is hit (a long’s trigger sits above the mid, a short’s below)
Take market / take limitSame, for taking profit (a long’s trigger below the mid, a short’s above)
ScaleA ladder of limit orders across a price range
TWAPSplits a big order into suborders over time (details below)
Trailing stopA market order that triggers when the mark price pulls back a set distance from its best level since activation (perps only)
ChaseA post-only limit order that re-prices to follow the best bid or ask; runs in your browser tab, up to 5 at once

Options you can attach: Reduce only (can only shrink a position), Good til cancel (rests until filled or cancelled), Post only / ALO (only rests, never takes), Immediate or cancel (fills what it can now, cancels the rest).

TP/SL

Take-profit and stop-loss orders trigger on the mark price. A market TP/SL accepts up to 10% slippage; a limit TP/SL lets you cap slippage, at the risk of not filling if the price gaps past your limit. TP/SL set from the position panel cover the whole position by default. TP/SL attached to an unfilled entry order are only placed if that order fully fills (or partially fills and is then cancelled for insufficient margin): if you cancel a partly filled entry, its TP/SL are cancelled too.

TWAP

A TWAP sends suborders at least every 30 seconds, over 5 minutes to 7 days, minimum $100 total. Per the docs, a $10,000 order over an hour becomes about 121 suborders of about $83 each. Each suborder has a 3% slippage cap; if it falls behind, later suborders get bigger, up to 3 times normal size.

Size limits

Maximum market order value is $30M on markets with 25x or higher max leverage, $5M at 20x, $2M at 10x, and $500,000 otherwise. Limit orders can be up to 10 times those amounts.

Mark price vs oracle price

Two reference prices sit beside the book:

  • Oracle price: each validator computes a weighted median of spot prices on Binance (weight 3), OKX (2), Bybit (2), Kraken, KuCoin, Gate, MEXC and Hyperliquid (1 each); the chain takes a stake-weighted median of validators’ submissions. It’s used for funding. Hyperliquid’s own spot price is left out for assets whose main market is elsewhere (like BTC), and external prices are left out for assets whose main market is Hyperliquid (like HYPE) until there’s enough liquidity.
  • Mark price: the median of (1) the oracle price plus a 150-second average of Hyperliquid’s mid-minus-oracle gap, (2) the median of Hyperliquid’s best bid, best ask and last trade, and (3) a weighted median of perp prices on Binance, OKX, Bybit, Gate and MEXC. It’s used for margin, liquidations, unrealized profit and loss, and TP/SL triggers.

Both update about every 3 seconds. Because the mark blends in outside prices, a single wild trade on Hyperliquid’s book can’t by itself trigger liquidations.

Why it matters to you

  • You can see the depth before you trade. The full book is public; check it before sending a large market order into a thin market.
  • Use limit or post-only orders to pay the lower maker fee (0.015% vs 0.045% taker at the entry tier on perps). Model the difference with the fee calculator.
  • Your stops follow the mark price, so they may trigger when the last trade on screen hasn’t touched your level, or not trigger when it briefly has.
  • Large orders: use TWAP or scale rather than one market order.

What can go wrong

  • Slippage in thin books. Small coins and builder-deployed markets can have little depth; a market order can fill far from the price you saw.
  • Stops in gaps. A limit stop can be skipped entirely in a fast move; a market stop can fill up to 10% away.
  • Chase orders stop if you close the tab, because they run in the browser.
  • Everything is public. Large resting orders and positions are visible to everyone, including traders who may trade against them.
  • Access. Hyperliquid’s terms restrict the United States, Ontario and other jurisdictions.

See it live on the markets list, or read how a trade moves through Hyperliquid.

Questions people ask

Is Hyperliquid's order book really onchain?

Yes. The docs say HyperCore doesn't use an off-chain order book: every order, cancel, trade and liquidation is a transaction ordered by HyperBFT consensus, with one-block finality. Anyone can read the full book and trade history.

What is the difference between mark price and oracle price?

The oracle price is a weighted median of spot prices on major exchanges and is used for funding. The mark price blends that oracle with Hyperliquid's own book and other exchanges' perp prices; it's used for margin, liquidations, unrealized profit and loss, and triggering TP/SL. Both update about every 3 seconds.

Why did my order get rejected for price?

Prices must fit the tick size: at most 5 significant figures, and no more than 6 decimal places minus the asset's size decimals on perps (8 minus on spot). Whole-number prices are always allowed. Sizes must also be a whole multiple of the lot size.

How does TWAP work on Hyperliquid?

A TWAP splits a large order into suborders sent at least 30 seconds apart over 5 minutes to 7 days, with a $100 minimum. Each suborder has a 3% maximum slippage, and a TWAP that falls behind tries to catch up with suborders up to 3 times normal size.

Do stop-losses use the last traded price?

No, TP/SL orders trigger on the mark price. Market TP/SL orders have a 10% slippage tolerance; setting a limit price instead controls slippage but risks not filling in a fast move.

Sources

  1. Hyperliquid Docs — Order book (HyperCore)
  2. Hyperliquid Docs — Order types
  3. Hyperliquid Docs — Take profit and stop loss orders (TP/SL)
  4. Hyperliquid Docs — Robust price indices
  5. Hyperliquid Docs — Oracle
  6. Hyperliquid Docs — Tick and lot size
  7. Hyperliquid Docs — Self-trade prevention
  8. Hyperliquid Docs — HyperCore overview (latency, throughput)
  9. Hyperliquid Docs — Contract specifications (max order values)