feat: Telegram notifications for all 6 SSE events + hourly PnL summary

- Handle position_opened/closed/modified and order_placed/cancelled/modified
- Unified SsePayload struct (Option fields) for both position and order events
- Hourly PnL summary task (send_pnl_summary every 3600s, skip first tick)
- Add sim binary for testing TG notification flow without MT5
- Export telegram + helpers via lib.rs for bin access
- Update README with Telegram setup and event table
- Update .env.example with Telegram comment block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
romysaputrasihananda
2026-06-11 01:52:53 +07:00
parent a49aee6ae0
commit e285ab3ee0
5 changed files with 230 additions and 54 deletions
+3 -1
View File
@@ -42,6 +42,8 @@ BACKTEST_CANDLES=50000
# LIVE_POLL_SECS=30
# ── Telegram Notifications ───────────────────────────────────────────────────
# Get token from @BotFather, chat_id from @userinfobot or Telegram API.
# All three are optional — omit to disable notifications.
# TELEGRAM_BOT_TOKEN=123456:ABC-xxxx
# TELEGRAM_CHAT_ID=-100xxxxxxxxxx
# TELEGRAM_THREAD_ID=123 # optional, for forum topics/threads
# TELEGRAM_THREAD_ID=123 # forum topic/thread ID (optional)