Arbitrage Sports Betting Script
In this part of the project, I am using the Live Sports Odds API (the-odds-api). This site provides statistical arbitrage opportunities on upcoming sporting events around the world. Using real-time odds data from various bookmakers, the program aims to identify the different odds offered by different books and exploit them for potential profit.
Arbitrage opportunities occur when a bettor strategically places specific bets with different bookmakers, allowing them to hedge their positions and guarantee a profit. To achieve this, the program focuses on eight upcoming sporting events and analyzes the odds provided by the Live Sports Odds API.
Once the program identifies these opportunities, it performs calculations to determine the expected return associated with each opportunity. The results are then compiled into a comprehensive Excel file that includes key information such as the ID and the sport key (the specific metrics provided by the Live Sports Odds API). Additionally, the file contains data such as expected return, bookmaker, name, odds and purchase amount for each relevant bet, giving users a clear overview of the arbitrage opportunities identified.
You can find the entire code for this program in the Scraper.ipynb file. Each piece of code is accompanied by comments to ensure a clear understanding of each step in the program’s execution. It is important to note that the API does not update instantly, and bookmakers often adjust their odds to minimize arbitrage opportunities for bettors. As a result, there may be instances where the program outputs slightly inaccurate odds due to odds that are already being updated on the bookmaker’s website.