A real-time League of Legends account monitoring tool that automatically generates OBS overlays for streamers. Detects account switches, tracks ranked data, and provides live-updating overlays perfect for streaming.
- 🎮 Real-Time Monitoring: Automatically detects your current League account during games
- 🎥 Live OBS Overlays: Auto-updating overlays with rank, stats, and match history
- 🔄 Account Switching: Seamlessly handles multiple accounts during streaming
- 📊 Live Stats: Rank, daily performance, recent matches, and session tracking
- ⚡ Instant Updates: Overlays refresh every 5 seconds with aggressive auto-refresh
- 🛡️ Robust & Secure: Rate limiting, error handling, and secure API management
league_of_legends_api/
├── main.py # Main CLI entry point
├── src/ # Source code package
│ ├── api/ # Riot Games API integration
│ │ ├── config.py # Configuration and constants
│ │ └── riot_api.py # API client with error handling
│ ├── data/ # Data processing and retrieval
│ │ ├── lookup_account.py # Account lookup service
│ │ ├── match_history.py # Match history processing
│ │ └── ranked_info.py # Ranked information retrieval
│ ├── detection/ # Live client integration
│ │ ├── client_detector.py # League client detection
│ │ └── streaming_session_manager.py # Session management
│ ├── overlay/ # OBS Studio integration
│ │ ├── obs_overlay.py # Overlay generation
│ │ └── generate_overlay.py # Overlay CLI tool
│ └── utils/ # Utility functions
│ └── formatters.py # Output formatting
├── obs_data/ # Generated overlay files (auto-created)
├── requirements.txt # Python dependencies
├── .env # Environment variables (create this)
└── README.md # This file
pip install -r requirements.txt- Visit Riot Developer Portal
- Create account and generate API key
- Copy
.env.exampleto.envand add your key:
cp .env.example .env
# Edit .env: RIOT_API_KEY=your_actual_api_key_herepython main.py monitorThat's it! Start a League game and the tool will automatically:
- ✅ Detect your account
- ✅ Generate OBS overlays
- ✅ Update every 5 seconds
- ✅ Handle account switches
- Start monitoring:
python main.py monitor - Add Browser Source in OBS
- Set URL:
file:///YOUR_PATH/obs_data/04_combined_overlay.html - Dimensions: Width 800, Height 200
- Enable: "Refresh browser when scene becomes active"
You can customize monitoring behavior by editing your .env file:
# Monitoring Intervals
GAME_CHECK_INTERVAL=1 # How often to check for active games (seconds)
ACCOUNT_REFRESH_INTERVAL=60 # How often to refresh data when idle (seconds)
OVERLAY_UPDATE_INTERVAL=5 # How often to update overlays during games (seconds)
# API Settings
RIOT_API_KEY=your_key_here
RATE_LIMIT_DELAY=0.1 # Delay between API requests
# Other Settings
SESSION_TIMEOUT=30 # HTTP request timeout
CURRENT_SEASON=2025 # Display season year- NA1: North America
- EUW1: Europe West
- EUN1: Europe Nordic & East
- KR: Korea
- JP1: Japan
- BR1: Brazil
- LAN/LAS: Latin America
- OC1: Oceania
- RU: Russia
- TR1: Turkey
- Start monitoring:
python main.py monitor - Launch League: The tool detects when you start a game
- Auto-detection: Identifies your current account from the live client
- Overlay generation: Creates/updates HTML overlays with your stats
- Live updates: Refreshes data every 5 seconds during games
- Account switching: Seamlessly handles multiple accounts
The generated overlays include:
- 🏆 Current rank and LP
- 📊 Today's game statistics
- 🎯 Recent match history
- 👥 Session account tracking
- ⚡ Live updates every 5 seconds
- 🎨 Professional League-themed design
This project is for educational and personal use. Please respect Riot Games' API Terms of Service and rate limits.