Giter VIP home page Giter VIP logo

live-sports-arbitrage-bet-finder's Introduction

Live Sports Arbitrage Bet Finder - FanDuel, DraftKings, William Hill

Summary

Live sports arbitrage bet finder in action

I've provided this code for informational purposes, and do not take responsibility for potential losses or gains. Bet at your own risk.

This program will find arbitrage betting opportunities during live sports events. The program will scrape live data off betting websites every 10 milliseconds, find if an arbitrage exists, calculate the exact wagering amounts needed, and place bets.

There are three Python programs in this repository.

  • The program names start with F & D or F & W. F stands for FanDuel, D stands for DraftKings, and W stands for William Hill.
  • Programs that end with "Two Person" are for two person or two team events that include only moneyline bets (such as tennis).
  • Programs that do not end with this phrase are for sports that include over / under bets, moneyline and spread bets (such as baseball).
  • The automated bot only looks for standard bet types.

The program will first scrape all live event names and odds based on the sport selected in the program. The live event names are matched against each sportsbook in order to compare live odds. Using a Nash equilibrium, the program will find if there are arbitrage betting opportunities. If an arbitrage is found, then the program will select that wager, enter the calculated wager amounts and place the bet.

The programs use multithreading to make them as fast as possible to find arbitrage opportunities. Also, the programs use the undetected-chromedriver package to help avoid bot detection.

Please note that most sportsbooks include a bet delay. After a bet is placed, the sportsbook will take several seconds to validate the bet. During this time, one sportsbook may accept your bet, while the other sportsbook may update its odds.

Troubleshooting Error

If you run into an error that states AttributeError: 'ArbFinder' object has no attribute 'driver' go to chrome://settings/help in your URL bar. There may be a relaunch option where your Chrome version is. Otherwise, try to upgrade your Chrome version. Your Chrome version may be different from the ChromeDriver version downloaded by the program.

Personalizing the programs

Update this section of the code if you want to bet on a different sport:

self.sport = 'Baseball'

Update these sections of the code if you want to change your bet amount, lower & upper arbitrage return limit and max odd limit:

self.main_bet_amount = 100  # Total amount to wager. The program will split the two bets, so that the total wager is this amount
self.lower_limit = 0.000  # Lower arbritage limit to bet on, as a percentage
self.upper_limit = 0.070  # Upper arbritage limit to bet on, as a percentage (0.070 = 7%)
self.bet_limit = 0.10  # Most websites require a minimum of $0.10 a wager on each bet
self.odds_limit = 750  # The program will not wager above these odds (i.e. +750)

Most references state that wagers should be rounded to the dollar to help avoid arbitrage detection. Update the round function below to zero decimal places if you need:

self.result = [round(x, 2) for x in self.result]

Submitting a wager has been commented out in the programs. You can submit a wager by uncommenting this section of code:

self.pool.apply_async(self.process, args=(9, 0, 0, 0,))
self.pool.apply_async(self.process, args=(10, 0, 0, 0,))
# Join the pools so they run in parallel
self.pool.join()

Additional information about the programs

The programs use the naming convention "bid" and "ask." I built the programs from a framework that traded binary options and did not update the naming convention. "Bid" means DraftKings or William Hill, while "ask" means FanDuel.

live-sports-arbitrage-bet-finder's People

Contributors

personal-coding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

live-sports-arbitrage-bet-finder's Issues

No module named gevent

Traceback (most recent call last):
File "C:\Users\porte\Downloads\Live-Sports-Arbitrage-Bet-Finder-main\Live-Sports-Arbitrage-Bet-Finder-main\F & W - Arb_Website - Two Person.py", line 1, in
from gevent.pool import Pool
ModuleNotFoundError: No module named 'gevent'

Anyway to get around this thanks in advance

Bot won't input bets

This is probably user error. But after uncommenting the code from the readme, the bot still doesn't actually input anything. Just puts them into my slip and then removes them after about 5-10 seconds.

Import Error

Hello,

I have installed all the specified libraries and when I run the code, I get this error
image
As you can see, since I am using the library : undetected-chromedriver-modified, I have modified the code to: import undetected_chromedriver.v2 as uc

image

Any ideas how to solve that?

Thanks in advance.

SyntaxError: invalid syntax

F & D - Arb_Website - Two Person.py", line 98
match number:
^
SyntaxError: invalid syntax

This is what I get when I run the program.. I have all the requirements.

image

Any help you could provide to troubleshoot would be appreciated.

anyway to get around this warning? "... page has been denied because we believe you are using automation tools..."

anyway to get around this warning? "... page has been denied because we believe you are using automation tools..."

below is the message:

Access to this page has been denied because we believe you are using automation tools to browse the website.

This may happen as a result of the following:

Javascript is disabled or blocked by an extension (ad blockers for example)
Your browser does not support cookies

Please make sure that Javascript and cookies are enabled on your browser and that you are not blocking them from loading.

Using ad blocker (e.g. uBlock Origin, AdBlock, Adblock Plus, etc.)?

Please disable your ad blocker temporarily

Driver Error

I've installed all the necessary libraries and have been getting this error about the driver. Any idea how to resolve this?

Screen Shot 2022-12-20 at 12 38 55 AM

X Path Selector unable to find element

Some of the xpath selectors appear to be in need of update. Specifically the bet slip selector or case 3 and 4 of the processing function in FD 2 Player appears to be referencing stale element. any insight is greatly appreciated.

LINE 173 ""//div[contains(@Class,'betslip-odds__display-standard')]/span").text.strip()"): Message: stale element reference: stale element not found

issues with installing

python test1.py
Traceback (most recent call last):
File "/home/james/Downloads/Live-Sports-Arbitrage-Bet-Finder-main/test1.py", line 535, in
app = App()
File "/home/james/Downloads/Live-Sports-Arbitrage-Bet-Finder-main/test1.py", line 64, in init
self.ask.driver.implicitly_wait(5)
AttributeError: 'ArbFinder' object has no attribute 'driver'

Install

Hey man. I am trying to get it to run on my machine. I was wondering if you have used it recently and have the libraries downloaded because I am having trouble getting them installed.

Installation/Usage instructions?

Would it be possible to add installation and usage instructions?

I understand one needs to install the Chromedriver and selenium, but it's still not clear on how to run these scripts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.