Alerts
ClearEdge can push Telegram alerts for trading sessions — so you don’t have to watch a screen. Alerts are entirely optional: if unconfigured, the alert relay simply idles and nothing breaks.
Add two settings (in backend/.env or the Settings page — see
configuration):
ATS_TELEGRAM_BOT_TOKEN— a Telegram bot token (from BotFather).ATS_TELEGRAM_CHAT_ID— the chat id to send to.
What it alerts on
Section titled “What it alerts on”The alert relay (ats/alerts/relay.py) watches a running session’s telemetry and sends a message on
meaningful events, including:
- Drawdown — when a session’s balance falls
ATS_ALERT_DRAWDOWN_PCT(default 5%) below its peak. - Session lifecycle / gateway — significant state changes (e.g. a gateway going from healthy to broken is surfaced by the gateway monitor).
How it works
Section titled “How it works”The relay is driven by the same Redis telemetry stream the UI reads, so alerts reflect exactly what the session reports. It runs alongside the paper/live runner; no extra process to manage.
Related
Section titled “Related”- Paper trading · Live trading — what the alerts watch.
- Configuration — the
ATS_TELEGRAM_*andATS_ALERT_*settings.