/
v3.0.11Get access

subscribeToPrematchSportsOnly

This API function is designed to establish a real-time subscription specifically for upcoming, pre-match sports, filtering out any live or in-play games. Can be used for live calendar section.

Request parameters:

Name
DescriptionTypeValuesDefault
to
The end timestamp that caps the window (e.g., "only show matches happening in the next 48 hours").number--
from
The start timestamp that ensures you only get matches starting after this time.number--
sportType
Filters the stream to a specific sport typestring"esport", "racing", "virtual", "general", "fighting"-
isOlympicAvailable
A toggle to include or exclude Olympic events.booleantrue / false-

Call example:

subscribeToPrematchSportsOnly({
  from: 1779912000,
  to: 1779998399,
  sportType: 'general'
})

Response examples:

{
  sport: {
    '1': {
      id: 1,
      name: 'Football',
      alias: 'Soccer',
      order: 1
    },
    '2': {
      id: 2,
      name: 'Ice Hockey',
      alias: 'IceHockey',
      order: 5
    },
    '3': {
      id: 3,
      name: 'Basketball',
      alias: 'Basketball',
      order: 2
    },
    '4': {
      id: 4,
      name: 'Tennis',
      alias: 'Tennis',
      order: 3
    },
    '42': {
      id: 42,
      name: 'Water Polo',
      alias: 'WaterPolo',
      order: 232
    },
    '44': {
      id: 44,
      name: 'MMA',
      alias: 'Mma',
      order: 26
    }
  }
}