Skip to content
All library documents

Reading Order Book Side, Volume, and Base Currency

Article Quant Q&A · Author: bliako

Summary

The document asks how to interpret the Kraken XBT-USD order book when estimating how many price levels are needed to trade a specified amount. It distinguishes asks from bids, asks which currency the displayed volume uses, and raises the problem of trading in the reverse direction when only one quoted pair is available. The example includes price and volume rows plus pair and lot decimal metadata.

The answer states that the displayed volume is in BTC (XBT) on both sides. For the XBT-USD pair, buying the pair increases the XBT position and reduces USD, while selling it does the reverse; buyers generally consume asks and sellers consume bids. Decimal metadata can support integer-based representation of prices and quantities, though the answer only briefly recommends scaling by the relevant decimal counts and does not work through the example. The exchange’s pair conventions matter, and the response does not explain quote-currency budget calculations, rounding, fees, or exact level consumption.

Key ideas

  • For the XBT-USD book described, displayed volume is expressed in XBT on both the ask and bid sides.
  • A buyer of the pair consumes ask liquidity, while a seller consumes bid liquidity.
  • Buying the pair increases XBT exposure and reduces USD exposure; selling reverses those changes.
  • Pair and lot decimal metadata can guide integer representation, but the answer does not detail rounding or trade-cost calculations.

Tags

Full text
# Interpreting an Order Book (example Kraken.com)


# Interpreting an Order Book (example Kraken.com)












An (forex) Order Book (OB) for a trading (forex) pair (e.g. XBT-USD) has ASK and BID rows. Each row has PRICE and VOLUME (at least). Each row represents an offer for selling or buying a maximum of VOLUME amount at PRICE.

Starting with a START-AMOUNT in BASE currency, how can I calculate exactly how many rows, starting from the 1st, i.e. the "cheaper-for-me"?

It is a simple calculation yet I am confused:

- as to whether I need to use the ASK or BID rows.

- as to what currency is VOLUME in.

- as to whether VOLUME in ASK and VOLUME in BID are in different currencies.

- Sometimes I will need to buy USD with XBT and so I will need the USD-XBT OB which does not exist (at least in kraken.com where I focus), can I use XBT-USD OB in order to buy XBT with USD? How?

Additionally, how should I use the "pair decimals" and "lot decimals" for the specific trading pair in order to do accurate, integer calculations? Note: terminology specifically refers to kraken.com's OB from the kraken.com's Asset-pair metadata but mainly I am asking: if someone tells us that in a specific book, currency (I guess BASE?) is expressed in 1 decimals and volume in 8, how can I do the calculations in integers to be accurate. (I realise that can be a question on its own and can ask it separately if people suggest it).

I am not sure if different forex platforms have different conventions, if they do then I am working with kraken.com . Here is some example data specific to kraken.com:

XBTUSD (get it with this API call from browser:

```
ASKS:
45867.70000,0.002
45870.90000,0.001
45873.80000,0.001
45875.90000,0.379
45880.70000,0.215
BIDS:
45867.60000,3.708
45867.30000,0.186
45866.80000,1.090
45865.90000,0.436
45865.50000,0.030
```

XBTUSD metadata (get it with this API call from browser):

```
...
pair_decimals:1,lot_decimals:8
...
```

p.s. I have very little experience with finance, more with programming and algorithms.

## Answer by Bob Jansen (score 3)

https://quant.stackexchange.com/a/66480

- This question is unclear to me, what is your goal?

- It's in BTC

- Both BTC

- You can increase your BTC position and decrease your USD position by buying the pair and decrease your BTC position and increase your USD position by selling the pair.

You can just multiply by the number of decimals to get ints?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.