This directory contains example scripts demonstrating how to use the Odds-API.io Python SDK.
Before running the examples, make sure you have:
-
Installed the SDK:
pip install odds-api-io
-
Obtained an API key from odds-api.io
-
Set your API key as an environment variable:
export ODDS_API_KEY="your_api_key_here"
Or modify the examples to use your API key directly.
Learn the fundamentals of the SDK:
- Initializing the client
- Getting sports and leagues
- Fetching events
- Searching for games
- Working with bookmakers
python basic_usage.pyUse the async client for concurrent operations:
- Async/await syntax
- Concurrent requests with
asyncio.gather - Async context managers
python async_example.pyFind arbitrage betting opportunities:
- Discovering risk-free betting opportunities
- Comparing odds across bookmakers
- Calculating potential profits
python arbitrage_finder.pyIdentify value betting opportunities:
- Finding positive expected value bets
- Understanding implied vs true probability
- Analyzing betting edges
python value_bets.pyTrack odds movements over time:
- Monitoring odds changes
- Historical odds data
- Batch odds fetching
- Recent updates tracking
python odds_tracking.py- Rate Limits: Be mindful of the API rate limits (5,000 requests/hour)
- Error Handling: All examples use context managers for proper resource cleanup
- Free Tier: Some features may be limited on the free tier (e.g., 2 bookmakers max)
- Real Data: These examples use real API data, so results will vary