Stat Entity
A statEntityID tell us who’s performance on a given statistic we’re tracking. In other words, if the statID tracks WHAT we’re tracking, the statEntityID tracks WHO we’re tracking.
In the context of odds data, the statEntityID is used to determine who’s performance on a given statID dictates the outcome of the bet.
A statEntityID can take on the following values:
Possible Values
all
In this case the statEntityID shows that we are tracking the performance of all teams/participants. For example, an over/under bet on the total number of points scored in a game would have a statEntityID of all because the bet is tracking the total number of points scored by both teams.
home
In this case the statEntityID shows that we are tracking the performance of the away team.
away
In this case the statEntityID shows that we are tracking the performance of the away team.
any playerID
When tracking player-specific stats or player prop bets, the statEntityID will be a playerID.
any teamID
This is only used in Events where the Event’s type is tournament. In a normal event (type = match) the statEntityID will be home or away. However, in tournament type events (like a Golf tournament), there isn’t a home and away team, so the statEntityID will be a teamID.
How statEntityID is set on odds
As mentioned, in the context of odds data, the statEntityID is used to determine who’s performance on a given statID dictates the outcome of the bet.
For example, if you’re looking odds for the over on an over-under rebounds bet (sideID = over, betTypeID = ou, statID = rebounds) and the statEntityID is LEBRON_JAMES_LA_LAKERS then this bet corresponds to the over-under for Lebron James’ rebounds. If the statEntityID were home then the bet would be on the total rebounds of the home team in that game. If the statEntityID were all then the bet would be on the total rebounds (of both teams combined) in the game.
In some cases, the statEntityID can only have a single fixed value based on the betTypeID and sideID. Here are those cases:
- betTypeID:
ml+ sideID:home-> statEntityID:home - betTypeID:
ml+ sideID:away-> statEntityID:away - betTypeID:
sp+ sideID:home-> statEntityID:home - betTypeID:
sp+ sideID:away-> statEntityID:away - betTypeID:
ml3way+ sideID:home-> statEntityID:home - betTypeID:
ml3way+ sideID:away-> statEntityID:away - betTypeID:
ml3way+ sideID:draw-> statEntityID:all - betTypeID:
ml3way+ sideID:home+draw-> statEntityID:home - betTypeID:
ml3way+ sideID:away+draw-> statEntityID:away - betTypeID:
ml3way+ sideID:not_draw-> statEntityID:all - betTypeID:
prop+ sideID:side1-> statEntityID:side1 - betTypeID:
prop+ sideID:side2-> statEntityID:side2
Why is this the case? Well for example if you’re taking the home team on a spread bet, the outcome of your bet is always dictated by the performance of the home team. In these types of cases statEntityID is somewhat redundant with sideID, but it’s still included for consistency. In other cases like the over-under case mentioned above, we need to specify a statEntityID which is different from the sideID.
