Hodloo, Telegram, and 3Commas
Published: 2021-10-28 09:09:52

> Using Telegram to trade Hodloo bases is outdated. Please read my [other article](https://dev.to/nobbi/connecting-hodloo-with-a-3commas-bot-api-version-4od0) instead.

This is a follow up to my [last article on Hodloo](https://dev.to/nobbi/filter-hodloo-alerts-59mb). While last time I explained how to receive Hodloo alerts for USDT pairs, this time I'm showing you how to send the signals to 3Commas and trade hands-free - so you can get rich relaxing on the beach (see the cover image). Just joking, we all know it doesn't work that way, but it is a step in the direction.

# Recap
Let's recap what we have when following the other article. We have a Python script running 24/7 that parses messages from the official Hodloo alerts Telegram channels and sends USDT pairs to a Discord channel.

Now, instead of sending the alerts to a Discord channel, we want to send them to a bot which does the buying/selling.

# FAQ
**Why combining Hodloo with a bot? Why not trade manually?**
I'm not doing this full-time. I have a day to day job. Also, the crypto market is running 24/7 and it happened too often in the past that a drop occured while I was asleep or not in front of my computer. By using a bot, I'm participating in the drop immidiatly.

In addition, I suck at trading. I'm FOMOing in all the time with too much size and then carry red bags for months. The bot keeps me away from the trading terminal.

**Why 3Commas?**
I find it intuitive and easy to work with. I'm using the bot mainly to get in a trade and then taking care of the rest manually. That means I often switch the bot's deal to a smart trade to get out when I want and not at a fixed percentage.

**Why do you not use the built-in QFL algos in 3Commas**
Because they suck - period. Hodloo bases are way better respected. And I need well-respected bases. I just can't take losses mentally and because of silly tax rules in my country.

**Can I run this on my Windows/macOS machine?**
Yes. Python is cross-platform. Remember that you need to let the machine running all the time. I don't want that hence I'm using a Linux VPS.

**Why is this so complex and why can't I use a public service for this?**
It's not available, unfortunately. The Hodloo API is private.

# Preparing The Bots
Head over to 3Commas and create two multi-pair bots. One for the 5% alerts and one for the 10% alerts. You choose the pairs you want to trade in the bot settings. While the script will send all Hodloo alerts to 3Commas, 3Commas will only create deals for the pairs you've selected in the bots.

![Pairs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nq4sd87gumrfps1ndc2x.png)

You can see that I've chosen six pairs for the bot but max deals is set to four. The bot will start a deal for the first Hodloo alert it receives to a maximum of four deals. Hence not all pairs you've configured will get a deal. First-come first-serve so to say.

Your safety order should be double the size of your base order.

![Deal start condition](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mylir1lbr03pkzznzbar.png)

Set the deal start condition to manually as the bot receives the signal through the Python script.

![Take profit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jm73c4ffqc73y4w1117.png)

I wrote above that I like to get out of a trade manually. But, you have to set the take profit value to something and if it bounces to a 30% profit while I'm asleep - I'm okay with that ;-)

![Layers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyqfxt9df60ud7gq70j9.png)

Now the juicy part - the buy layers. The above settings make sure that you get in with a small size and double-down when it goes south. 
* For the 5% bot the deepest layer is around 45% under the base.
* For the 10% bot the deepest layer is around 50% under the base.

Save and start the bot. On the following page scroll down to the bottom and write down the bot ID. You need that later.

![Bot ID](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ht3znewc0kyf1vxjx4r8.png)

# Script Requirements
The script has the same requirements as in the first article. So please check that. In addition, you need to install the Python module for 3Commas -> `pip install py3cw`.

# Configuring The Script
1. Go to [GitHub](https://github.com/NobbisCrypto/Crypto/tree/main/Hoodlo_telegram) and download `hodloo-to-3commas.py` and `config.py.example`
2. Rename `config.py.example` to `config.py`
3. Change the variables in `config.py` to your needs

# Running The Script
Please check the section *Running the Script in Background* in the first article and do the same for `hodloo-to-3commas.py`.

As soon as the script is running it parses the Telegram channels for any USDT pairs. It then sends the pair to your Discord channel and also trys to open a deal via your bots in 3Commas.

![Discord](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiwi7teir340b3aso294.png)

Happy Hodlooing!