Made a multi-threaded robot for trading on the Bitmex exchange. One stream received historical data from the exchange api, another stream made a decision (the decision was made by the neural network and gradient boosting along the time series), the third stream launched the bot via the bot's telegram (also wrote, everything hung on the hero), it was possible to pause, resume and start process.