Connecting to the Stream Endpoints

The Stream API provides a stream of live match data as JSON over a WebSocket connection. Please see the below for how to connect to the stream endpoint.

Connection Protocol

This section defines how to connect to the websocket. This works well in Postman.

Submit Auth Request
  1. Open websocket connection to the host and path for the data feed desired

  2. Submit authentication request

a. Use the same bearer token used to access any other part of the DDE b.

{
  "authToken": "<BEARER TOKEN>"
}
Successful Authentication Response

Successful authentication will return a json response {

  "message":"Authorisation accepted",
  "level":"INFO"

}
Heartbeats

At this point a Heartbeat will be sent every 10seconds

{
    "message": "Heartbeat sent at <ISO_DATE_TIME_STAMP>",
    "level": "INFO"
}
Submit a fixture request
{
  "fixtureId": "<FIXTURE ID>", 
  "backfill": <BACKFILL>
}
  1. Backfill Logic

    1. n = null -> all messages from start of feed + all future messages

    2. n = -1 -> all messages from start of feed + all future messages

    3. n = 0 -> all future messages ONLY

If the fixture exists then the data feed will commence

Once a fixture has been requested and accepted, any further fixture requests will be ignored.The connection must be closed and a new one opened to get a new fixture feed

Once a fixture has been requested and accepted, any further fixture requests will be ignored

The connection must be closed and a new one opened to get a new fixture feed

Error Responses & Handling

Failed Authentication Request

The connection will be closed with a message

Authentication Error Message
{
    "message": "Authentication message had incorrect format",
    "level": "ERROR"
}

Unknown Fixture

The connection will remain open and a warning message will be returned

Unknown Fixture
{
    "message": "Could not find fixture topic soccer.tracking.enrichment.08456e52-9cf7-48cc-913c-f45ec",
    "level": "WARN"
}

Last updated