Testnet

Reading the order book

Every order waiting to buy or sell, by price. It shows where you would fill and what it would cost.

5 minLesson 2 of 52 questions at the end

Key ideas

  1. 1The book lists bids (buyers, below the price) and asks (sellers, above it). Each row is a price and how much waits there.
  2. 2The spread is the gap between the highest bid and the lowest ask. A market buy pays the ask; a market sell gets the bid.
  3. 3A large market order eats through several rows. The difference from the price you saw is called slippage.
  4. 4Your bot caps slippage (2% unless your community’s owner set another limit), so a market order never fills further away than that.

Reading it

The book lists every order waiting to trade. Asks (sellers, in red) sit above the price, the lowest first. Bids (buyers, in green) sit below, the highest first. The gap between the highest bid and the lowest ask is the spread.

Worked example: The top of a BTC bookBTC at an example price
Highest bid
99,998
Lowest ask
100,003
Spread
$5.00 (0.0050%)

A market buy starts at the ask and a market sell at the bid: buying and selling straight back costs the spread.

Walking the book

A market buy takes the lowest ask first. If it is bigger than what waits there, it keeps going to the next row, and the next, each at a higher price. The difference between the first price and the average you paid is slippage.

Order book

A made-up book around today’s price. Pick an amount to see how many rows a market buy uses, or switch to a limit buy to see it wait.

BTC at an example priceMade-up book
Order
Amount
PriceSize (BTC)
100,0380.780
100,0330.690
100,0280.600
100,0230.510
100,0180.420
100,0130.330
100,0080.240
100,0030.150
100,000Spread $5.00
99,9980.165
99,9930.264
99,9880.363
99,9830.462
99,9780.561
99,9730.660
99,9680.759
99,9630.858
Average price
100,011
Rows used
4
Slippage
0.009%
From the lowest ask
Fees
$95.00
0.045% taker + 0.05% bot fee

The order used up 4 rows, so it paid up to 100,018. Splitting it, or using a limit order, would avoid walking the book.

Makers and takers

Orders that wait on the book make the market: they are makers, and pay Hyperliquid 0.015%. Orders that fill against them take from it: they are takers, and pay 0.045%. A limit order is a maker only if it rests first; one that fills straight away is a taker.

In Lance Trade

The book sits next to the chart, with the recent trades. Click a row to use its price in a limit order. The bar behind each row shows how much waits there compared with the biggest row.

Common mistakes

  • Judging a market by its price alone. A thin book means big orders move the price against you.
  • Reading big rows as promises. Orders on the book can be cancelled at any moment.
  • Ignoring the spread. On a wide spread, a round trip starts at a loss before fees.

Check yourself

Question 1 of 2

The highest bid is $99,990 and the lowest ask is $100,010. What is the spread?

Try it in Lance

The order book next to the chart updates as orders arrive. Click a row to use its price in a limit order.

Watch a live book
Up nextLesson 3 of 5Sizing: by amount or by riskType the position size yourself, or say what you are ready to lose and let Lance work the size out.Next lesson
Previous: Market and limit orders

Lance Learn is education, not advice. Examples use made-up or rounded numbers and say so; nothing here tells you what to trade.

Trading perpetual futures with leverage is high risk. Prices can move fast and you can lose all the money you put in. Lance is software: it does not give investment advice, manage money or trade on anyone’s behalf. Trades are executed on Hyperliquid, a third-party exchange that is not affiliated with Lance. Lance is not available to persons in the United States, the United Kingdom and sanctioned countries.