# An Analysis of Order Book Depth on the Binance Exchange

*This piece is the first of a three-piece series. We’re covering order book depth in this one. The second and third pieces cover bid-ask spreads and
slippage, respectively.*

Binance consistently ranks as the #1 exchange by trading volume across market data aggregation sites like Coinmarketcap and Blockchain Transparency Institute.

But pundits know that trading volume is an unreliable metric. Almost every cryptocurrency exchange reports larger trading volumes than what they actually have.

On the other hand, order book data is significantly more trustworthy. You can test the validity of an order book by executing an order against it. Only an exchange completely out of their wits would try to tamper with its order book. It’s a completely reckless, fraudulent, and self-destructive move.

While you can find plenty of data on Binance’s trading volumes. I haven’t been able to glean any information or analysis on Binance’s order book. So this article is going to feature a deep dive on this topic.

Note that this piece is actually the first of a three-piece series. We’re covering order book depth in this one. The second and third pieces will cover bid-ask spreads, and slippage, respectively.

### What is an Order Book?

An order book is just an electronic list of buy and sell orders for an asset, organized by price level.

These buy and sells orders are respectively referred to as bids and asks. A bid refers to the highest amount of price you are willing to pay for an asset. An ask refers to the lowest amount of money you are willing to sell your asset for.

If you submit a buy/sell order for a quantity that can be instantly matched at the proposed price, you are considered a taker**. **Taker trades do not go on the order book since they do not need to.

If the buy/sell order cannot be matched at the proposed price and you are waiting for someone else to take the other side, you are considered a maker**. **Maker trades end up going on the order book.

You can visualize the order book via the market depth chart on Binance.

You can also fetch order book data through Binance’s API. The only downside is that there is no way to get historical order book data. You have to get it live.

Order book depth can be highly volatile, especially with pairs that have inconsistent trading volumes. So rather than looking at one snapshot, I’ve written a script to gather order book every hour, for the last week.

I’ve formatted it in JSON and uploaded the raw data here.

### Measuring Order Book Depth

There are a few ways to measure order book depth.

The simplest method to calculate order book depth is by taking the total sum of every and bid multiplied by their respective price.

More sophisticated techniques include using a decay factor, which weighs bids/asks lower when they are further away from the market price. For the purposes of this article, we’re going to stick with the basic method.

Since we’re taking a snapshot of total order book depth every hour, we end up getting an entire distribution of different order book depths per pair. We can visualize these distributions by using a density plot.

Here’s the density plot for BNB/USDT, the #1 traded pair on Binance, compared to ZRX/BTC, the #50 most traded pair on Binance.

Typically, the distribution of order book depth looks like a bell curve, with long tails that can include multiple, smaller humps.

Here are the summary statistics on order depth for these the two pairs.

Additionally, I’ve calculated the summary statistics for every tradeable pair on Binance. But including every pair here takes up too much space. So feel free to peruse this Google Sheets for more information.

#### Order Book Depth vs. Trading Volume

It’s a commonly held belief, that order book depth should increase as trading volume goes up.

To verify this, we’re going to calculate the average daily trading volume for each pair on Binance. To keep the data consistent with the order books, we’re going to use the exact same time period.

Here’s what the rankings look like.

After merging the two datasets, I ran a simple linear regression with the logarithmic transformation of order book depth on the Y-axis, and the logarithmic transformation of trading volume on the X-axis.

As expected, we do observe a somewhat strong linear relationship between the two variables.

#### The Volatility of Order Book Depth vs. Trading Volume

What about the volatility of order book depth? My hypothesis was that high-volume trading pairs should have tighter and more narrow distributions, whereas trading pairs with less volume would have wider distributions.

To measure this, I used a normalized measure of volatility known as the coefficient of variation. Since each trading pair very different trading volumes, using standard deviation to calculate volatility is not fair. A pair with higher trading volumes will have a higher standard deviation by virtue of having higher absolute numbers across the board.

Here’s an attempt at a linear regression with the coefficient of variation on the Y-axis, and a logarithmic transformation of trading volume on the X-axis.

I would qualify this as a very weak, or non-existing, linear relationship. Order book depth for high volume trading pairs is just as volatile as their lower volume counterparts.

### Next Steps — Bid-Ask Spreads & Slippage

Now that we’ve done the hard stuff, collecting order book data & cleaning the data, it’s trivial to do the same kind of analysis on bid-ask spread and slippage.

So stay tuned for the next two articles, where we’ll dig into bid-ask spreads and slippage.

### Why do I care about Binance order books so much?

I quit my job recently to start HodlBot.

HodlBot is a tool that helps investors diversify their portfolios and automate their trading strategies. It works on top of Binance.

I’m currently indexing the entire cryptocurrency market via the HODL 30, a portfolio that is comprised of the top 30 coins by market cap.

If you don’t want to index, you can also create a custom portfolio and let HodlBot rebalance it for you.

To get started all you need is a

- Binance Account
- $50 in any cryptocurrency

If you want to know how HodlBot indexes the market and completes rebalancing, check out the blog I wrote here.