PandaScore is the data provider of e-sport (The e-sport data API)
Panda Odds is a Proof-of-Concept app to fetch data from PandaScore API and generate match odds.
This is a NodeJs app.
You will need Node 8+ and Yarn.
- Create an
.env
file using the.env.example
. Configure your PandaScore API token. - Install packages :
yarn
- Run one of the following commands :
yarn upcoming_matches
To return a list of upcoming matches
yarn match_for_odds 9493
To compute odds for a given match id (here matchId 9493 but you can change it to any existing matchId)
yarn test --coverage
To execute tests and see the current test coverage
For a given match (matchId):
- get match from PandaScore's API
- get finished matches for the league this match belongs to
- compute league rankings using a ELO rating
// TODO: rankings by year would be better - compute win expectancy (odds) based on league rankings
// TODO: use previous season only
- We should limit the match set to the previous season only (not all the league history)
- We should define home and away using smart factors (team country of residence, matches location - fans can come to assist and support)
- We should include players changes between seasons (new players, player historical data, player health, nb of game played etc.)
- We should compute team strengths using player stats
- We could improve ELO K factor using the something like http://www.eloratings.net/about
- Algorithm does not take into account the "best of" rule, this could be used to compute new ratings (3/0=1, 2/1=0.75, ...)