This project is an advanced arbitrage finder for sports betting. It identifies arbitrage opportunities across multiple bookmakers and calculates optimal bet amounts for each outcome to guarantee a profit.
Uses The Odds API.
- Supports multiple regions (EU, US, UK, AU)
- Customizable profit margin cutoff
- Formatted and unformatted output options
- Utilizes The Odds API for real-time betting data
- Interactive betting calculator
- Offline mode for testing and development
- Ability to save API responses for later analysis
- Easy run script for quick setup and execution
-
Clone this repository:
git clone https://github.com/carterlasalle/SportsArbFinder cd SportsArbFinder
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the project root and add your API key (get one here):ODDS_API_KEY=your_api_key_here
-
Run the easy run script:
python easy_run.py
-
Follow the prompts to configure your run:
- Choose a region (eu/us/uk/au)
- Set the minimum profit margin percentage
- Enable or disable the interactive betting calculator
- Choose to use offline data or fetch new data
-
The script will automatically run the arbitrage finder and launch the viewer in your default web browser.
For more control over the execution, you can use the main script directly:
python main.py [options]
-r
,--region
: Specify the region for bookmakers (eu, us, uk, au). Default is "us".-u
,--unformatted
: Skip interactive UI and only output JSON data.-c
,--cutoff
: Set the minimum profit margin percentage. Default is 0.--api-key
: Provide the API key for The Odds API (overrides the .env file).-i
,--interactive
: Enable the interactive betting calculator.-s
,--save
: Save the API response to a specified file.-o
,--offline
: Use offline data from a specified file instead of making API calls.
-
Basic usage (US region):
python main.py
-
Set region to UK and minimum profit margin to 2%:
python main.py -r uk -c 2
-
Enable interactive betting calculator:
python main.py -i
-
Save API response to a file:
python main.py -s response_data.json
-
Use offline data:
python main.py -o response_data.json
- The script fetches data for all in-season sports from The Odds API.
- For each sport, it retrieves the latest odds from various bookmakers.
- It calculates the best available odds for each outcome across all bookmakers.
- If the combined implied probability is less than 100%, an arbitrage opportunity exists.
- The script calculates the profit margin and, if it meets the cutoff, displays the opportunity.
- In interactive mode, users can input a stake amount and see the optimal bet distribution.
- Results are saved to
arbitrage_results.json
. - The viewer script generates an HTML page to display the results and launches it in the default web browser.
main.py
: Entry point of the application, handles command-line arguments.arbitrage_finder.py
: Contains the core logic for finding arbitrage opportunities.odds_api.py
: Handles API requests to The Odds API.config.py
: Stores configuration settings.easy_run.py
: Provides a user-friendly interface for running the arbitrage finder.viewer.py
: Generates an HTML viewer for the arbitrage results.
- The free tier of The Odds API has usage limits. Monitor your usage to avoid exceeding these limits.
- Arbitrage opportunities can disappear quickly. Always verify the odds before placing actual bets.
- This tool is for educational purposes only. Be aware of the legal status of sports betting in your jurisdiction.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
This tool is for educational purposes only. The authors are not responsible for any financial losses incurred from using this software. Always gamble responsibly and be aware of the risks involved in sports betting.