Telegram Notifications
Botmarley can send trade notifications to your Telegram account, keeping you informed of trading actions even when you're away from the dashboard.
Setup
1. Create a Telegram Bot
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Choose a name (e.g., "My Botmarley Alerts")
- Copy the bot token (looks like
123456789:ABCdefGHI...)
2. Get Your Username
Your Telegram username (the one starting with @) is used for access control. Only messages from this username will be accepted by the bot.
3. Configure in Botmarley
Navigate to Settings (/settings) and fill in:
| Field | Value |
|---|---|
| Enabled | Check the box |
| Bot Token | Paste the token from BotFather |
| Allowed Username | Your Telegram username (without @) |
Click Save.
4. Start the Bot
Open a chat with your new bot in Telegram and send /start. The bot needs this initial message to establish the chat.
What Gets Notified
The Telegram bot sends notifications for trade actions during live trading sessions:
| Event | Example Message |
|---|---|
| Buy | "BUY 0.001 BTC @ $67,500.00 (Session: BTC Scalper)" |
| Sell | "SELL 0.001 BTC @ $69,200.00 — PnL: +$1.70 (+2.5%)" |
| Session Started | "Trading session 'BTC Scalper' started on XBTUSDT" |
| Session Stopped | "Session 'BTC Scalper' stopped — Total PnL: +$45.20" |
Notifications are sent in real-time as actions execute. They use the same broadcast channel as the web interface's SSE updates.
Architecture
graph LR
E[Trading Engine] -->|ActionNotification| B[Broadcast Channel]
B --> T[Telegram Bot]
B --> S[SSE Stream]
T --> TG[Telegram API]
S --> W[Web Browser]
The Telegram bot subscribes to the same ActionNotification broadcast channel that powers the web interface's real-time updates.
Troubleshooting
Bot Not Sending Messages
- Check Settings — verify the bot token and username are correct
- Send /start — you must initiate the chat first
- Check Logs — look for Telegram errors in the Activity Logs or terminal output
- Restart Server — the Telegram bot spawns at startup; changes require a restart
Bot Token Invalid
If you see "Telegram bot failed to start" in the logs:
- Verify the token with BotFather
- Make sure you copied the full token including the colon