AUTHOR: Tony Mudau
Telegram Bot Setup (Phone + Admin Panel)
This guide sets up one Telegram bot for:
- agent status updates (orchestration + technical/execution summaries)
- read-only Q&A with the agent assistant
- manual market-news injection only when you intentionally prefix:
market_agent:
1) Create your bot in Telegram (phone)
- Open Telegram on your phone.
- Search for @BotFather.
- Send
/newbot. - Follow prompts for bot name and bot username.
- Copy the bot token BotFather returns.
2) Start chat with your bot
- Search your new bot username.
- Open chat and send
/start. - Send any test message.
3) Get your Telegram chat ID
Use one of these:
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find your message payload and copy
message.chat.id
If multiple admins should receive messages, collect each chat id.
4) Configure in Admin panel
Open the hidden admin page and go to:
- Settings tab
- Telegram integration section
Set:
- Enable Telegram bot = ON
- Bot token = token from BotFather
- Allowed admin chat IDs = comma-separated chat IDs
- Optional toggles:
- cycle notifications
- execution notifications
- allow
market_agent:ingest - allow assistant chat
Save settings.
5) Set Telegram webhook (required for inbound chat)
Use your backend public URL (must be reachable from Telegram, HTTPS):
https://<YOUR_BACKEND_HOST>/api/agent-force-1/telegram/webhook
Call Telegram API:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=https://<YOUR_BACKEND_HOST>/api/agent-force-1/telegram/webhook
Verify:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getWebhookInfo
6) Message formats from Telegram
Read-only assistant Q&A (does NOT influence trading)
Send normal text, for example:
Why was EURUSD skipped today?What is the latest execution result?
This uses the separate assistant endpoint and does not alter strategy/execution state.
Inject market news (allowed path to influence market analysis)
Use strict prefix:
market_agent: EURUSD CPI came in higher than expected and USD strengthened
Rules:
- Must start with
market_agent: - Include symbol + note
- Only this path is ingested into market agent memory
7) Safety behavior implemented
- Only chat IDs listed in admin settings are accepted.
- Non-
market_agent:messages are treated as Q&A only. - Q&A is read-only and cannot place/modify trades.
- Market ingestion requires explicit
market_agent:prefix.
8) Troubleshooting
- No bot replies:
- verify webhook is set and HTTPS is valid
- ensure backend URL is reachable publicly
- check allowed chat IDs in admin settings
- No notifications:
- ensure Telegram enabled and bot token is correct
- ensure at least one allowed chat id is saved
- run a cycle and confirm toggle settings
market_agent:ignored:- check exact prefix and symbol format (e.g.,
EURUSD) - ensure ingest toggle is enabled in admin settings
- check exact prefix and symbol format (e.g.,