How rynn-arriola/polymarket-bot works
This repository implements a sports-and-esports prediction and Polymarket trading bot. Its main workflow builds cached Elo ratings, evaluates market opportunities against model probabilities, applies risk and roster safeguards, and tracks positions for reporting and manual-trade reconciliation. Supporting branches provide historical backtesting/tuning and optional XGBoost predictions. The README is empty; relationships below rely on the source index and sampled source, so unsampled integrations and call paths are not inferred.
Main entry points: divergence_bot.py Market bot · build_ratings.py Rating builder · manual_sync.py Manual trade sync · params.py Model parameters
Components 30
Ratings and models
- Rating builder
build_ratings.py - Elo engine
elo/engine.py - History cache
elo/history.py - Model parameters
elo/params.py - Basketball Elo
elo/basketball.py - Esports Elo
elo/esports.py - Esports player Elo
elo/esports_players.py - LoL player Elo
elo/lol_players.py - MLB Elo
elo/mlb.py - Soccer Elo
elo/soccer.py - Tennis Elo
elo/tennis.py - Injury adjustments
elo/injuries.py - Roster tracking
elo/rosters.py - Live XGBoost
xgb_live.py - Data refresh
refresh_data.py - Player data fetch
fetch_esports_players.py
Trading and safeguards
- Market bot
divergence_bot.py - Strategy config
config.py - API guard
api_guard.py - Risk checks
risk.py - Name matching
name_match.py
Position operations
- Position database
db.py - Manual trade sync
manual_sync.py - Reports
reporting.py - Audit reporting
audit_reporting.py
Model research
- Parameter tuning
tune.py - Backtesting
backtest.py - XGBoost training
train_xgb.py - XGBoost features
xgb_features.py
Other components
- Operator
Connections 48
- Operator → Market bot: runs
- Market bot → Strategy config: reads settings
divergence_bot.py - Market bot → API guard: checks API cooldown
divergence_bot.py - Market bot → Risk checks: checks exposure
divergence_bot.py - Market bot → Name matching: matches names
divergence_bot.py - Market bot → Position database: reads and writes
divergence_bot.py - Market bot → Manual trade sync: reconciles trades
divergence_bot.py - Market bot → Basketball Elo: gets probabilities
divergence_bot.py - Market bot → Esports Elo: gets probabilities
divergence_bot.py - Market bot → MLB Elo: gets probabilities
divergence_bot.py - Market bot → Soccer Elo: gets probabilities
divergence_bot.py - Market bot → Tennis Elo: gets probabilities
divergence_bot.py - Market bot → Injury adjustments: applies adjustments
divergence_bot.py - Market bot → Roster tracking: checks roster changes
divergence_bot.py - Market bot → Live XGBoost: gets predictions
divergence_bot.py - Rating builder → Basketball Elo: builds ratings
build_ratings.py - Rating builder → Esports Elo: builds ratings
build_ratings.py - Rating builder → Esports player Elo: builds ratings
build_ratings.py - Rating builder → LoL player Elo: builds ratings
build_ratings.py - Rating builder → MLB Elo: builds ratings
build_ratings.py - Rating builder → Soccer Elo: builds ratings
build_ratings.py - Rating builder → Tennis Elo: builds ratings
build_ratings.py - Rating builder → Model parameters: reads parameters
build_ratings.py - Basketball Elo → History cache: fetches history
elo/basketball.py - Basketball Elo → Elo engine: uses engine
elo/basketball.py - Basketball Elo → Model parameters: reads parameters
elo/basketball.py - Esports Elo → History cache: fetches history
elo/esports.py - Esports Elo → Elo engine: uses engine
elo/esports.py - Esports Elo → Model parameters: reads parameters
elo/esports.py - MLB Elo → History cache: fetches history
elo/mlb.py - MLB Elo → Elo engine: uses engine
elo/mlb.py - MLB Elo → Model parameters: reads parameters
elo/mlb.py - Soccer Elo → History cache: fetches history
elo/soccer.py - Soccer Elo → Elo engine: uses engine
elo/soccer.py - Soccer Elo → Model parameters: reads parameters
elo/soccer.py - Tennis Elo → History cache: fetches history
elo/tennis.py - Tennis Elo → Elo engine: uses engine
elo/tennis.py - Tennis Elo → Model parameters: reads parameters
elo/tennis.py - Manual trade sync → Position database: stores trades
manual_sync.py - Manual trade sync → API guard: governs API calls
manual_sync.py - Manual trade sync → Strategy config: reads settings
manual_sync.py - Manual trade sync → Reports: uses reports
manual_sync.py - Reports → Position database: queries positions
reporting.py - Reports → Strategy config: reads settings
reporting.py - Audit reporting → Manual trade sync: audits reconciliation
audit_reporting.py - Audit reporting → Strategy config: reads settings
audit_reporting.py - Audit reporting → API guard: uses API guard
audit_reporting.py - Data refresh → Player data fetch: fetches player data
refresh_data.py