Southpaw is a python package that provides access to the Fanduel API.
Optimize your DFS experience by programmatically updating your lineups, analyzing your data, and more.
Installation
Install via PyPi
python -m pip install southpaw
Initial Setup
Retrieve your basic auth token by logging into fanduel.com and copying the authorization header from the dev console.
Initialize your Fanduel object using your Fanduel email, password, and auth token.
import southpaw
basic_auth_token = 'Basic GBGskzdmGLKOP5EwMDNkNGUaLkFdM2VjKJHDNmY1Mjc6'
fanduel_email = '[email protected]'
fanduel_password = 'fakeFanduelPassword'
fd = southpaw.Fanduel(fanduel_email, fanduel_password, basic_auth_token)
Next you need to get your upcoming data. This is the most important step. This will retrieve all entries that the current user has, along with the whole load of info that is available from Fanduel's API.
fd.get_upcoming()
Once you call this function, you now have access to all of the data that Fanduel offers by using a rich set of helper functions that Southpaw provides.
Examples
Get all upcoming entries
fd.get_entries()
Get all upcoming contests
fd.get_contests()
Update a Fanduel Entry
# Get an entry
entry = fd.get_entry('entry_id')
available_players = fd.get_players_in_entry(this_entry.id)
# Decide what players to use. Here we are just grabbing the first 5 in the list as an example
players_to_use = available_players[:5]
update_entry_input = [UpdateEntryInput({'id': entry.id, 'lineup': players_to_use})]
fd.update_entries(update_entry_input)
Disclaimer
This project is for educational use only.
Accumulating Fanduel points or prizes through unauthorized methods such as unauthorized scripts or other automated means is against the Fanduel terms and may result in account disqualification.
The contributors of Southpaw shall not be held responsible for any actions taken using this tool.