Integrating Hummingbot with Telegram Messenger allows you to get real-time updates and issue commands to your trading bot from any device where you have Telegram installed.
Whether you are running Hummingbot in the cloud or on your local machine, you can use Telegram to monitor and control bots from wherever you are!
Make sure to install Telegram on your system before setting up your Telegram Bot. If not, you can download Telegram for Windows/MAC/Linux and install.
Set up your Telegram Bot¶
Below, we show how to create a Telegram bot that integrates with your Hummingbot deployment.
1. Create the Bot¶
Click this link to launch the official BotFather bot, a Telegram bot that helps you create and manage Telegram bots: https://telegram.me/BotFather.
In Telegram, go to the newly-created BotFather chat pane, and click
/newbotto create a bot.
- Enter a name for your bot, the title of the bot in Telegram (e.g.
- Enter a unique ID that ends with the word
Take note of the Telegram token in the response above. You'll need it for Step 3 below.
Click the link to your new bot in the message above launch it:
t.me/<YOUR BOT NAME>. Click
/startto start the bot.
2. Get your Telegram ID¶
Click this following to launch userinfobot, a Telegram bot that helps you retrieve your Telegram ID: https://telegram.me/userinfobot.
In Telegram, go to the newly-created userinfobot chat pane, and click
Take note of the
Idparameter provided. You'll need it in a minute for the configuration step.
3. Configure the Telegram Settings in Hummingbot¶
In the directory where you have installed Hummingbot, go to your global configuration file:
Enter the following parameters at the end of the file:
1 2 3
telegram_enabled: true telegram_token: <TELEGRAM TOKEN FROM STEP 1> telegram_chat_id: <TELEGRAM ID FROM STEP 2>
4. Startup Hummingbot¶
You can now startup Hummingbot and confirm that the integration is properly configured.
If Hummingbot was running when you configured telegram, make sure to
exit and restart Hummingbot to reload the telegram configurations.
Use your Telegram Bot¶
Before you start Hummingbot, make sure that the Telegram bot is live. If so, you should see a chat pane with your bot's name in Telegram.
Now you can start hummingbot as you would normally. Telegram will be connected as soon as you enter
startin your hummingbot CLI window.
Messages are synchronized in real-time between the Telegram bot and the actual Hummingbot instance running. For example, you can use commands such as
historyto monitor the bot's performance,
configshows bot current configurations and you can use
stopto control the bot.