Set up Telegram notifications for trading bot monitoring
Set up Telegram notifications to receive real-time updates about your trading bot’s activity. This is optional but highly recommended for monitoring.
Telegram notifications provide:
@BotFather/newbotYou need your Chat ID so the bot knows where to send messages.
Method 1 - Using @userinfobot:
@userinfobot in TelegramMethod 2 - Using @RawDataBot:
@RawDataBot in Telegram"chat":{"id":XXXXXXXXX} in the response"id": is your Chat IDMethod 3 - Manual extraction:
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdatesEdit your .env file:
# Telegram Configuration
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrSTUVwxyz
TELEGRAM_CHAT_ID=123456789
Your trading bot will automatically use these settings when configured in the strategy templates.
Send /start to your bot. You should see:
# Launch in dry-run mode
./docker-launch.sh
# Check logs for Telegram connection
docker logs freqtrade-ReinforcedAverageStrategy | grep -i telegram
You should receive a startup message in Telegram showing:
Send these commands to your bot:
/status - Current open trades/profit - Performance summary/help - Available commandsOnce your bot is running, you can control it via Telegram:
/status - Show open trades and bot status/profit - Display profit/loss summary/balance - Show account balance/daily - Daily profit statistics/weekly - Weekly performance/monthly - Monthly performance/start - Start receiving notifications/stop - Stop receiving notifications/help - Show available commands/trades - Show recent trade history/performance - Detailed performance metrics/reload_config - Reload bot configurationYou can adjust notification frequency and types by modifying the strategy configuration templates in the config/ directory. Look for the telegram section:
"telegram": {
"enabled": true,
"token": "${TELEGRAM_BOT_TOKEN}",
"chat_id": "${TELEGRAM_CHAT_ID}",
"notification_settings": {
"status": "on",
"warning": "on",
"startup": "on",
"buy": "on",
"sell": "on"
}
}
No response to /status command
Solutions:
.env filedocker psdocker logs freqtrade-ReinforcedAverageStrategyBot sends messages to wrong person/group
Solutions:
.env fileBot responds to commands but no trade alerts
Solutions:
ERROR - Telegram rate limit exceeded
Solutions:
With Telegram configured: