How the exchange works

The order book (livro de ofertas)

4 min

Every trade on an exchange passes through the order book (in Brazil, livro de ofertas or book de ofertas) — the live, ranked list of all the buy and sell orders waiting to be filled.

Two sides of the book

The order book has two columns:

  • The bid side — everyone who wants to buy, listed with their price and quantity. The highest bid sits at the top.
  • The ask (offer) side — everyone who wants to sell. The lowest ask sits at the top.

The highest bid and the lowest ask are the best available prices. The gap between them is the spread.

How a trade happens

A trade occurs when a buy order and a sell order meet at the same price:

  • If you place an order to buy at the current best ask, it matches the seller waiting there and executes immediately.
  • If no one will sell at your price yet, your order joins the book and waits until someone is willing to trade with you (or until you cancel it).

Price-time priority

Orders are matched by a fair rule: best price first, and among equal prices, whoever arrived first. So a better price jumps the queue, and at the same price the earliest order fills first.

Why reading the book helps

The depth of the book — how many shares are stacked at each price — tells you how liquid a stock is. A blue chip shows deep, tightly-packed orders; a thin small cap shows big gaps. Seeing the book demystifies why your order fills instantly sometimes and waits other times.

Finished reading?
Risk disclaimer

This content is for educational and informational purposes only and is not investment, financial, tax or legal advice. Trading and investing carry risk, including the possible loss of capital. Any performance shown by third-party tools is hypothetical and not a promise of future results. Do your own research and consider professional advice before making any decision.