Building a Trading Bot from Scratch - Part 4

1 yr
2 Min Read
356 words


Back over at the core functionality, the server side code that actually does the trading, here there have also been some "delays". Delays because, what seemed simple upon first thought, has turned out to be something very intricate with many moving parts that all need to mesh correctly for it to work.

I now understand why GitHub is littered with so many unfinished trading bots. It is complex and time consuming.

Even with using the CCXT Library as a unified API for multiple exchanges, there are many preparatory steps to execute before actually placing an order on the exchange. Hence I've taken to writing my own helper class for CCXT which will sit between CCXT and my own bot logic. This will deal such things as network errors and retries for calls to the exchange through CCXT.

I've seen multiple times in the CCXT Help/Bug Report forum, the developers telling people to carefully read the documentation from top to bottom, as all of the information they require is in there.

I understand why many people don't RTFM, because the documentation is long and thorough, as the developers indicated. So, I like many others, at first just jumped in and started using their small snippet examples, thinking I could just hack all of these together and find some magical short cut.


Once you get to the real trading functionality, that's when you realise how complex it is. Because I'm a person who once seized by an idea, a goal, will not let go of it, I then decided to get serious with this and RTFM, from top to bottom.

Now having done that, I can say that the documentation is well organized, leading you through each stage that builds upon the next which ultimately brings you to executing a trade.

This has led me to produce more organized code, which will now influence the whole project.

But when trade?

Where's the interesting stuff?

I know. I've had to slow down my own expectations so that I can build solid foundations to build on. Sounds boring, but success is built upon preparation.

Posted Using LeoFinance Beta