EN

Reading an order book

4 minDifficulty Checked 2026-11-10
Key takeaways
  • book_offers returns the funded offers for one direction of a pair.
  • Quality is taker_pays divided by taker_gets. Lower is better for the taker.
  • A result is final only when its ledger is validated.

An order book is two lists facing each other. One list holds people selling FOO for XRP. The other holds people selling XRP for FOO. Each list is sorted so the best deal is on top.

Explorers and trading apps draw this as a table of prices and sizes. Underneath, they all ask a server the same question: "Show me the offers for this pair."

Three things help when you read a book:

  • Check the issuer. "USD" from one issuer and "USD" from another are different books.
  • Size on screen is not a promise. Offers do not lock funds. An owner may hold less than the offer says. Servers report how much is funded.
  • The book moves every ledger. A new ledger closes every 3 to 5 seconds. What you saw may be gone when your trade lands.

Your trade is settled only when the ledger that holds it is validated. Until then the result is tentative. Other transactions in the same ledger can run before yours and change what is left for you.

The DEX knows nothing about who is behind an account. Anyone can trade in the open books. Issuers who must restrict their token use tools such as authorized trust lines and freezes.

Check yourself3 questions
1. In book_offers, what does quality mean?
2. Two offers have the same quality. Which fills first?
3. An offer shows taker_gets_funded lower than TakerGets. What does that tell you?
Sources
Next moduleAMMT4 · 16 min