The streaming api provides the client the ability to send or receive events/data in a real-time fashion. Whether this is statisticial data, clock ticks or ball tracking information this api is designed to support different types of data.
The api is designed around the concept of a message broker and topics. The client would initially connect to the message broker and then either subscribe to one or more topics to receive information or send information to a topic (or both). Many clients may be reading from or writing to the same topic simultaneously.
Connection to the message broker is made using a Websocket connection and the message broker makes use of the MQTT protocol.
More information about how authentication works is available at http://developer.connect.sportradar.com/token.
The authorization call will return a number of things:
Some example Python code using the paho.mqtt.client library (https://www.eclipse.org/paho/index.php?page=downloads.php).
urlparts = urlparse(connection_url)
host = urlparts.netloc
client = Client(client_id=client_id, transport="websockets")
client.tls_set()
headers = {'host': host, 'Host': host}
client.ws_set_options(
path="{}?{}".format(urlparts.path, urlparts.query),
headers=headers
)
client.on_connect = _on_connect
client.on_message = _on_message
client.connect(host, 443, 15)
client.loop_start()
def _on_connect(client, userdata, flags, connection_result):
print("connected")
def _on_message(client, userdata, msg):
print("received message {}".format(msg))As part of the authentication/token generation you will receive a list of topics that you are allowed to access.
...
"topics": [{
"topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/e",
"scope": "read:stream_events",
"permission": "read"
}, {
"topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/status",
"scope": "read:stream_status",
"permission": "read"
}, {
"topic": "s/b/b1te1/bac4a5b4-94a5-11ea-b438-be1dddf8af87/r/p",
"scope": "read:stream_persons",
"permission": "read"
}, {
"topic": "s/x/s-2w5zPiF5wVKiha6gqjWBCr/b/bac4a5b4-94a5-11ea-b438-be1dddf8af87/p/c",
"scope": "read:stream_persons_catchup",
"permission": "read"
}, {
"topic": "s/x/s-2w5zPiF5wVKiha6gqjWBCr/response",
"scope": "read:response",
"permission": "read"
}]
...After connection you should subscribe to the list of topics that have a permission type of 'read' returned from the authentication call. If you are sending/writing data then it is important that you subscribe to the read:response topic as well as this is where any acknowledgements or error messages from the data that you send will be available.
The topics with a scope containing the word catchup are optional. If you subscribe to these channels you will receive the last values that those messages had. For example if you subscribe to the read:stream_persons scope you will receive a message when the persons involved in the fixture change. However you will not receieve a message until that happens. If you subscribe to the read:stream_persons_cacthup topic you will receive (on that topic) the last read:persons message sent before you connected.
To reduce transfer size, the content of some messages are sent in a compressed format.
This compressed data is available in the compressedData field in the message. The format of this field is a base64 encoded zlib compressed JSON string.
Python example for decompressing import base64 import zlib
data = "eJyl0b1uwyAQAOBXQcy1hLHjn65RorZppQ6VKnU74GKj2hABHqLI716ztK6aenA24Lj7TncXiibocH5U9J5QKZgSUPOEbzKRpCmKBJRME8ZzDjLljDFO7wg9ofPW+CnlQhWUWSWLfDEnfpRwCqDNdD5C53EqI7SIalbEmgZ6jLcXbJUme90M6CzEiA/gAropGNyA4/QSzZqhXG/mbG4+I5AP3ffoejD/k5WAYj2ZbubkrtPgyd6hke1fMc7Yeh20jYXoln63gGJ5O8uTLuctbHU3NWHIwV5r4WfOHG8Q67n4BGeFhjwghAWxOpZwg1jNxQN03dCTV3Cf6BdIwGo9+Wuxby1a8q6bRptr4Dh+AT9i+9U="
compressed_data = base64.b64decode(data.encode())
output = zlib.decompress(compressed_data).decode()
print(output)To validate that data is available on the streaming API, we have a test panel available here. This will allow you to subscribe in the browser and see what data is being sent in real-time.
This API supports a number of different message types. Depending on your permissions, you may publish or read (or both) a particular message type. Some message types are only available to be read - they are generated automatically by Datacore.
For: READ, PUBLISH
The event message type is the most common type. It is generated when some kind of event occurs. Whether this is a shot at goal, a referee being assiged or event just the ball moving, these can all generate messages of the 'event' type.
The event messages are broken down by a number of different classifier fields. In increasing levels of granularity they are:
This defines the type of events this message is related to. Some examples include:
sport; events relating to something that happens as part of the sporting event. EG. A shot at goal or a foul
setup; events relating to the setup of the match. EG. Assiging a player to a team/position, assigning a referee
The type of the event (inside the class). For a sport class message this may be the type of shot being made, or for a setup class message the type of thing being assigned.
Some eventTypes (but not all) also support a 'subType' to further classify the eventType
Some eventTypes/subTypes support additional options for more information about the event. These are key/pair values. While some values may be boolean (true/false) others can be integer, strings etc.
While all messages of type 'event' require a class, the other fields may or may not be required depending on the type of event.
{
"type": "event",
"fixtureId": "b25692de-ac17-11e8-98d0-529269fb1459",
"clientType": "AppName:Version",
"data": {
"eventId": "c2404cc0-9f75-11e8-98d0-529269fb1459",
"entityId": "c24048a6-9f75-11e8-98d0-529269fb1459",
"personId": "c2405b2a-9f75-11e8-98d0-529269fb1459",
"class": "sport",
"eventType": "2pt",
"eventTime": "2018-08-14T16:45:33.88",
"subType": "jumpShot",
"options": {
"fastBreak": true,
"pointsInThePaint": true,
"distance": 2.3,
},
"clock": "PT08M23S",
"shotClock": "PT12.3S",
"periodId": 2,
"success": true,
"x": 56,
"y": 23,
"officialId": "c2404ff4-9f75-11e8-98d0-529269fb1459",
"playId": "d8934b2a-9f75-11e8-98d0-529269fb1459",
"scores": {
"c24048a6-9f75-11e8-98d0-529269fb1459": "56",
"b25692de-ac17-11e8-98d0-529269fb1459": "23",
},
"status": "updated",
"timestamp": "2018-08-14T16:45:34.34"
}
}
For each sport/event/eventType/SubType the required fields and available different combinations are varied. Please see the list below for more information.
| class | eventType | subType | options | Required Fields |
|---|---|---|---|---|
setup | ||||
| Â | fixture | Â | ||
| Â | post | Â | ||
|  | periodLengthinteger numberOfPeriodsinteger attendanceinteger Total attendance count | class eventType options.numberOfPeriods options.periodLength | ||
| Â | person | Â | ||
|  | namestring The person's name positionstring The position this person plays Allowed Values:
starterboolean Is this person a starter? captainboolean Is this person the captain? bibstring The number/position on this person's shirt/bib | class eventType personId entityId options.name | ||
| Â | role | Â | ||
| Â | entity | Â | ||
|  | namestring numberinteger[1-10] The persons's number, eg 2nd assistant coach bibstring The number/position on this person's shirt/bib positionstring The position/role of this person Allowed Values:
| class eventType entityId | ||
| Â | fixture | Â | ||
|  | namestring numberinteger[1-10] The persons's number, eg 2nd assistant coach bibstring The number/position on this person's shirt/bib positionstring The official's position Allowed Values:
| class eventType personId options.name options.position | ||
sport | ||||
| Â | assist | Â | ||
| Â | assistPrimary | Â | ||
| Â | class eventType entityId periodId eventType personId | |||
| Â | assistSecondary | Â | ||
| Â | class eventType entityId periodId eventType personId | |||
| Â | block | Â | ||
| Â | class eventType personId entityId periodId | |||
| Â | faceOff | Â | ||
| Â | lost | Â | ||
| Â | class eventType | |||
| Â | won | Â | ||
|  | startOfPeriodboolean At the start of the period? | class eventType entityId periodId eventType subType | ||
| Â | fixture | Â | ||
| Â | abandoned | Â | ||
| Â | class eventType | |||
| Â | cancelled | Â | ||
| Â | class eventType | |||
| Â | confirmed | Â | ||
| Â | class eventType periodId | |||
| Â | delayed | Â | ||
| Â | class eventType | |||
| Â | end | Â | ||
| Â | class eventType periodId | |||
| Â | pending | Â | ||
| Â | class eventType periodId | |||
| Â | start | Â | ||
| Â | class eventType periodId | |||
| Â | warm_up | Â | ||
| Â | class eventType | |||
| Â | goal | Â | ||
| Â | backhand | Â | ||
|  | fromPenaltyShotboolean failureReasonstring Allowed Values:
emptyNetGoalboolean | class eventType | ||
| Â | shovel | Â | ||
|  | fromPenaltyShotboolean failureReasonstring Allowed Values:
emptyNetGoalboolean | class eventType | ||
| Â | slapShot | Â | ||
|  | fromPenaltyShotboolean failureReasonstring Allowed Values:
emptyNetGoalboolean | class eventType | ||
| Â | snap | Â | ||
|  | fromPenaltyShotboolean failureReasonstring Allowed Values:
emptyNetGoalboolean | class eventType | ||
| Â | wrist | Â | ||
|  | fromPenaltyShotboolean failureReasonstring Allowed Values:
emptyNetGoalboolean | class eventType | ||
| Â | icing | Â | ||
| Â | class eventType periodId entityId | |||
| Â | offside | Â | ||
| Â | class eventType | |||
| Â | penalty | Â | ||
| Â | drawn | Â | ||
|  | boardingboolean buttEndingboolean chargingboolean checkingBehindboolean checkingCrossboolean delayOfGameboolean elbowingboolean fightboolean fightInstigatorboolean headContactboolean highStickboolean hookingboolean holdingboolean holdingStickboolean holdingFacemaskboolean kneeingboolean leavingBenchboolean obstructionboolean pushingOffWithSkateboolean roughingboolean slashingboolean spearingboolean trippingboolean interferenceboolean unsportsmanlikeboolean | class eventType entityId periodId eventType personId | ||
| Â | major | Â | ||
|  | boardingboolean buttEndingboolean chargingboolean checkingBehindboolean checkingCrossboolean delayOfGameboolean elbowingboolean fightboolean fightInstigatorboolean headContactboolean highStickboolean hookingboolean holdingboolean holdingStickboolean holdingFacemaskboolean kneeingboolean leavingBenchboolean obstructionboolean pushingOffWithSkateboolean roughingboolean slashingboolean spearingboolean trippingboolean interferenceboolean unsportsmanlikeboolean | class eventType entityId periodId eventType personId | ||
| Â | minor | Â | ||
|  | boardingboolean buttEndingboolean chargingboolean checkingBehindboolean checkingCrossboolean delayOfGameboolean elbowingboolean fightboolean fightInstigatorboolean headContactboolean highStickboolean hookingboolean holdingboolean holdingStickboolean holdingFacemaskboolean kneeingboolean leavingBenchboolean obstructionboolean pushingOffWithSkateboolean roughingboolean slashingboolean spearingboolean trippingboolean interferenceboolean unsportsmanlikeboolean | class eventType entityId periodId eventType personId | ||
| Â | misconduct | Â | ||
|  | boardingboolean buttEndingboolean chargingboolean checkingBehindboolean checkingCrossboolean delayOfGameboolean elbowingboolean fightboolean fightInstigatorboolean headContactboolean highStickboolean hookingboolean holdingboolean holdingStickboolean holdingFacemaskboolean kneeingboolean leavingBenchboolean obstructionboolean pushingOffWithSkateboolean roughingboolean slashingboolean spearingboolean trippingboolean interferenceboolean unsportsmanlikeboolean | class eventType entityId periodId eventType personId | ||
| Â | penaltyShotAwarded | Â | ||
| Â | class eventType entityId periodId eventType personId | |||
| Â | period | Â | ||
| Â | confirmed | Â | ||
| Â | class eventType subType periodId | |||
| Â | end | Â | ||
| Â | class eventType | |||
| Â | pending | Â | ||
| Â | class eventType | |||
| Â | start | Â | ||
| Â | class eventType | |||
| Â | possession | Â | ||
| Â | class eventType entityId periodId | |||
| Â | save | Â | ||
| Â | blockSave | Â | ||
| Â | class eventType entityId periodId eventType | |||
| Â | gloveSave | Â | ||
| Â | class eventType entityId periodId eventType | |||
| Â | padSave | Â | ||
| Â | class eventType entityId periodId eventType | |||
| Â | stickSave | Â | ||
| Â | class eventType entityId periodId eventType | |||
| Â | shootOut | Â | ||
| Â | class eventType periodId eventType | |||
| Â | shootOutAttempt | Â | ||
| Â | made | Â | ||
| Â | class eventType success class eventType subType entityId periodId personId | |||
| Â | missed | Â | ||
| Â | class eventType | |||
| Â | save | Â | ||
|  | howSavedstring Allowed Values:
| class eventType | ||
| Â | shootOutToss | Â | ||
| Â | lost | Â | ||
|  | shootOutOrderinteger | class eventType | ||
| Â | won | Â | ||
|  | shootOutOrderinteger | class eventType periodId eventType | ||
| Â | substitution | Â | ||
| Â | in | Â | ||
|  | goalieboolean positionstring | class eventType | ||
| Â | out | Â | ||
|  | goalieboolean positionstring | class eventType | ||
| Â | timeOut | Â | ||
| Â | class eventType entityId periodId eventType | |||
| Â | toss | Â | ||
| Â | lost | Â | ||
|  | directionstring Allowed Values:
startPossessionboolean | class eventType | ||
| Â | won | Â | ||
|  | directionstring Allowed Values:
startPossessionboolean | class eventType | ||
| Â | videoReview | Â | ||
| Â | pending | Â | ||
| Â | class eventType | |||
| Â | rejected | Â | ||
| Â | class eventType | |||
| Â | upheld | Â | ||
| Â | class eventType | |||
clock | ||||
| Â | main | Â | ||
| Â | adjust | Â | ||
|  | valuestring The new value of the clock | class eventType options.value | ||
| Â | start | Â | ||
| Â | class eventType subType | |||
| Â | stop | Â | ||
| Â | class eventType subType | |||
heartbeat | ||||
| Â | client | Â | ||
| Â | class eventType | |||
disconnect | ||||
| Â | client | Â | ||
| Â | class eventType | |||
reset | ||||
| Â | client | Â | ||
| Â | class eventType | |||
clientSessionStart | ||||
| Â | client | Â | ||
|  | sessionIdstring Id for the client application user session authMethodstring The authentication method used by the client application usernamestring Username of the user in the client application userIdstring User identifier in the client application | class eventType | ||
Bold fields are required. Other fields may be required depending on the eventClass/type etc.
| Field | Description |
|---|---|
| eventId | A unique identifier for an event/action. UUIDv1 format. An edits/deletes of this event will need to use the same identifier. |
| entityId | A unique identifier for the entity/team that is performing this event/action. UUIDv1 format. |
| personId | A unique identifier for the person /team that is performing this event/action. UUIDv1 format. If the person is part of an entity/team that id field should also be included. |
| class | The class of the event - see above |
| eventType | The eventType of the event - see above |
| subType | The subType of the event - see above |
| options | The options for the event - see above |
| eventTime | An ISO-8601 datetime giving the time this event occurred. If this event is added out of sequence, then this timestamp should reflect when the event 'would' have occurred. |
| clock | The game clock time when this action occurred. Format ISO-8601 Duration. |
| shotClock | The game shot clock time when this action occurred. Format ISO-8601 Duration. |
| periodId | The unique identifier of the period. Overtime periods start at 11. 1 = 1 OT1 = 11 |
| success | Boolean. Did the action complete successfully. It most cases this is true, however goal/shot attempts can be false. |
| x | The x-coordinate on the playing surface where the action occurred. |
| y | The y-coordinate on the playing surface where the action occurred. |
| z | The z-coordinate on the playing surface where the action occurred. |
| officialId | The unique identifier of the official who made this call. |
| playId | The unique identifier of the 'play' (a group of events who share this id). |
| scores | The structure of entityIds and scores giving the current score after the completion of the action. |
| status | The status of this message. Options are added (Default); updated - meaning the content of this event has been edited; deleted - meaning this event has been deleted; enriched - meaning further information has been added to the event (not changed). |
| flagged | Boolean. This event has been flagged for further review and may be changed later |
| highlight | Boolean. This event may be a highlight of the game. |
| timestamp | An ISO-8601 datetime giving the time this message was sent. |
| clientType | The type of client that is sending this event. Generally this is given as ApplicationName:ApplicationVersion. |
If a field has no value it should not be sent as part of the message. If a field has no value then it should not be sent as part of the message. "" or 0 are valid values and should only be used when the value is known to be these values.
For: READ, PUBLISH
The scoreboard message type contains information about that status of the official scoreboard. The data can be generated by a physical integration to the scoreboard, OCR from a camera, computer program/App or some other means.
This message should be sent at a minimum every 10 seconds, but more often if data is changing more rapidly e.g., a clock (or shotclock) is running. This may mean the data is sent every 10th of second if the clock supports that resolution.
As scoreboard functionality varies widely, the information available in this message can also vary depending on what is available.
{
"type": "scoreboard",
"venueId": "b25692de-ac17-11e8-98d0-529269fb1459",
"fixtureId": "b98392de-ac17-11e8-98d0-529269fb1459",
"clientType": "AppName:Version",
"data": {
"status": "DISCONNECTED",
"state": "PRE",
"periodId": 3,
"possessionArrow": 2,
"clock": {
"value": "PT8M23S",
"running": false
},
"shotClock": {
"value": "PT12.3S",
"running": false,
"inUse": true
},
"countdown": null,
"team1": {
"name": "",
"shortName": "",
"score": 0,
"fouls": 0,
"timeOuts": 2,
"inBonus": false,
"inDoubleBonus": false,
"players": {
"1": {
"number": "00",
"name": "John Smith",
"score": 12,
"fouls": 2
},
"2": {
"number": "99",
"name": "Fred Jones",
"score": 34,
"fouls": 3
}
}
},
"team2": {
"name": "",
"shortName": "",
"score": 0,
"fouls": 0,
"timeOuts": 2,
"timeLeft": 1,
"inBonus": false,
"inDoubleBonus": false,
"players": {
"1": {
"number": "04",
"name": "Thomas Brown",
"score": 77,
"fouls": 3
}
}
},
"timestamp": "2018-08-14T16:45:34.34",
}
}
Bold fields are required
| Field | Type | Description |
|---|---|---|
| status | string | The status of the connection of the sending device's connection to the scoreboard. Options are CONNECTED (actively receiving data) or DISCONNECTED (no data being received) |
| state | string | The state of the fixture/match. Options are PRE = Hasn't yet begun, RUNNING=Currently running FINAL=Finished and complete. A blank value is NOT valid. If unknown then do not send the key. |
| periodId | integer | The unique identifier of the period. Overtime periods start at 11. 1 = 1 OT1 = 11 |
| possessionArrow | integer | If a posession arrow is in use, then this value indicates which team is next to receive possession. Options are 1 or 2. |
| clock.value | string | The current game clock time. Format ISO-8601 Duration. |
| clock.running | boolean | Whether the clock is currently running. Options are boolean true/false. |
| shotClock.value | string | The current shot clock time. Format ISO-8601 Duration. |
| shotClock.running | boolean | Whether the shot clock is currently running. Options are boolean true/false. |
| shotClock.inUse | boolean | Whether the shot clock is in use/available. Options are boolean true/false. |
| countdown | string | The value of any pre-match or period break count-down to the start/resumption of play. Format ISO-8601 Duration. |
| team1/team2 | object | These team structures hold information about specific teams. team1 is normally the 'home' team and team2 the 'away'. |
| name | string | The name of the team |
| score | integer | The score of the team |
| fouls | integer | The number of fouls for the team |
| timeOuts | integer | The number of time outs for the team |
| inBonus | boolean | Is this team 'in bonus?' |
| inDoubleBonus | boolean | Is this team 'in double bonus?' |
| players | object | These player structures hold information about specific players on the team. The object 'key' is a sequential number (but a 'string' key) of the player on the scoreboard (this is NOT their jersey number). |
| team.players.X.number | string | The player's jersey'/shirt number |
| team.players.X.score | integer | The player's score |
| team.players.X.fouls | integer | The player's foul count |
| timestamp | datetime | An ISO-8601 datetime giving the time this message was sent. |
| clientType | string | The type of client that is sending this event. Generally this is given as ApplicationName:ApplicationVersion. |
| venueId | string | The UUID (v1) of the venueId where this device is located. |
| fixtureId | string | The UUID (v1) of the fixture for this data. |
If a field has no value or the scoreboard model does not support it, then the key/value should not be sent as part of the message. If the field is required but the value is unknown the JSON value of null should be used. "" or 0 are valid values and should only be used when the value is known to be these values.
For: READ
The statistics message type contains information about the current statistics. These messages can relate to team or player stats for different periods (or the whole match - periodId=0).
This message is sent whenever an action occurs that causes the statistics to change. The statistics for individual periods will only be sent if the statistics for that period have changed. This means that an event in period 4 will not result in the period 1 statistics being sent.
{
"type": "statistics",
"fixtureId": "b25692de-ac17-11e8-98d0-529269fb1459",
"timestamp": "2021-02-03T00:19:40.354050",
"periodId": 4,
"compressedData": "eJzt3UtzG8cRB/CvktKZTM17ZvcYn3JA2VXRzeUDCCxMxhSWxYdcrpS/ewai5TDYFXoW3cAO6H9VDpEMURS4P8xMTz9+/M+H1f3y6elD+7cPTw/94/OHq7996D532+d/rne/Z2JjmuZmfR03S3+tdbe8TtY310oZ49ZhaWzn//wjH+8+dV/+kNL5FeHa2I/Ktqppdfrfa357+PKap5ebp+e755fnu367+4/511//U//y+l1s83//7fXbUMsmqpvV8nqz2ujdt5GuU3djrjcmKb3RN81mrXd/5qF7fOq3f3zr3SYm15B/5jl/10/Py08Pr9+6UdfKXevwUfnW2Varv+f3QCn7x5e/69dfvrzLv1zd96tfdn/qh49aLdS ... "
}Bold fields are required
| Field | Type | Description |
|---|---|---|
| periodId | integer | The unique identifier of the period. Overtime periods start at 11. 1 = 1 OT1 = 11 A periodId = 0 represents the total for the fixture. |
| compressedData | string | The compressedData key is a base64 encoded zlib compressed JSON string. |
When uncompressed the data is of the following format.
{
"0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1": {
"entity": {
"minutes": 50.333333,
... statistics ...
},
"persons": {
"2ef78c06-fcf1-11e8-8eb2-f2801f1b9fd1": {
"points": 2,
... statistics ...
},
"2ef78d32-fcf1-11e8-8eb2-f2801f1b9fd1": {
"points": 2
... statistics ...
},
... more persons ...
}
},
"0a970e5e-fcf1-11e8-8eb2-f2801f1b9fd1": {
"entity": {
"points": 32,
... statistics ...
},
"persons": {
"83f476c4-fcf1-11e8-8eb2-f2801f1b9fd1": {
"minutes": 5.116667,
... statistics ...
},
"83f45ffe-fcf1-11e8-8eb2-f2801f1b9fd1": {
"minutes": 9.433333,
... statistics ...
},
... more persons ...
}
}
}
Bold fields are required
| Field | Type | Description |
|---|---|---|
| X.entity | object | An object containing the statistics for the entity. |
| X.entity.Z | object | Where Z is a statistic name, given in the sport configuration |
| X.persons | object | An object containing the unique identifiers of all the persons involved with the entity in the fixture. |
| X.persons.Y | object | An object containing the statistics for the person Y in the entity X. |
If a field has no value then the key/value will not be sent as part of the message.
For: READ
The play_by_play message type contains a list of events that have occurred in the current period.
This message is sent whenever an event occurs for that period occurs. This means that an event in period 4 will not result in the period 1 event list being sent.
{
"periodId": 4,
"type": "play_by_play",
"timestamp": "2021-02-03T00:19:40.354050",
"fixtureId": "b25692de-ac17-11e8-98d0-529269fb1459",
"compressedData": "eJzt3UtzG8cRB/CvktKZTM17ZvcYn3JA2VXRzeUDCCxMxhSWxYdcrpS/ewai5TDYFXoW3cAO6H9VDpEMURS4P8xMTz9+/M+H1f3y6elD+7cPTw/94/OHq7996D532+d/rne/Z2JjmuZmfR03S3+tdbe8TtY310oZ49ZhaWzn//wjH+8+dV/+kNL5FeHa2I/Ktqppdfrfa357+PKap5ebp+e755fnu367+4/511//U//y+l1s83//7fXbUMsmqpvV8nqz2ujdt5GuU3djrjcmKb3RN81mrXd/5qF7fOq3f3zr3SYm15B/5jl/10/Py08Pr9+6UdfKXevwUfnW2Varv+f3QCn7x5e/69dfvrzLv1zd96tfdn/qh49aLdS ... "
}Bold fields are required
| Field | Type | Description |
|---|---|---|
| periodId | integer | The unique identifier of the period. Overtime periods start at 11. 1 = 1 OT1 = 11 |
| compressedData | string | The compressedData key is a base64 encoded zlib compressed JSON string. |
[
{
"class": "sport",
"eventId": "279299bd-7fa5-11ea-8359-00224d6a23e5",
"eventTime": "2019-06-23T03:09:18",
"eventType": "substitution",
"subType": "out",
"entityId": "0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1",
"personId": "2ef7849a-fcf1-11e8-8eb2-f2801f1b9fd1",
"timestamp": "2020-04-16T05:43:10.279003",
"periodId": 4,
"clock": "PT10M0S",
"success": true,
"scores": {
"0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1": "64",
"0a970e5e-fcf1-11e8-8eb2-f2801f1b9fd1": "68"
}
}, {
"class": "sport",
"eventId": "279299bf-7fa5-11ea-8359-00224d6a23e5",
"eventTime": "2019-06-23T03:09:18",
"eventType": "substitution",
"subType": "in",
"entityId": "0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1",
"personId": "2ef7836e-fcf1-11e8-8eb2-f2801f1b9fd1",
"timestamp": "2020-04-16T05:43:10.279063",
"periodId": 4,
"clock": "PT10M0S",
"success": true,
"scores": {
"0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1": "64",
"0a970e5e-fcf1-11e8-8eb2-f2801f1b9fd1": "68"
}
},
..... other events ...
]
Bold fields are required
| Field | Type | Description |
|---|---|---|
| array | An array containing the events in this period. | |
| X | object | An object containing information about a specific event. See the section for event for more information. |
For: READ
The status message type contains information about the current status of the fixture and data sources.
{
"type": "status",
"fixtureId": "b25692de-ac17-11e8-98d0-529269fb1459",
"data": {
"sources": {
"event": "CONNECTED",
"scoreboard": "NOT_AVAILABLE"
}
"status": {
"fixture": "DELAYED",
"options" {
"reason": "MEDICAL",
"newTime": "2019-08-14T16:55:14.34"
},
"period": "PENDING",
"periodId": 1
},
"entities": {
"a4f0794e-253b-11eb-adc1-0242ac120002": {
"score": 6,
"fouls": 3
},
"ae43bde4-253b-11eb-adc1-0242ac120002": {
"score": 27,
"fouls": 4
}
},
"clock": {
"main": "PT8M13S",
"shot": null,
"running": false
},
"timestamp": "2018-08-14T16:45:34.34"
}
Bold fields are required
| Field | Type | Description |
|---|---|---|
| sources | object | An object showing what data sources/types are available for this fixture. |
| sources.event | string | The status of an event data source. There could be many event sources, but this will show CONNECTED if at least 1 is connected. Options are CONNECTED, NOT_CONNECTED, NOT_AVAILABLE |
| sources.scoreboard | string | The status of a scoreboard data source. There could be many event sources, but this will show CONNECTED if at least 1 is connected. Options are CONNECTED, NOT_CONNECTED, NOT_AVAILABLE |
| status.fixture | string | The status of the fixture. Options are ABANDONED, CANCELLED, CONFIRMED, DELAYED, FINISHED, INTERRUPTED, PENDING, PROTESTED, IN_PROGRESS, WARM_UP |
| status.period | string | The status of the period. Options are PENDING, IN_PROGRESS, FINISHED, CONFIRMED |
| status.options | object | Any extra information about the fixture status. Eg. The reason for a delay if fixture = DELAYED. |
| status.periodId | integer | The current periodId |
| entities | object | An object containing information about the competitors in this match. They keys are the entityIds. |
| entities.XXX.scores | string | The score for the particular entity |
| clock.XXX | object | Information about the current status of the clock. This information comes from the event data. If a scoreboard feed is avaialble, this should be used instead. |
| clock.main | string | The current time on the clock. ISO 8601 Duration format. PTmmMss.ccS |
| clock.shot | string | The current time on the shot clock. ISO 8601 Duration format. PTmmMss.ccS. If no shot clock is in use - then this will be null |
| clock.running | boolean | Is the clock currently running |
| timestamp | datetime | An ISO-8601 datetime giving the time this message was sent. |
If a field has no value then the key/value will not be sent as part of the message.
For: READ
The persons message type contains information about the persons in the current fixtures. This includes entity players as well as entity roles or fixture (when entityId is blank) based roles.
This message is sent whenever an action occurs that causes the information about the people to change. The messages are sent per entity. If the entity field is blank or null, this indicates this data applies to the fixture (not specific entities).
{
"type": "persons",
"timestamp": "2021-02-03T00:19:40.354050",
"fixtureId": "0a970bca-fcf1-11e8-8eb2-f2801f1b9fd1",
"entityId": "2ef78d32-fcf1-11e8-8eb2-f2801f1b9fd1",
"compressedData": "eJzt3UtzG8cRB/CvktKZTM17ZvcYn3JA2VXRzeUDCCxMxhSWxYdcrpS/ewai5TDYFXoW3cAO6H9VDpEMURS4P8xMTz9+/M+H1f3y6elD+7cPTw/94/OHq7996D532+d/rne/Z2JjmuZmfR03S3+tdbe8TtY310oZ49ZhaWzn//wjH+8+dV/+kNL5FeHa2I/Ktqppdfrfa357+PKap5ebp+e755fnu367+4/511//U//y+l1s83//7fXbUMsmqpvV8nqz2ujdt5GuU3djrjcmKb3RN81mrXd/5qF7fOq3f3zr3SYm15B/5jl/10/Py08Pr9+6UdfKXevwUfnW2Varv+f3QCn7x5e/69dfvrzLv1zd96tfdn/qh49aLdS ... "
}Bold fields are required
| Field | Type | Description |
|---|---|---|
| entityId | string | The unique identifier of the entity. If this is blank or null, it indicates that the data is for the fixture, not a specific entity. This would be the case for match official roles such as referees etc or for non-team sports. |
| compressedData | string | The compressedData key is a base64 encoded zlib compressed JSON string. |
When uncompressed the data is of the following format.
{
"entityId": "2ef78d32-fcf1-11e8-8eb2-f2801f1b9fd1",
"persons": {
"2ef78c06-fcf1-11e8-8eb2-f2801f1b9fd1": {
"name": "Adam Bourke",
"position": "C",
"starter": true,
"active": false,
"bib": "66"
},
"665effc2-fcf1-11e8-8eb2-f2801f1b9fd1": {
"name": "Mark Smith",
"position": "G",
"bib": "20",
"starter": true,
"active": true
},
... more persons ...
},
"roles": {
"CAPTAIN": {
"2ef78c06-fcf1-11e8-8eb2-f2801f1b9fd1": {
"name": "Adam Bourke"
}
},
"COACH": {
"98743232-fcf1-11e8-8eb2-f2801f1b9fd1": {
"number": 1,
"name": "Anthony Jones"
}
}
}
}
Bold fields are required
| Field | Type | Description |
|---|---|---|
| entityId | string | Unique identifier for the entity that this data relates to. If this is blank or not present, it indicates this data is for the entire fixture. |
| persons | object | An object containing information about the players in the entity |
| persons.X | object | An object containing information about a specific player. |
| persons.X.name | string | The name of the person. This is just a basic name, more information can be obtained from the REST APi. |
| persons.X.position | string | The position this person plays. |
| persons.X.bib | string | The number/position on this player's bib/shirt |
| persons.X.active | boolean | Whether this person is currently on the field of play |
| persons.X.starter | boolean | Whether this person was on the field of play at the start of the fixture. |
| persons.X.unregistered | boolean | Is this person un-registered? |
| roles | object | An object containing information about the roles in the entity |
| roles.X | object | An object containing information about a specific role. |
| roles.X.name | string | The name of the person. This is just a basic name, more information can be obtained from the REST APi. |
| roles.X.bib | string | The number/position on this person's bib/shirt |
| roles.X.number | integer | The official's number, eg 2nd referee |
If a field has no value then the key/value will not be sent as part of the message.
GET/