ShotTracker Developer

Unparalleled data set + realtime API = future of sports. Build with live tracking, stats, and broadcast-ready endpoints.

Event API

Live Data V2 — WebSocket

All live data is delivered over a WebSocket, a long-lived connection between the DDSports servers and your client. You must first obtain a subscription token by subscribing to the specific game (e.g. via the Game Subscription Token endpoint). Tokens are issued per game; use a new token to subscribe to another game or drill.

Connection URL

Connect to the WebSocket with your subscription token and optional query parameters. See Code examples → WebSocket connection URL for the full URL pattern.

Query parameters

ParameterTypeRequiredDescription
tokenstringYesSubscription token (from Game Subscription Token endpoint).
sourcestringNoFilter to specific data sources. Multiple source params supported, e.g. source=broadcastsummary&source=clock. If omitted, all client-accessible sources are sent. See Sources table below.
broadcast_summary_levelstringNoWhen using the broadcastsummary source, use `game_stats` to reduce response size and receive only game-level stats (no detailed breakdown). See Broadcast API stats / broadcast summary level options for other values.
last_seqnumberNoSequence number for reconnection. Sequence-supported sources share one sequence; pass the last received seq when reconnecting to resume from that point. If omitted, streaming starts from the beginning of the event. Non-sequence sources always send latest or next value.

Keep alives

Clients must send a ping no more than every 30 seconds when no other data is received, so the connection stays open. The server responds with a pong.

View ping/pong examples →

Sources

Use the source query parameter to subscribe to specific streams. Sequence-supported sources share a single sequence number for catch-up and reconnection.

SourceSequenceDescription
markerYesGame state markers (e.g. jersey colors, lineup status).
broadcastsummaryNoBroadcaster full summary (same shape as Broadcast API Game Stats JSON).
boxscorestatsv2YesPlay-by-play box score stats for all players and team.
chartYesShot chart details for every shot.
possessionsYesEach team’s possessions; updated for each stat.
possessionstatsYesAdvanced stat totals for grouped possessions.
lineupstatsYesStat totals for grouped lineups.
locationNoPlayer and ball xyz locations.
clockNoGame clock and shot clock ticks (2 Hz).

Data payload shape by source

For each type: "data" message, the data object shape depends on source. Below are the main fields for each source.

marker

FieldTypeDescription
tnumberTimestamp (ms).
gameIdstringGame event ID.
statusstringMarker type (e.g. JERSEY_COLOR).
dataobjectPayload depends on status; e.g. JERSEY_COLOR: facilityId, courtId, team1Id, team1JerseyColor, team2Id, team2JerseyColor (hex).

broadcastsummary

FieldTypeDescription
atnumberEpoch timestamp of file (ms).
at_formattedstringHuman-readable timestamp for at.
periodstringCurrent or last period: PRE, H1, H2, Q1, Q2, Q3, Q4, HT, OT, END; COMPLETED when done; TP for test pattern.
referencestringInternal ShotTracker tracking id.
game_statsobjectFull game totals; same format as half/quarter stats below.
half_1_statsobjectFirst half stats; always present with half_2_stats.
half_2_statsobjectSecond half stats.
quarter_1_statsobjectFirst quarter; only when game is run as quarters.
quarter_2_statsobjectSecond quarter stats.
quarter_3_statsobjectThird quarter stats.
quarter_4_statsobjectFourth quarter stats.
ot_1_statsobjectFirst overtime stats.
*_stats.referencestringInternal tracking id for that stats object.
*_stats.homeobjectAll team and player stats for the home team.
*_stats.awayobjectAll team and player stats for the away team; same shape as home (away.team, away.players with same fields as below).
home.team.team_idnumberShotTracker internal team id (same for away.team).
home.team.consumer_codestringConsumer-defined code for the team or ShotTracker team_id.
home.team.team_namestringTeam name defined in ShotTracker.
home.team.TWO_POINT_PCT_DISPLAYstring(DEPRECATED) Percent of 2pt field goals only.
home.team.FGnumberMade field goals.
home.team.FGAnumberAttempted field goals.
home.team.FG_FRACTIONstringFractional display of field goals.
home.team.FG_PCT_DISPLAYstringPercent of field goals.
home.team.FG2numberMade 2pt field goals.
home.team.FGA2numberAttempted 2pt field goals.
home.team.FG2_FRACTIONstringFractional display of 2pt field goals.
home.team.FG2_PCT_DISPLAYstringPercent of 2pt field goals.
home.team.FG3numberMade 3pt field goals.
home.team.FGA3numberAttempted 3pt field goals.
home.team.FG3_FRACTIONstringFractional display of 3pt field goals.
home.team.FG3_PCT_DISPLAYstringPercent of 3pt field goals.
home.team.FTnumberMade free throws.
home.team.FTAnumberAttempted free throws.
home.team.FT_FRACTIONstringFractional display of free throws.
home.team.FT_PCT_DISPLAYstringPercent of free throws.
home.team.PTSnumberTeam points.
home.team.REBnumberTeam rebounds.
home.team.OFFENSIVE_REBnumberTeam offensive rebounds.
home.team.DEFENSIVE_REBnumberTeam defensive rebounds.
home.team.ASTnumberTeam assists.
home.team.STLnumberTeam steals.
home.team.TOnumberTeam turnovers.
home.team.LBTOnumberTeam live ball turnovers.
home.team.DBTOnumberTeam dead ball turnovers.
home.team.DISTnumberTotal team distance in cm.
home.team.DIST_MILESnumberTotal team distance in miles.
home.team.BLKnumberTeam blocks.
home.team.FLnumberTeam fouls.
home.team.FLDNnumberTeam fouls drawn.
home.team.PPTSnumberPoints in the paint.
home.team.AST_TO_RATEnumberAssist-to-turnover rate.
home.team.SECOND_CHANCE_POINTSnumberPoints scored after an offensive rebound.
home.team.POINTS_OFF_TURNOVERnumberPoints scored after a turnover.
home.team.shotsobject[]Team shots per ShotTracker 14-zone map; each zone: DISPLAY, PCT_DISPLAY, R, G, B (RGB).
home.team.shot_locations.makearrayMade shot locations (xy mm from hoop), peak ball height, entry angle, depth, velocity.
home.team.shot_locations.missarrayMissed shot locations (same format as make).
home.team.cas_shotsobject[]Catch-and-shoot shots per zone map; each zone: DISPLAY, PCT_DISPLAY, R, G, B.
home.team.otd_shotsobject[]Off-the-dribble shots per zone map; each zone: DISPLAY, PCT_DISPLAY, R, G, B.
home.team.*_FG_VALUEnumberPer possession type (e.g. OVERALL, TRANSITION, PT0_BR0): total field goals.
home.team.*_FGstringPer possession type: field goal percent.
home.team.*_FG_FRACTIONstringPer possession type: field goal fraction.
home.team.*_POSSnumberPer possession type: number of possessions.
home.team.*_PTSnumberPer possession type: points.
home.team.*_2PTMnumberPer possession type: 2pt makes.
home.team.*_2PTAnumberPer possession type: 2pt attempts.
home.team.*_3PTMnumberPer possession type: 3pt makes.
home.team.*_3PTAnumberPer possession type: 3pt attempts.
home.team.*_TOnumberPer possession type: turnovers.
home.team.*_PPPnumberPer possession type: points per possession.
home.team.*_FG_VALUE_ARROWnumberPer possession type: indicates which FG value is higher vs away team.
home.team.lineup_statsobject[]Top 2 lineups; each: player_ids (array of 5), PLUS_MINUS, TOTAL_POINTS_SCORED, TOTAL_POINTS_ALLOWED.
home.playersobject[]Team and player stats; player_id 0 = team row (same for away.players).
home.players[].player_idnumberShotTracker player id; 0 if team row.
home.players[].consumer_codestringConsumer-defined code or ShotTracker player_id.
home.players[].jersey_numbernumberJersey number; -1 if team row.
home.players[].first_namestringFirst name; null if team.
home.players[].last_namestringLast name; null if team.
home.players[].position_abbrstringC, G, F or null if team.
home.players[].sensornumberAssigned sensor id; 0 if team.
home.players[].on_the_floorbooleanTrue if currently on court.
home.players[].TWO_POINT_PCT_DISPLAYstring(DEPRECATED) Percent of 2pt field goals only.
home.players[].FGnumberMade field goals.
home.players[].FGAnumberAttempted field goals.
home.players[].FG_FRACTIONstringFractional display of field goals.
home.players[].FG_PCT_DISPLAYstringPercent of field goals.
home.players[].FG2numberMade 2pt field goals.
home.players[].FGA2numberAttempted 2pt field goals.
home.players[].FG2_FRACTIONstringFractional display of 2pt.
home.players[].FG2_PCT_DISPLAYstringPercent of 2pt.
home.players[].FG3numberMade 3pt field goals.
home.players[].FGA3numberAttempted 3pt field goals.
home.players[].FG3_FRACTIONstringFractional display of 3pt.
home.players[].FG3_PCT_DISPLAYstringPercent of 3pt.
home.players[].FTnumberMade free throws.
home.players[].FTAnumberAttempted free throws.
home.players[].FT_FRACTIONstringFractional display of FT.
home.players[].FT_PCT_DISPLAYstringPercent of free throws.
home.players[].PLUS_MINUSnumberPlus/minus.
home.players[].PTSnumberPlayer points.
home.players[].REBnumberRebounds.
home.players[].OFFENSIVE_REBnumberOffensive rebounds.
home.players[].DEFENSIVE_REBnumberDefensive rebounds.
home.players[].ASTnumberAssists.
home.players[].STLnumberSteals.
home.players[].TOnumberTurnovers.
home.players[].LBTOnumberLive ball turnovers.
home.players[].DBTOnumberDead ball turnovers.
home.players[].DISTnumberDistance in cm.
home.players[].DIST_MILESnumberDistance in miles.
home.players[].BLKnumberBlocks.
home.players[].FLnumberFouls.
home.players[].FLDNnumberFouls drawn.
home.players[].PPTSnumberPoints in the paint.
home.players[].AST_TO_RATEnumberAssist-to-turnover rate.
home.players[].shotsobject[]Shots per 14-zone map; each zone: DISPLAY, PCT_DISPLAY, R, G, B.
home.players[].shot_locations.makearrayMade shot locations (xy mm, peak height, entry angle, depth, velocity).
home.players[].shot_locations.missarrayMissed shot locations.
home.players[].cas_shotsobject[]Catch-and-shoot per zone; DISPLAY, PCT_DISPLAY, R, G, B.
home.players[].otd_shotsobject[]Off-the-dribble per zone; DISPLAY, PCT_DISPLAY, R, G, B.
home.players[].season_statsobjectOnly with include_player_season; only under game_stats. FT, FTA, FT_FRACTION, FT_PCT_DISPLAY for season.

boxscorestatsv2

FieldTypeDescription
classificationstringStat classification (e.g. THREE_POINT_MAKE).
actstringActor type (e.g. PLAYER).
eidstringEvent ID.
tidstringTeam ID.
ststringSession type (e.g. GAME_ROUND).
sidstringSession ID.
tnumberTimestamp (ms).
gidstringGame ID.
statsobjectCurrent stat values for this player (box score keys, e.g. FG, PTS, TEAM_SCORE).
totalStatsobjectCumulative stats after this event.
vnumberVersion.
pidstringPlayer ID.
prdstringPeriod (e.g. Q1).
pxnumberPlayer x (mm).
pynumberPlayer y (mm).
hexnumberHoop x.
heynumberHoop y.

chart

FieldTypeDescription
eidstringEvent ID.
tnumberTimestamp (ms).
pidstringShooter player ID.
tidstringTeam ID.
sidstringSession ID.
gidstringGame ID.
ststringShot result (MAKE / MISS).
is3booleanTrue if 3-point shot.
ptsnumberPoints (0, 2, or 3).
pxnumberPlayer x (mm).
pynumberPlayer y (mm).
pznumberPlayer z.
hxnumberHoop x.
hynumberHoop y.
hznumberHoop z.
sstringStatus (e.g. RECORDED).
znumberZone.
aznumberAdvanced zone.
dnumberShot distance (e.g. cm).
attributesstring[]Shot attributes (e.g. CAS).
playersstring[]Player IDs on court.
shotDefendersnumber[]Player IDs of defenders.
prdstringPeriod (e.g. Q1).

possessions

FieldTypeDescription
statestringe.g. SAVED.
possessionobjectCurrent possession object.
possession.supervisionstringe.g. SYSTEM.
possession.startTimestampnumberStart time (ms).
possession.teamIdstringTeam ID.
possession.sessionIdstringSession ID.
possession.gameIdstringGame ID.
possession.lineupPlayersstring[]Lineup player IDs.
possession.opponentLineupPlayersstring[]Opponent lineup player IDs.
possession.possessionsarrayEvents in possession (possessionType, playerId, timestamp, etc.).
possession.statsobjectPossession stats (turnover, shotType, points, ballReversals, etc.).
possession.responseViewobjectSimplified view (possessions[], period, events).

possessionstats

FieldTypeDescription
tnumberTimestamp (ms).
scopestringe.g. SESSION.
gidstringGame ID.
sidstringSession ID.
ststringSession type (e.g. GAME_ROUND).
tidstringTeam ID.
summaryarrayOne object per group (type: OVERALL, PT0_BR0, etc.; POSS, POSS_PCT, PTS, PPP, 2PTM, 2PTA, 2PT_PCT, 3PTM, 3PTA, 3PT_PCT, TO, TO_PCT, EFG).

lineupstats

FieldTypeDescription
tidstringTeam ID.
sidstringSession ID.
gidstringGame ID.
statsobjectFG_RATE, REB_RATE, TOTAL_POINTS_SCORED, TOTAL_TURNOVERS, PPP, OPPP, PLUS_MINUS, etc.
playersstring[]Player IDs in this lineup.

location

FieldTypeDescription
gcmsnumberGame clock milliseconds.
scmsnumberShot clock milliseconds.
crbooleanClock running.
periodstringe.g. Q1.
facilityIdstringFacility ID.
courtIdstringCourt ID.
sessionIdstringSession ID.
locationsarrayArray of location objects.
locations[].tnumberTimestamp (ms).
locations[].typestringPLAYER or BALL.
locations[].pidnumberPlayer ID (PLAYER).
locations[].bidstringBall ID (BALL).
locations[].tidnumberTeam ID.
locations[].xnumberx (mm).
locations[].ynumbery (mm).
locations[].znumberz (mm).
locations[].speednumberSpeed.
locations[].distnumberDistance.
locations[].vxnumberVelocity x.
locations[].vynumberVelocity y.
locations[].vznumberVelocity z.

clock

FieldTypeDescription
gidstringGame ID.
periodstringe.g. Q1, OT.
typestringe.g. GAME_SHOT_CLOCK.
statestringe.g. STARTED.
sourcestringe.g. OFFICIAL.
minstringMinutes.
secstringSeconds.
subSecstringSub-seconds.
shotSecstring | nullShot clock seconds (if applicable).
shotSubSecstring | nullShot clock sub-seconds.
controllerIdstring | nullController ID.

Message shape

Each WebSocket message is JSON. Data messages include type, source, and optionally seq and data.

View message shape examples →

For full request/response examples and payload fields, see the Event API section Live Data V2 Games in the API Blueprint (live.apib) or the generated Aglio docs.