Draft Kings daily fantasy baseball lineup optimizer
Steps
- Update date on
constants.js
to desired date in the formatMM-DD
such as06-02
for June 2. - Optional - Update team stats by running
node getTeamBattingStats.js
npm run start
to fetch days games, lineups, current player stats- Go to draftkings.com, open desired contest,
export
csv of players, move to './fixtures' and rename as 'salaries_(date)' (matching date from step 1) - Run
npm run generate
to generate optimal lineup, ornpm run team
to generate team-stacked lineup with 5 batters from same team - Enter lineup on draftkings and collect profits
Note: This program grabs the actual lineups for each game, which are not available until < 3 hours from first pitch. Therefore, do not grab data until lineups are set here