Telegram signal bot for Polymarket sports/trend contracts.
- Pulls active Polymarket contracts.
- Filters sports and trend markets.
- Collects sentiment from RSS + Reddit.
- Generates trade ideas only (no auto execution):
OPEN_LONG_YESOPEN_LONG_NOCLOSE_POSITIONNO_ACTION
- Exposes Telegram commands:
/start,/scan,/top,/watch,/explain <market_id>.
- Install deps:
uv sync- Configure environment variables:
export TELEGRAM_BOT_TOKEN="<your_bot_token>"
export TELEGRAM_CHAT_IDS="123456789"
export SCAN_INTERVAL_MINUTES="30"
export PUSH_ON_STARTUP="true"
export PUSH_ONLY_ACTIONABLE="true"
export PUSH_MIN_CONFIDENCE="0.75"
export PUSH_SEND_EMPTY_REPORT="false"
export QUIET_HOURS_ENABLED="true"
export QUIET_HOURS_START="0"
export QUIET_HOURS_END="8"
export QUIET_HOURS_TIMEZONE="Asia/Shanghai"
export HIGH_PRIORITY_ENABLED="true"
export HIGH_PRIORITY_CHECK_INTERVAL_MINUTES="5"
export HIGH_PRIORITY_CONFIDENCE="0.85"
export HIGH_PRIORITY_COOLDOWN_MINUTES="60"
export HIGH_PRIORITY_BYPASS_QUIET_HOURS="false"
export LOOKBACK_HOURS="24"
export MIN_CONFIDENCE_OPEN="0.75"
export MIN_SAMPLE_SIZE="8"
export SENTIMENT_ANALYSIS_ENABLED="true"
export SENTIMENT_BACKEND="lexicon" # lexicon | hf_multilingual
export SENTIMENT_MODEL_NAME="tabularisai/multilingual-sentiment-analysis"
export SENTIMENT_MIN_CONFIDENCE="0.5"
# Optional custom sources
# export RSS_FEEDS='["https://www.espn.com/espn/rss/news"]'
# export REDDIT_SUBREDDITS='sports,nba,nfl'- Run bot:
uv run python main.py- This project does not place real trades.
- Output is strategy suggestion and risk flags only.
- Sentiment backend supports BettaFish-style fallback:
- model backend unavailable -> auto fallback to lexicon backend.
- Proactive push mode:
- bot starts and auto pushes without manual
/scan - pushes every
SCAN_INTERVAL_MINUTES - by default only actionable signals are pushed
- bot starts and auto pushes without manual
- Quiet hours:
- no regular push between
QUIET_HOURS_STARTandQUIET_HOURS_ENDinQUIET_HOURS_TIMEZONE
- no regular push between
- High-priority immediate push:
- checks every
HIGH_PRIORITY_CHECK_INTERVAL_MINUTES - sends only high-confidence reversal close signals
- dedupe by market/action with cooldown
HIGH_PRIORITY_COOLDOWN_MINUTES
- checks every