01What
Shows the order book for a trading pair — every open offer, sorted so the best price is first.
02Why you'd use it
Look before you trade. The book tells you the going rate and how much depth (volume) is available at each price.
03How
- 1Enter the pair: Base Currency and Quote Currency, with issuer addresses for tokens (leave issuer blank for XRP).
- 2Run it and read the top offers — taker_gets is what the offer gives, taker_pays is what it asks.
- 3Divide the two amounts to get each offer's price, and note how much is available before the price steps up.
- 4Query both directions (swap base and quote) to see both sides of the market.
Watch out
- XRP amounts in the raw response are in drops — divide by 1,000,000.
- One call shows one side of the book (offers selling the base). The other side is a second query with the currencies swapped.
- A thin book means a large trade will 'walk' up the prices and fill worse than the headline rate.
For example
Before swapping 500 XRP to USD, you pull the book and see only 200 XRP of depth at the best price, with the next tier 2% worse. You split your trade into two smaller offers instead of taking the hit at once.