HodlBot     About     Posts

An Analysis of Slippage on the Binance Exchange

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

What is Slippage?

Remember how the order book looks like a valley surrounding the market price?

Bids in green on the left side and asks in red on the right side, forming what looks like a valley around the market price.

If you want to execute a large order, there may not be enough interest at the desired price level to maintain the expected price of the trade. The difference between the expected price of a trade and the price at which the trade is actually executed is known as slippage.

Assuming trading volume is high, you should see less slippage. And when trading volume is slow, you should expect to see more slippage.

Fetching Order Book Data

In order to calculate slippage, we’re going to need to fetch order book data using 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.

Analyzing Slippage

To see what slippage would be for a given pair at a particular moment in time, we’re going to simulate a $5,000 buy to see how it pumps the price. We’re also going to simulate a $5,000 sell to see how hard it crashes the price. We’ll calculate slippage as the average between the two.

Note that in some cases, it is impossible to actually fulfill a $5,000 buy or sell. If the order book is too shallow, then you can literally rip through the entire thing and still not have enough market depth. In these special cases, we will calculate the final price in the order book as the end price.

Simulating a $5,000 buy/sell across

Since the market price for any pair is quoted in the base currency, we’ll have to do some currency conversions to understand how much a $5,000 is worth in the base currency.

We’ll do that by dividing $5,000, by the USD price of the base currency for that day.

E.g. $5,0000 / $3,889.98(Price of BTC) = 1.28 BTC

E.g. $5,0000 / $136.61 (Price of ETH) = 36.60 ETH

We’ll do the same for BNB & XRP, but we’ll leave USDC, USDT, PAX alone since they are tied 1:1 to USD.

Slippage Distribution

Here’s what the distribution of bid-ask spread was for ENJ/BTC, the #5 traded pair on Binance, compared to FET/BTC, the #10 traded pair on Binance.


Typically the distribution of more infrequently traded pairs will be much wider than a high-volume trading pair. Whereas slippage will mostly be around 0% for something like ENJ/BTC, a pair like FET/BTC will likely see some slippage than not.

Here are the slippage summary statistics for these two pairs.

Though the mean slippage for these two pairs is around 1-2%, the max is a whopping 6%!

Again, you can find summary statistics for the bid-ask spread for every coin in the Google Drive link here.

Slippage vs. Trading Volume

On Binance, you can see up to 120% in slippage for trying to execute a $5,000 order across a pair with low trading volume.

Here’s the exact same graph, but with different colours outlining trading volume by quartile.

The most heavily traded pairs tend not to have much slippage. This ramps way the heck up once you get to pairs with trading volumes lower than the 50th percentile.

Busting the Order Book Wide Open

Remember when we said that oftentimes, the order book can be too thin and a simple $5,000 order can overwhelm the entire order book?

Based on the snapshots we were taking every hour, here is how often the order book was too thin for an instantaneous $5,000 buy or sell.

It was mostly okay for trading pairs in the top quartile. I assume that the order book was thick enough for all top trading pairs.

But what surprised me was that a $5,000 order could not be met more 50% of the time across for trading pairs below the 50th percentile.

Why do I care about slippage on Binance 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

  1. Binance Account
  2. $50 in any cryptocurrency

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


Email New Posts