Creating a Telegram bot is straightforward and allows MagicTradeBot to send real-time notifications for trades, risk events, and system alerts. Below is a step-by-step guide.
🔹 1️⃣ Create a Bot via @BotFather
- Open Telegram and search for @BotFather.
Start a chat with BotFather and send the command:
/newbotFollow the prompts:
- Choose a name for your bot (visible to users).
- Choose a username (must end with
bot, e.g.,MagicTradeAlertBot).
Once created, BotFather provides a Bot Token.
- Example:
123456789:ABCDefGhIJKlmNoPQRsTUVwxyz1234567890 - Save this token securely, as it is used by MagicTradeBot to send messages.
- Example:
🔹 2️⃣ Obtain Your Chat ID
The chat ID tells MagicTradeBot where to send messages. You can send messages to:
- Your personal Telegram account
- A group chat
- A channel
Method A: Personal Chat ID
- Start a chat with your bot.
- Send a message like
Helloto the bot. Open your web browser and go to:
https://api.telegram.org/bot<YourBotToken>/getUpdatesReplace
<YourBotToken>with the token from BotFather.- Look for the
"chat":{"id":...}field in the JSON response — this is your chat ID.
Method B: Group or Channel ID
- Add your bot to the group or channel.
- Send a test message in that group/channel.
- Repeat the
getUpdatesmethod above to retrieve the chat ID.
Note: For channels, make sure your bot is an admin to send messages.
🔹 3️⃣ Configure MagicTradeBot
Open your settings/market_watch.yaml or relevant notification config file and add:
telegram_bot_token: "123456789:ABCDefGhIJKlmNoPQRsTUVwxyz1234567890"
telegram_chat_id: "987654321" # Replace with your actual chat ID
- telegram_bot_token → The token you received from BotFather
- telegram_chat_id → Your personal, group, or channel chat ID
Save the file and restart the bot (recommended) to activate Telegram notifications.
🔹 4️⃣ Test Your Bot
- Send a test alert from MagicTradeBot or manually trigger a message.
- Ensure the bot delivers messages to your chat or group.
- Check that stop-loss, take-profit, DCA, and trade execution alerts are working correctly.
🔹 5️⃣ Best Practices
- Keep your Bot Token private.
- Use separate bots for personal vs. team notifications.
- Only configure active channels to avoid unnecessary errors.
- Test notifications in demo mode before enabling live trading.
🔹 Key Takeaway
Creating a Telegram bot allows MagicTradeBot to send fast, reliable, and mobile-friendly trade alerts.
- Step 1: Use @BotFather to create a bot and get the token
- Step 2: Find your chat ID (personal, group, or channel)
- Step 3: Configure
telegram_bot_tokenandtelegram_chat_idin MagicTradeBot - Step 4: Test notifications to confirm delivery
Telegram notifications are recommended for beginners and personal monitoring due to their speed, simplicity, and real-time mobile accessibility.