The open framework
for sports agents
Query events, read odds from any bookmaker, and place positions, all through a single provider-agnostic API. Built for autonomous agents, data scientists, and developers who move fast.
from opensport.providers.mock import MockProvider from opensport.execution.simulator import Simulator from opensport.agents.example import ValueAgent # Wire up components: swap any layer for a real one provider = MockProvider() sim = Simulator(bankroll=1_000) agent = ValueAgent(provider=provider, execution=sim) # Fetch, evaluate, and place: all in one call positions = agent.run(sport="soccer") sim.print_summary() # ══════════════════════════════════════════════════ # Balance: £1,062.40 (started £1,000.00) # Total P&L: +£62.40 (+6.2% ROI) # W / L: 4 / 2 (66.7% win rate) # ══════════════════════════════════════════════════
Everything an agent needs
A complete, layered toolkit: from raw data to executed positions.
Query any sport, any event
A unified Event model normalises data from any source: soccer, NFL, NBA, tennis, horse racing. One interface, every sport.
Read odds from any bookmaker
Pluggable provider adapters for bookmakers, prediction markets, and sports data APIs. Connect any data source by subclassing a single abstract class.
Simulate before you go live
A built-in paper trading engine tracks P&L, win rates, and ROI with full commission support. No real money, no risk.
Built for agents
BaseAgent gives LLM-driven or rule-based agents a clean evaluate-place loop with stake clamping and risk guards baked in.
Swap every layer
Provider, executor, and agent are all abstract base classes. Swap any component (mock to live, sim to exchange) without touching your strategy.
Python + TypeScript
A Python SDK for modelling and agents. A TypeScript SDK for API layers and real-time feeds. Same concepts, same structure, both open source.
Layered by design
Every layer is an abstract base class. Swap mock for real, simulator for exchange, without touching your strategy code.
Your strategy: evaluate events, return BetIntents
Simulator (paper) or Exchange (live). Accepts BetIntents, returns Positions
Fetches Events and OddsSnapshots from any data source
Event · Market · OddsSnapshot · BetIntent · Position
Ready to build?
Start with the MockProvider and Simulator. No API keys, no account setup, no real money.
Get started in 5 minutes →