A Persian financial news bot that fetches RSS feeds and economic calendar events, summarizes them via AI (OpenRouter), and posts to a Telegram channel.
- RSS News Sources — CNBC, Yahoo Finance (extensible via
BaseRSSSource) - ForexFactory Calendar — Fetches economic events, sends pre-alerts
- Keyword Scoring — 130+ keywords with configurable impact weights
- AI Summarization — Translates & summarizes news to Persian via DeepSeek V4 Flash
- Persian Output — All posts are in Persian with market impact analysis
- Admin Control Panel — Optional Telegram bot to edit sources, model, keywords, and scores live
Pre-alerts are sent based on event impact level:
| Impact | Icon | Alert Before Release |
|---|---|---|
| High | 🔴 | 15 minutes |
| Medium | 🟡 | 10 minutes |
| Low | 🟢 | 5 minutes |
Each alert includes:
- Event title (Persian translation via AI, falls back to English on error)
- Country and impact level
- Forecast vs previous value
- Countdown minutes
-
Copy
main.envand fill in your tokens:TELEGRAM_BOT_TOKEN+TELEGRAM_CHANNEL_IDOPENROUTER_API_KEY+OPENROUTER_MODELFOREXFACTORY_CALENDAR_URL
-
Install dependencies:
pip install -r requirements.txt
-
Run:
python main.py
The bot creates bot.lock on startup to prevent multiple instances. The lock file is auto-removed on exit.