This project uses the ESPN fantasy python API (here) to get data from any ESPN fantasy league. This data is used to find any trades that occurred throughout the season and see which team's players scored more points after the trade.
- Create a file called keys.txt in the root directory of the repo
- Log in to any ESPN fantasy league
- Copy the leagueId from the address bar into the keys.txt file
- Right click > Inspect > Storage
- Copy your SWID from espnAuth with the brackets into keys.txt
- Copy espn_s2 into keys.txt
- Make sure keys are on their own line as shown below
leagueId
{SWID}
espn_s2
*User credentials are required to use this script even if the league is public
python fantasy.py
All of the league's trades will be printed to the console as shown below. Just type the number of the trade that you want to evaluate and all the corresponding player/team trade info will be printed to the console.
- The API has an unknown daily/hourly limit
- The API is not officially supported by ESPN
=======