Events recovery

Learn how to use PandaScore WebSockets API to recover past real-time events.

📘

Notice

The events feed is available in the Live Pro Plan. For more information, see Pricing.

When sending a Recover message in the WebSocket, the server responds with with the list of all events previously sent, even if the client was not connected.will send which will send you back all the previously pushed events of the game.

When connected to the /matches/<matchID>/events WebSocket channel, the following message should be sent retrieve the previous events from .

{
  "type": "recover",
  "payload": {
    "game_id": <gameID>
  }
}

Node.js example

const socket = new WebSocket('wss://live.pandascore.co/matches/548763/events?token=YOUR_TOKEN')

socket.onmessage = function (event) {
    console.log(JSON.parse(event.data))
}

socket.onopen = function (event) {
  socket.send(JSON.stringify({"type":"recover","payload":{"game_id":211051}}))
}

For examples of events messages, see Data samples.

🚧

Warning

Event recovery is currently only available for League of Legends and Counter-Strike: Global Offensive.


Did this page help you?