How I built a crypto trading bot platform over the last 3 years
I loved computer science and programming for as long as I can remember, but my journey in programming hasnt been straightforward.
My earliest memories go back to tinkering with WordPress and cobbling together simple websites at 13. Outside of school, where we dabbled in Turbo Pascal, my first real encounter with code happened by accident when I stumbled upon WordPresss source files.
Back then, I pieced together what snippets of code did by linking them to parts of the webpage. Id hunt for a specific word on the screen, then trace it back through the fileslike solving a puzzle. That thrill of discovery hooked me, and thats when it all started to make sense.
I kept building my foundation with HTML, CSS, and JavaScript, but backend work didnt click until years later.
Four years ago, I finally decided to level up my backend skills. Python was new territory for me, but it was surprisingly easy to pick up. For all the trolling that Python gets online, its by far the least daunting introduction to backend languages.
After experimenting with small projects, I dove into rewriting the MetaTrader trading bots Id built, this time in Python.
Some more context
The first few bots I built worked but if you looked at the code, youd probably die inside a little. Nothing hits harder than the cringe of revisiting your old projects, and I grew up on the Internet.
As I got a bit more confident with the language, I decided to open source one of the bots that I had been working onthe Binance Volatility Trading Bot (BVTB).
The idea behind this bot is that it would help you detect cryptocurrencies that are just about to moon by constantly analysing all coins on Binance. The bot would look at the price change in % over a certain period of time, and if any coin breaks that thresholdit would buy it.
Sofor instance you could Build trading strategies that work like this:
BUY any coin on Binance that gains more than 4% within 2 minutes.
From here on, all that was left to do was run multiple bots at the same time and figure out what the sweet spot is in the current market.
I shared my idea, and tool on Reddit and it went nuts. The project has over 3000 starts on GitHub and its still available today.
As months went by, a group of core devs was informally created that would maintain the tool and add new features. But one of the big limitations of the BVT bot was that it wasnt really easy to use, or run.
Youd need to be willing to have your computer run 24/7 or have access to a Raspberry Pi. Youd also need to be comfortable with Python, and with the general idea of running scripts you find from strangers online.
Thats when we decided wed turn this into a SaaS. Fast forward 3 yearsalgo crypto trading platform Aesir was born.
Building an algo crypto trading bot platform
Going from a Python script you can run locally, to a scalable web application with user authentication is a completely different ball game. One that I would not have been able to pull off without the amazing team that we established in the early BVTB days.
We all met through that project, but we had the perfect mix of people to pull this off. We had 3 full-stack developers, 2 DevOps and security experts, and a business admin.
Before building the application, we looked at existing algorithmic trading apps like HummingBot and 3Commas. We also had numerous conversations on Reddit and Discord trying to understand what features people want the most, and how we can innovate on the formula.
With a roadmap in mind, it was time to figure out how to actually build an application that scales.
We initially decided to keep the core engine in Python and build around it. By engine, I mean the part of the application that actually does the buying, selling, and portfolio management.
It was 6 months in, and we had the overall architecture in placeA cloudfront, an EC2 for the website, and various microservices passing messages to one another.
And it turned out that Python is an absolute memory hog and makes the application extremely inefficient to run at scalenot to mention slow.
It was back to the drawing board and I was pretty much hands off the engine at this point and instead moved to the frontend. The engine was now in the hands of people with a lot more experience than myself, and the decision was to switch to a more memory efficient languageC#.
A few more months in, and this was absolutely the right call. C# is great for memory management and speed, so it was no surprise that our core was running incredibly lean now. Aesir was slowly getting there.
Release and Updates
After a closed beta release, it was time to open the gates. We officially launched in May 2023. At the time, we wanted to make sure that people actually liked the application and that they enjoyed using it.
So, through behavioural analytics tools like Microsoft Clarity, we spent time analysing how the platform is being used, identifying pain points, and putting together a plan to improve the user experience.
It turned out that the application wasnt as user-friendly as we initially thought. In many ways, thats a coming of age with many SaaS startupsfunctional doesnt mean people will understand your concepts and thinking.
So we started working on a new UI/UX update. Im super excited to say that weve just released this new update, and this is the best version of Aesir yet. Not only is it more easy to use than before, but it offers more visibility over your bots performance and more opportunities to improve your strategy.
Aesir Core features
Fast forward to today and we have a growing community of about 2k members on Discord, and just over 2.4k on Reddit (youre welcome to join us on there!).
We officially released Aesir in May last year, making it just over 10 months old! Since then, weve been focusing on adding new features and improving existing ones. Today, although still very young, Aesir offers some of the best crypto trading bots on the market.
Here are some of the highlights:
Social Hub
The Social Hub shows you the top configurations that other traders have created, along with their overall profitability split by 30, 60 and 90 days. If a configuration is public, users can Clone it and use it themselves with a single click.
Great Reporting and Dashboards
We aggregate all the buys and sells from different bots, into an easy-to-understand cost basis, that you can then expand to view each individual trade.
Visual Bot Builder
The visual builder takes you through a step-by-step process, helping you easily build your own crypto trading bot from scratch. It allows you to set the logic and behavior of your trading bot from the amount you spend per trade, to your trailing stop loss and the signals to look for.
The visual builder allows you to choose between 3 main logic layers: Volscan, Computed Indicators, and Advanced.
Volscan is basically the volatility scanner of the BVTB that I mentioned earlier in the article. It analyses a % change over a window of time and buys any coin (or just the ones specified) that reaches that threshold.
Computed Indicators uses TradingView indicators in order to easily build and act on trading signals. Simply select the indicators you want to analyse, and the bot will place buy orders when some of them return a buy signal.
Trailing Stop Loss and Trailing Take Profit
A good exit strategy is instrumental for every good trading bot, and weve been building some unique exit strategy features to give users an edge.
The first feature weve added is simply called Stale Asset Selloff and it lets you select a time limit that when reached, the trading bot will automatically sell stale assets. This works in combination with Trailing Stop Loss and Trailing Take Profit.
Real Paper Trading
Most trading bot platforms weve seen offer a Live vs Demo environment that usually spans the entire application. You can flip this and be either in the live or demo account.
We think this makes it difficult to change a strategys state from paper to live, as youd have to re-create it in the other environment.
To address this, every strategy on Aesir can be either set to Live or Paper trading. If a viable strategy is found, you can simply promote your strategy to live trading or demote it to paper trading if it needs more tweaks.
On top of these, we have some big news lined up for later this year, so stay tuned! Sign up to Aesir | Join the Discord.
Aesir is free to get started with, but some of the more powerful features are only available on premium plans. Use code CRYPTOMATON20 at checkout for 20% off all subscription plans, and keep your discount for life.
Enjoyed this article?
Sign up to the newsletter
The post How I built a crypto trading bot platform over the last 3 years appeared first on cryptomaton.
Text source: Automated Cryptocurrency Trading