/
v3.0.11Get access

subscribeToGamesWithSportByTeamId

This method filters the global sports data tree to return only the games involving specific team IDs and subscribes to updates for a specific event within a sport, region, competition, game, and market. Additionally competition id can be passed. Structure will include sport -> region -> competition -> game.

Request parameters:

Name
DescriptionTypeValuesDefault
teamIds
A list of unique numeric identifiers for the teams you want to follow.array--
competitionId
An optional filter to narrow the results down to a specific leaguenumber--
isSportOuterJoin
Always returns the parent object, leaving sub-items blank if they are missing.booleantrue / false-

Call example:

subscribeToGamesWithSportByTeamId({
  competitionId: 545,
  teamIds: [516]
})

Response examples:

{
  sport: {
    '1': {
      id: 1,
      name: 'Football',
      order: 3,
      alias: 'Soccer',
      region: {
        '2150001': {
          id: 2150001,
          name: 'Spain',
          alias: 'Spain',
          order: 12,
          competition: {
            '545': {
              id: 545,
              name: 'La Liga',
              order: 4003,
              game: {
                '29545581': {
                  id: 29545581,
                  start_ts: 1777834800,
                  team1_name: 'Espanyol',
                  team2_name: 'Real Madrid'
                }
              }
            }
          }
        }
      }
    }
  }
}