Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolySonar

Telegram signal bot for Polymarket sports/trend contracts.

What it does

  • Pulls active Polymarket contracts.
  • Filters sports and trend markets.
  • Collects sentiment from RSS + Reddit.
  • Generates trade ideas only (no auto execution):
    • OPEN_LONG_YES
    • OPEN_LONG_NO
    • CLOSE_POSITION
    • NO_ACTION
  • Exposes Telegram commands: /start, /scan, /top, /watch, /explain <market_id>.

Setup

  1. Install deps:
uv sync
  1. 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'
  1. Run bot:
uv run python main.py

Notes

  • 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
  • Quiet hours:
    • no regular push between QUIET_HOURS_START and QUIET_HOURS_END in QUIET_HOURS_TIMEZONE
  • 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages