Appearance
Chances
The chances section in the markings response contains an object for each "chance". A chance is a segment of the game where the offense has the opportunity to score.
Overview
Defining a chance is a little tricky. We can explain it by first explaining possessions.
We define a possession as starting when a team gets the ball and ending when they lose the ball (or the period ends). So one team starts with the ball, and then if they score, turn it over, miss a shot and don’t get an offensive rebound, or make free throws, the other team gets the ball, and that possession ends. If a team misses a shot but gets the offensive rebound, it doesn’t create a new possession, it just continues the prior possession.
We can split a possession into smaller segments that basically chop it up based on these continuous stretches of play with no stoppage, or a “chance” to score. So let’s say a team gets the ball, then draws a non-shooting foul. The game has stopped. The beginning of the possession until that whistle is one chance. The next chance would start when the ball is given to the inbounder to inbound. It’s a continuation of the prior possession but a new “chance”.
Similarly, if a team misses a jump shot but gets an offensive rebound, that would start a new chance but not a new possession. So the prior chance would end with the offensive rebound and a new chance would start with an offensive rebound.
NOTE
A chance, by definition, should not contain more than one chance ending event, i.e. it cannot have both a field goal attempt and a turnover in the same chance. In a situation where the shot clock expires as the ball is in the air and the ball never hits the rim, for example, the shot is in one chance, then a new chance is created for the shot clock violation right after.
An important feature of chances is that a substitution cannot occur during the chance, since it is a stretch of continuous gameplay, which means the set of players on the court must stay the same throughout the chance.
For more in-depth details on exactly how we start and stop chances, see the section below on Chance Start and End Timing.
Sample Response
json
{
"markings": {
"chances": [
{
"chance_id_ctg": "chance_51bfc1fda2cc0deb125bee9988859667",
"chance_outcome": "fg2m",
"chance_start_type": "jump_ball",
"defense_players": [
1630180,
1630529,
1630530,
1642847,
1642852
],
"defensive_team_id_nba": 1610612740,
"end_game_clock": 708.0,
"end_he_frame": 806,
"end_shot_clock": 13.0,
"end_wall_clock": "2025-12-23T01:10:47.889+00:00",
"fg_dreb": 0,
"fg_oreb": 0,
"fga": 1,
"fga_pts": 2,
"fgm": 1,
"frontcourt_he_frame": 414,
"frontcourt_wall_clock": "2025-12-23T01:10:41.356+00:00",
"fta": 0,
"ftm": 0,
"game_id_nba": "0022500404",
"in_garbage_time": false,
"is_after_timeout": true,
"is_shooter_fouled": false,
"is_shot_blocked": false,
"is_shot_made": true,
"led_to_offensive_rebound": null,
"offense_players": [
1629023,
1642843,
1642948,
203076,
1630230
],
"offensive_team_id_nba": 1610612742,
"period": 1,
"possession_id_ctg": "possession_640fb5737252cbe98b4f4a70dcee9d8f",
"shot_location": "rim",
"start_game_clock": 720.0,
"start_he_frame": 118,
"start_score_away": 0,
"start_score_home": 0,
"start_shot_clock": 24.0,
"start_wall_clock": "2025-12-23T01:10:36.423+00:00",
"tov": 0
}
]
}
}Fields
Identifiers
game_id_nba
Type: string
NBA game ID
chance_id_ctg
Type: string
CTG-generated unique chance ID
possession_id_ctg
Type: string
CTG-generated possession ID that this chance belongs to
offensive_team_id_nba
Type: integer
NBA team ID of the team on offense
defensive_team_id_nba
Type: integer
NBA team ID of the team on defense
Lineups
offense_players
Type: array[integer]
Array of NBA player IDs for the five players on the court on offense during this chance.
defense_players
Type: array[integer]
Array of NBA player IDs for the five players on the court on defense during this chance.
Context
chance_start_type
Type: string
How the chance began, taken from one of the following options.
jump_ball: Tip-off or jump ball situationfgm: Chance begins immediately after a made field goal (inbound after made basket)ftm: Chance begins immediately after a made free throw sequence (inbound after made free throw)steal: Gained possession via a live-ball turnoverfg_dreb: Defensive rebound after a missed field goalfg_dreb_block: Defensive rebound after a blocked shotfg_oreb: Offensive rebound after a missed field goalft_dreb: Defensive rebound after a missed free throwft_oreb: Offensive rebound after a missed free throwbaseline_inbounds: Chance begins on a dead-ball inbound from the frontcourt baselinesideline_inbounds: Chance begins on a dead-ball inbound from the frontcourt sidelinebackcourt_inbounds: Chance begins on a dead-ball inbound in the backcourt (sideline or baseline)
chance_outcome
Type: string
The outcome of the chance, taken from one of the following options.
Shot results:
fg2m: Made 2-point field goalfg2x: Missed 2-point field goalfg3m: Made 3-point field goalfg3x: Missed 3-point field goalheave: A shot designated as an official heave by the scorerfg2m_fouled: Made 2-point field goal where the shooter was fouled (and-one)fg3m_fouled: Made 3-point field goal where the shooter was fouled (and-one)
Turnovers:
steal: Live-ball turnoverdeadball_turnover: Turnover that stops the clock and requires an inbounds (e.g. traveling, offensive foul, etc.)
Fouls:
shooting_foul: Shooting foul on an attempt (not an and-one make)non-shooting_foul: Personal foul not associated with a shot, and not resulting in free throwsnon-shooting_foul_bonus: Non-shooting foul that results in free throws due to the bonustransition_take_foul: Transition take foulaway_from_the_play_foul: Away-from-the-play foulclear_path_foul: Clear path foulflagrant_foul: Flagrant foul (type 1 or type 2)offensive_foul: Offensive foultechnical_foul: Technical foultechnical_defensive_three_second_foul: Defensive 3-second technical foul
Other endings / stoppages:
violation: Clock stops due to a violationtimeout: Chance ends due to a timeoutout_of_bounds_retain: Ball goes out of bounds and the offense retains possessionjump_ball: Chance ends in a jump ball situationend_period: Period endedother_stoppage: Any other stoppage types not covered above
is_after_timeout
Type: boolean
true if this chance immediately follows a timeout
Score
start_score_home
Type: integer
Score of the home team at the start of the chance
start_score_away
Type: integer
Score of the away team at the start of the chance
Timing
period
Type: integer
Period in which the chance occurred. Overtime would be period 5, double overtime period 6, etc.
start_he_frame
Type: integer
Hawk-Eye frame when chance began
start_wall_clock
Type: string
UTC timestamp when chance began
start_game_clock
Type: float
Game clock (seconds remaining) when chance began
start_shot_clock
Type: float
Shot clock when chance began. null if shot clock is off at the end of the quarter.
end_he_frame
Type: integer
Hawk-Eye frame when chance ended
end_wall_clock
Type: string
UTC timestamp when chance ended
end_game_clock
Type: float
Game clock when chance ended
end_shot_clock
Type: float
Shot clock when chance ended. null if shot clock is off at the end of the quarter.
frontcourt_he_frame
Type: integer
Hawk-Eye frame when ball first crossed halfcourt into the frontcourt. null if the ball never crosses halfcourt during the chance.
NOTE
This does not require a player to be in possession of the ball, it just the first time the x-coordinate of the ball crosses sides of the court in this chance, even if it's in mid-air.
frontcourt_wall_clock
Type: string
UTC timestamp corresponding to frontcourt_he_frame. null if the ball never crosses halfcourt.
in_garbage_time
Type: boolean
true if this chance occurred during "garbage time".
We use a definition of garbage time that is as objective as possible and generally matches up with most people's perception of when garbage time starts: when the game is out of hand, both teams have subbed out most of their starters, and the game never gets close again.
The Specific Definition
The exact definition CTG uses is: the game has to be in the 4th quarter, the score differential has to be >= 25 for minutes 12-9, >= 20 for minutes 9-6, and >= 10 for the remainder of the quarter. Additionally, there have to be two or fewer starters on the floor combined between the two teams.
Importantly, the game can never go back to being non-garbage time, or this clock resets. For example, if it's a 30 point game to start the 4th quarter, but one team comes back and pulls the game within 8, that comeback is not counted as garbage time. If the leading team regains control and expands the lead back out, garbage time would start when the score went back above 10.
This might not capture all of what we'd call garbage time, but it seems important to err on the side of caution and not mistakenly filter out any game time that we would not consider garbage time.
Chance Outcomes
These fields describe the outcome of the chance.
is_shot_made
Type: boolean
true if the shot was made, false if it was missed. null if no shot was taken.
is_shot_blocked
Type: boolean
true if the shot was blocked. null if no shot was taken.
is_shooter_fouled
Type: boolean
true if the shooter was fouled during the shot attempt. null if no shot was taken.
led_to_offensive_rebound
Type: boolean
true if a missed shot was rebounded by the offensive team. null if no shot was taken or if the shot was made.
fga_pts
Type: integer
Points scored on the field goal attempt (2 or 3 for made shots, 0 for misses). null if no shot was taken or if the chance has not yet been processed into the application layer.
fgm
Type: integer
Field goals made. 1 if the shot was made, 0 otherwise. null if no shot was taken or if the chance has not yet been processed into the application layer.
fga
Type: integer
Field goal attempts. 1 if a shot was attempted (not including shooting fouls without a shot), 0 otherwise. null if no shot was taken or if the chance has not yet been processed into the application layer.
ftm
Type: integer
Free throws made during this chance. null if the chance has not yet been processed into the application layer.
fta
Type: integer
Free throw attempts during this chance. null if the chance has not yet been processed into the application layer.
tov
Type: integer
Turnovers. 1 if the chance ended in a turnover, 0 otherwise. null if the chance has not yet been processed into the application layer.
fg_dreb
Type: integer
Defensive rebounds on field goal attempts. 1 if the defense rebounded a missed field goal, 0 otherwise. null if the chance has not yet been processed into the application layer.
fg_oreb
Type: integer
Offensive rebounds on field goal attempts. 1 if the offense rebounded a missed field goal, 0 otherwise. null if the chance has not yet been processed into the application layer.
Shot Location
shot_location
Type: string
The court zone where the shot was taken, one of the following values:
rim: At-rim shots (typically within ~4 feet of the basket)short mid: Short mid-range shots (~4-14 feet from the basket)long mid: Long mid-range shots (~14+ feet, inside the three-point line)corner three: Three-point shots from the cornernon corner three: Three-point shots from above the breakheave: Full-court or half-court heave attempts
null if no shot was taken.
Chance Start and End Timing
There are many decisions to make around when specifically to start and end a chance. The CTG Pro Data Feed utilizes the 3D data where possible to attempt precise placements of these start and end frames.
Here is how chance boundaries are determined:
- Jump balls: The chance starts the first time a player touches the ball with the game clock running after the jump ball.
- Inbounds plays: The chance starts when the ball is in the hands of the inbounder and they have at least one foot out of bounds.
- Fouls: The chance ends when the clock stops. If there are no free throws, the next chance starts following the inbounds timing described above.
- For an and-one, the chance ends when the clock stops, not when the shot goes in.
- Made shots: The chance ends when the top of the ball first drops below rim height, representing the moment the ball goes through the rim. The next chance starts when the inbounder has the ball out of bounds and is ready to inbound.
- Missed shots:
- If a player rebounds the ball, the chance ends when the ball is first touched by a potential rebounder. The next chance starts at the same frame.
- If the ball goes out of bounds (even if touched first), the chance ends when the ball goes out of bounds and the clock stops. The next chance starts following the inbounds timing above.
- If a loose ball foul occurs before the rebound is secured, the chance ends when the clock stops. The next chance starts at the same frame and ends one frame later, effectively creating a chance that only includes the foul. (We do this because in theory, a loose ball foul on a rebound like this is a scoring opportunity if the fouled team happened to be in the bonus.) The chance after that starts following the inbound rules above, or free throw rules noted below.
- Blocked shots are treated like shots hitting the rim, with the same timing logic applying afterward.
- Fouls resulting in free throws: The chance ends at the clock stopping as a result of the foul. The subsequent chance starts following the same rules as for field goal attempts: if the final free throw is made, the next chance starts when the inbounder has the ball with one foot out, and if the final free throw is missed the next chance starts following the rebound rules.
- Live ball turnovers: The chance ends when the ball is first touched by the team that gains possession, and the next chance starts at the same frame.
- That means in situations where there is a loose ball where both teams may deflect the ball but the defense ultimately gains possession, the prior chance ends and the next chance begins at the first frame where the defense touches the ball around the time of the turnover.
