Due to or thanks to the fact that each exchange has its own order books and exchanges are separate, geographically distributed entities, the order books between each exchange are different. Differences may be small or huge, they change in time and arbitragers and market makers make sure they don’t exist for too long….


The difference in price between the exchanges leads to the situations when it pays off to buy an asset in one exchange and sell it for bigger price on another exchange for the price that covers the fees for the orders plus some assumed profit — that is what we call the arbitrage. Arbitrage is a relatively simple operation in which we are takers on both sides with the use of market orders or with the use of limit orders with “Immediate or Cancel” time in force. You can find more details about this strategy in the series of my older articles Cryptocurrency arbitrage strategies.

High Frequency market making

A market making is trading strategy in which we actively quote on both sides – providing bids as well asks. High-frequency version of market making strategy assumes putting orders with the price that is very close to the market price. The orders are constantly updated to reflect the moves of the market price. This means we don’t have any clear market dependent strategy. We assume equal distribution of fills on our orders – buys and sells – in other words we assume that the price is a random walk.

With those assumptions this strategy makes money. In case the market moves strongly in one direction, we start loosing money. For example if the market is strongly moving upwards, this strategy would be selling our assets, while when the market is strongly moving downwards, we would be buying. With crypto market high volatility this strategy may lead to pretty high loses if the market makers do not close their orders on time. The solution to avoid the exposure is hedging the exposure. We can hedge with the spot prices on other exchanges

High Frequency market making with cross-exchange hedging

The strategy presented above is far from being perfect. We want something like that – we want to make markets but at the same time we want to get benefits of the arbitrage – we want to stay market neutral. How to do that? In order to avoid the risk of price movements of the underlying asset, we want to hedge all our orders by buying/selling same asset on other exchanges. This does not always pay off. Let’s say that on the exchange where we are quoting – ie Poloniex we are putting asks for BTC with price 22 (good old times ;). When someone buys BTC from us, we will instantly buy same amount of BTC on another exchange – let’s say Binance. We also need to pay the fees – on Poloniex we pay maker fee and on Binance we pay taker fee. In order for this operation to be profitable, the price on Binance would have to be lower than the price on Binance by the sum of those fees. So how do we make this happen? We need to revers the flow of action – we will detect the situations when this condition is true, and we will very frequently update our quoting orders. Take a look at the diagram below:

High-frequency market making with cross-exchange hedging

When we see that the Binance offers an asset — let’s say 0.01 BTC for the price X that is lower than the price Y on Poloniex — we start offering 0.01 BTC on Poloniex for the price X + fees + assumed profit. It means we are putting limit order into the books of Poloniex and we actively keep adjusting this order when the price on Binance changes. When our order is filled on Poloniex, it means that we sold our BTC for X + fees + assumed profit, we execute market order on Binance to buy 0.01 BTC for X. After this operation, our total balance in BTC didn’t change, we paid the fees on both exchanges and we have finished with some additional money in our pocket — that is assumed profit. As in this case we are using limit order on one side, the total fees are lower than in case when we used market orders in the arbitrage and limit order on one side guarantees that the exchange matching engine will fill our order as soon as this is possible. This factor makes this method more resilient than having two taker orders on both sides. In this case the sequence starts from filling one side by the exchange, therefore the bot has less work to do – it just needs to execute taker order on the other side. That is lower risk of slippage than executing two taker orders on both sides as in the arbitrage. One can say that this method is much more sophisticated than the arbitrage. Plus, active quoting doesn’t mean we cannot take arbitrage opportunities with their full depth. Whenever we see them, we simply issue taker orders on both sides for the full volume of the arbitrage opportunity.

Bigger picture

So why the example above was possible at all? Why the price on the Binance would be better than the price on Poloniex? Some markets have very high liquidity. There are many market makers actively operating on such markets simply because high volatility means high volume of their trades and each trade means profit for them. Market makers compete between themselves by putting their prices closer to the market price to increase the probability of their orders being filled. That makes the spread between ask and bid price very very tight. On the other hand there are markets with pretty low liquidity – the volume of trades there has not been high enough to attract big market makers. Small market makers acting on such markets without proper competition set high spread between ask and bid price. That is the opportunity for market making with cross-exchange hedging. The spread may be not big enough for the arbitrage – as with the arbitrage we are taking on both sides and fees are higher. With cross-exchange market making we have maker fee on one side and this operation is often two times cheaper than the latter.

What is next?

In the example above the hedging has been conducted with the same instrument on another exchange. Now why don’t we hedge on the same instrument but with margin? Why don’t we hedge with the use of options, futures or perpetuals? Where the fees are lower and we can use the leverage to decrease our capital engagement? Well, actually nothing stops us. This is exactly where this story is going.

Previous articleKey factors in high frequency crypto trading
Next articleTelegram BOT Warning