Building a Crypto Trading Bot

A short story about motivation
automation
Author

Jesse van Elteren

Published

March 2, 2018

What drives you when working on a project? For me motivation is made up of several components:

When I had an idea during the rise of bitcoin these elements where definitely there. But there was another big motivator…

I had made some money with the rise of bitcoin by buying it early and holding on to it. But what would be even better: a constant risk-free return without having to put much effort in. And that was exactly the idea that came to mind. Simple arbitrage: you open an account on multiple crypto exchanges and monitor the prices for different coins. When the prices are drifting apart you take up two positions: buying a coin at exchange A for a low price, and at the same time selling a coin short at exchange B for a high price. Then transferring the coin you’ve bought at exchange A to exchange B to neutralize the position and voila: profit. If I could have a program running on the background this would make me rich! It required a couple of functionalities to program: monitoring the prices though an API, taking up positions, neutralizing these positions and making sure to have enough crypto funds on the buying exchange. The spreads between the exchanged need to outweigh the transaction and transfer costs in order to be profitable.

I experienced how this sense of building a golden goose boosted my motivation to new highs. Sometimes I focus a lot on projects to make progress, but this was really next level 😊. After many hours of coding and learning to interact with crypto API’s, I got everything to work automatically. But alas, the opportunities for risk-free arbitrage became very limited, as a result of the markets maturing. The spreads started to get smaller and smaller making my bot not profitable anymore.

Greed is at the core of many things wrong in this world, but in this case it provided me a very fun and valuable learning experience.