Grouping Odds Together
We return a grouping_key
on each Odd
field that can be used to group bets together. This is useful for cases where a book has main (most balanced) and alternate lines.
Example
If you have the following bet names: ["Home -1", "Away +1", "Home +1", "Away -1"]
, you want to group these like so [("Home -1", "Away +1"), ("Home +1", "Away -1")
. You can use the grouping_key
to make these groups.
Choosing an ID
The ID that we return for each odd object is not guaranteed to be of any specific format and is subject to change. Note that using this id will also not allow you to track line changes or historical movements because of the availability of alternate lines.
All Lines:
If you store and keep track of multiple sportsbooks for the same game / market combination, we would recommend constructing your own id using the following format:
<fixture_id>:<sportsbook>:<market>:<name>:<player_id>
.
If you store and keep track of a single sportsbook for the same game / market combination, we would recommend constructing your own id using the following format:
<fixture_id>:<market>:<name>:<player_id>
.
Main Lines Only:
If you want to track line changes for the main (is_main=True) lines of a market, we would recommend constructing your own id using the following format: <fixture_id>:<sportsbook>:<market>:<selection>:<selection_line>:<player_id>
.
Some examples below:
- Moneyline:
39506-40644-2023-08-13-09:DraftKings:Moneyline:Boston Red Sox:null:null
- Run Line:
39506-40644-2023-08-13-09:Caesars:Boston Red Sox:null:null
- Total Runs:
39506-40644-2023-08-13-09:Caesars::over:null
- Player Strikeouts:
39506-40644-2023-08-13-09:DraftKings:Player Strikeouts:Eduardo Rodriguez:over:AHF3454FEF
- Team Total:
39506-40644-2023-08-13-09:Fanduel:Team Total:Boston Red Sox:over:null