Skip to main content
This WebSocket API will be deprecated on July 1, 2026. See the Migration Guide to move to the Centrifuge-based API.
Subscribe to live score changes for a particular event. CHANNEL NAME FORMAT live_scores:{sportXEventId}
NameTypeDescription
sportXEventIdstringThe event ID you wish to subscribe to
MESSAGE PAYLOAD FORMAT
NameTypeDescription
teamOneScorenumberThe current score for team one. Referring to teamOneName in the Market object itself
teamTwoScorenumberThe current score for team two. Referring to teamTwoName in the Market object itself
sportXEventIdstringThe event ID for this update
currentPeriodstringAn identifier for the current period
periodTimestringThe current time for the period. “-1” if not applicable (for example, in tennis)
sportIdnumberThe sport ID for this market
leagueIdnumberThe league ID for this market
periodsPeriodIndividual period information
extrastringJSON encoded extra data for this live score update
where a Period object looks like
NameTypeDescription
labelstringThe period name
isFinishedbooleantrue if the period is over
teamOneScorestringThe score of team one. Referring to teamOneName in the Market object itself
teamTwoScorestringThe score of team two. Referring to teamTwoName in the Market object itself
To get the actual line, you’ll have to fetch the market using the marketHash
const sportXEventId = "L7178624";
const channel = realtime.channels.get(`live_scores:${sportXEventId}`);
channel.subscribe((message) => {
  console.log(message.data);
});
The above command returns JSON structured like this:
{
  "teamOneScore": 2,
  "teamTwoScore": 1,
  "sportXEventId": "L7178624",
  "currentPeriod": "4th Set",
  "periodTime": "-1",
  "sportId": 6,
  "leagueId": 1263,
  "periods": [
    {
      "label": "1st Set",
      "isFinished": true,
      "teamOneScore": "4",
      "teamTwoScore": "6"
    },
    {
      "label": "2nd Set",
      "isFinished": true,
      "teamOneScore": "6",
      "teamTwoScore": "3"
    },
    {
      "label": "3rd Set",
      "isFinished": true,
      "teamOneScore": "7",
      "teamTwoScore": "5"
    },
    {
      "label": "4th Set",
      "isFinished": false,
      "teamOneScore": "1",
      "teamTwoScore": "2"
    },
    {
      "label": "Game",
      "isFinished": false,
      "teamOneScore": "0",
      "teamTwoScore": "0"
    }
  ],
  "extra": "[{\"Name\":\"Turn\",\"Value\":\"2\"},{\"Name\":\"DoubleFaults\",\"Value\":\"{\\\"3/6\\\":\\\"0,0,0,0,0\\\",\\\"3/7\\\":\\\"0,2,0,0,0\\\",\\"
}