Cryptocurrency Trading: Part One

Introduction to Combined Central Orderbooks, automated arbitrage tables, and easily identifying profitable pairs.

Cryptocurrencies are widely seen as effectively untradeable, or at least encumbered with idiosyncratic factors that make trading them very different from more traditional assets. The main concerns are the price volatility, concentration of large amounts of currency in very few wallets, and the credit risk of the exchanges.

I think this view is somewhat outdated given how the market has developed and this series is intended to introduce some of the trading fundamentals and data requirements for building an effective strategy. We will be talking about many different crypto markets — primarily Bitcoin but also delving frequently into less liquid markets or ones with different features and fundamentals.

This first article is about one of the most basic strategies for trading the simplest of cryptocurrency assets — arbitrage in the spot and perpetual markets. I’ll assume you have a good working knowledge of the difference between spot and derivative assets but will go into more detail on derivative pricing later in the series.

Arbitrage is the ability to enter into a riskless transaction that is guaranteed to make money. Like a perpetual motion machine generating free energy, the rules say that it cannot exist. No rational trader, and certainly no rational market, should be prepared to let you make free money without taking any risk.

However, cryptocurrency markets are extremely fragmented and comprised of many traders operating with a surprisingly limited view of the world. For example, some traders will operate on a single exchange without looking at trading activity across the entire market. This means such opportunities do arise — however small and fleeting they may be.

One way to see these opportunities arise is to look at a Combined Orderbook for the cryptocurrency you are trading. This is like the central orderbook on an individual exchange but includes the bids and offers from all the main exchanges to give a more complete view of the market. The prices on each exchange need to be adjusted for the fees that you would pay on that exchange. For example, if there is a bid for $10,000 on Bitmex, and the same bid for $10,000 on Binance, but the fees on Bitmex are higher, you would be better off selling at the bid on Binance.

A Combined Orderbook for BTCUSD Perpetuals showing a small arbitrage between Gate-io and Bybit

You can see a live combined orderbook for spot BTCUSD here: https://www.cryptostats.dev/combined_orderbook . There are also links to the combined orderbooks for every cryptocurrency pair vs USD on the homepage (https://www.cryptostats.dev). These are all adjusted for the first-tier taker fee on each exchange, what you would pay if you signed up and had no trading volume on your account. If you would like to provide custom fees, or integrate the data into a trading algorithm, there is an API available that delivers all this data via streaming WebSocket (https://docs.cryptostats.dev).

Orderbook visualisation and live trades

This page also lists all the trades that occur on each of these assets so you can see which exchanges are seeing demand at each price level, and a visualisation of the level of passive (rested) trades on the orderbook which gives an indication of which way the orderbook is likely to break (the subject of another article).

If you are using the API, you can use the following subscription from the documentation:

This will send through a continually updating stream of all changes to the combined orderbook, and all trades on the underlying instruments on each exchange:

Another way to visualise arbitrage is through an arbitrage table, this shows the amount of profit or loss made from buying at one exchange and selling on another. Typically, these tables aren’t adjusted for fees, and sometimes use mid rates rather than the bid price of one exchange and ask price of the other. Cryptostats shows a fee-adjusted arbitrage table for each of these pairs with the actual profit (or loss) made from buying at the offer on one exchange and selling at the bid on another.

You can again reach the arbitrage table for any asset from the home page. As an example, we will look at the Arbitrage Table for spot BTCUSD here: https://www.cryptostats.dev/arbitrage

The amount lost from attempting an arbitrage, post-fees, on BTCUSD spot

This shows that there is a fairly substantial loss from attempting any arbitrage across these exchanges once you factor in the bid-ask spread and the trading fees for each exchange.

If we look at the same table before adjusting for fees, what you will see in many online arbitrage tables, it shows a good profit for arbitraging some pairs:

As you can now see, this profit is illusory and — as is so often the case when you think you have found an arbitrage — it is actually just due to the hidden costs of putting on the trade or some other factor that confounds that calculation, such as credit risk or liquidity.

All is not lost, however, as we can use this last factor to our advantage. What about the arbitrage table for some less liquid cryptocurrencies — where perhaps the arbitrage is too small for large-scale market makers and arbitrageurs to trade away?

Here we can see the arbitrage table for BNBUSD Perpetual. I scrolled down the front page of cryptostats.dev until I found a less liquid cryptocurrency that was still traded on a number of exchanges and used a trial-and-error approach until I found one that allows for an arbitrage post-fees. From the homepage screenshot, we can see that BNBUSD Perpetual is trading at 509.70USD (mid) on Gate-io and at 489.64 on Binance. From the arbitrage table, we see that we could sell on Gate-io and buy on Binance and lock in 2.50USD post-fees.

Ok, so you probably aren’t going to be able to retire on the back of this trade alone — but arbitrage is characterised by small and hopefully frequent profits, and the ability to use leverage due to the lower risk of the positions compared with a directional trade.

The other approach you can take using Cryptostats is to use the API to subscribe to Arbitrage Alerts:

Example subscriptions from the documentation

You will then receive a JSON response from the API whenever an arbitrage opportunity is detected in any cryptocurrency:

It is then up to you to determine the risk and reward, and to look for any further confounding factors such as those we discussed before (credit and liquidity risk). One other caveat, for perpetual swaps some exchanges have different definitions for the index on which they value the swap — perhaps they weight the spot price on different exchanges to different degrees, which means that the price should not be the same as another perpetual swap.

The pricing of these perpetual swaps will be the subject of the next installment of this series.

You can follow me on Twitter @mattjgrint, read more on substack, or visit my website at https://grint.tech. Email me at matt@grint.tech.

None of this article should be construed as trading or investment advice and is written in a personal capacity, not that of any employer or other affiliated entity.

Markets and Technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store