Overview
In 2017, I developed an automated cryptocurrency trading bot that executed high-frequency trades on the GDAX (Coinbase) exchange. The system capitalized on small price movements in the crypto market, particularly focusing on Ethereum (ETH) trading pairs. By implementing momentum-based strategies and real-time market analysis, the bot could execute trades with precision timing to capture minimal but consistent profits.
Trading Strategy
The bot employed a pretty elementary buy-decision algorithm that evaluated multiple conditions. I didn’t really know what I was doing, but it worked.:
shouldBuy(conditions, stgy) {
if (conditions.midMomentum.ageInSeconds < 1
|| conditions.midMomentum.slope < this.minMomentum
|| conditions.nearMomentum.slope < 0
|| conditions.farMomentum.slope < 0
|| conditions.positions.some((p) => !p.buy.settled && !p.buy.partial)
|| conditions.positions.length >= this.maxBuys
|| conditions.spread < this.minSpread
|| conditions.resistance > this.maxResistance
|| conditions.price > conditions.priceUpperThreshold) {
return false;
}
return true;
}
A key element that made this bot work was how we thought about transaction fees. At the time, GDAX charged no fees for maker orders (limit orders that add liquidity). Only taker orders (immediate fills that remove liquidity) incurred the 0.3% fee. Also, high-volume traders qualified for reduced taker fees of 0.1%
While many believed high-frequency trading wasn’t viable on GDAX due to fees, we were able to eliminate the majority of these costs.
By exclusively using limit orders for buying and strategic selling, we significantly reduced transaction costs, making high-frequency trading profitable.
Performance and Profits
At it’s peak, the bot was doing over $1m/month in transactions, and netting about $25/hr. It performed best when the market was relatively flat. If the market was up a lot, it didn’t always outperform the market. It was, however, always profitable regardless of market conditions.
To maintain oversight while away from the trading bot, I developed a custom Slack integration that provided me with real-time trade notifications and hourly balance updates. Below is a screenshot showing examples of the live updates I was getting via Slack.
Why I Stopped
In 2018, I stopped the bot. I received notice from Coinbase that my records were part of a subpoena. Regulation was scaring me, and no one knew how to report taxes correctly.
I made an attempt, but was audited by the IRS and told I owed just over $199k. After about a year of going back and forth with the IRS, they told me that I owed less than $10k. I agreed to their new fee, paid it, and moved on. Apparently there was an error in the reporting that Coinbase sent over, and it triggered a bunch of false flags that year.