Case 04 — B2B odds compilation & risk platform
Enterprise risk management for online bookmakers: ML-driven odds compilation, sharp-bettor detection, arbitrage prevention and dynamic book balancing in real time.
The challenge
A B2B provider for online bookmakers needed a platform that scores risk in milliseconds: multi-source odds aggregation, sharp-bettor pattern detection, internal and cross-bookmaker arbitrage, dynamic margin adjustment. Scalable to thousands of events and millions of bets.
Architecture
A FastAPI core with a WebSocket layer for live push, OAuth2 + JWT auth. XGBoost models derive fair odds from historical data and market consensus. A sharp-detection engine profiles bettors. PostgreSQL primary with read replicas, Redis as hot cache, Prometheus + Grafana for monitoring.
Pipeline
Odds-compilation flow (sub-second)
- 01Multi-source odds aggregated with confidence weights
- 02XGBoost model yields fair odds conditioned on historical events
- 03Margin engine sets a dynamic margin based on the risk profile
- 04Sharp detector flags suspicious bettors in real time
- 05Book balancer spreads liability, WebSocket layer pushes to all clients
Technology stack
Outcome
ML fair odds replace manual odds compilation. Sharp-bettor detection significantly reduces exposed liability. WebSocket push delivers price changes sub-second to the frontend and partner APIs. CI pipeline with coverage gate — every new odds strategy is tested before go-live.