Event States and Messages
When you are connected to the RabbitMQ feed, your backend will receive messages related to markets and events in the same channel. All event-level messages will have type = EVENT.
EVENT MESSAGES
Section titled “EVENT MESSAGES”-
For all games supported by Kero, we will create an event 48 hours before the scheduled start time and send you a CREATE message. This means that the event was created and you were automatically added as a subscriber to the event, which therefore means that you will receive market messages for this event.
CREATE{"type": "EVENT","sub_type": "EVENT","object": {"id": "a2cc09b0-89a0-4084-9f51-b597b205bfca","name": "HATAYSPOR VS FENERBAHÇE 26.05.2025","short_name": "HAT V FB","game_id": "28lozs8y9gicrbumgx9lgpwr8","sport": "SOCCER","source": "opta","team_home_position": "LEFT","team_a": {"id": 971,"name": "Hatayspor Antakya","short_name": "HAT","common_name": "Hatayspor Antakya","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/35_Super_Lig/Hatayspor.png","source": {"source": "opta","source_team_id": "efy1nhpn5l6hc27znhsptegba","source_team_name": "Hatayspor"},"sources": [{"source": "betradar","source_team_id": "14287013"},{"source": "sportradar","source_team_id": "sr:competitor:3091"},{"source": "opta","source_team_id": "efy1nhpn5l6hc27znhsptegba","source_team_name": "Hatayspor"}]},"team_b": {"id": 213,"name": "Fenerbahce Istanbul","short_name": "FEN","common_name": "Fenerbahce Istanbul","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/9_UEFA_Champions_League/Fenerbahce.png","source": {"source": "opta","source_team_id": "8lroq0cbhdxj8124qtxwrhvmm","source_team_name": "Fenerbahçe"},"sources": [{"source": "betradar","source_team_id": "5930"},{"source": "sportradar","source_team_id": "sr:competitor:3052"},{"source": "opta","source_team_id": "8lroq0cbhdxj8124qtxwrhvmm","source_team_name": "Fenerbahçe"}]},"started_at": 1748278800,"league": {"id": 35,"name": "Super Lig","source_league_id": "482ofyysbdbeoxauk19yg7tdt","location": "Turkiye"},"alternate_game_ids": {"betradar": "51472457","opta": "28lozs8y9gicrbumgx9lgpwr8"}},"action": "CREATE","timestamp": 1747866975910} -
Occasionally, Kero will delete a game, this could be because the game was rescheduled or there is an issue with the incoming stats source. In this case you will receive a DELETE message which MUST trigger a suspension of all active markets from Kero and this event will no longer receive additional market messages. Upon reconnection, perform a REST call to get a full update of market states.
DELETE{"type": "EVENT","sub_type": "EVENT","object": {"id": "297044d4-4409-4081-95d9-ce5043cb2ebf","name": "ARIZONA DIAMONDBACKS @ LOS ANGELES DODGERS","short_name": "AZ @ LAD","game_id": "55310817","sport": "BASEBALL","source": "betradar","team_home_position": "RIGHT","team_a": {"id": 184,"name": "Arizona Diamondbacks","short_name": "AZ","common_name": "Diamondbacks","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/Baseball/MLB/ari.png","source": {"source": "betradar","source_team_id": "24464"},"sources": [{"source": "betradar","source_team_id": "24464"},{"source": "sportradar","source_team_id": "sr:competitor:3640"}]},"team_b": {"id": 186,"name": "Los Angeles Dodgers","short_name": "LAD","common_name": "Dodgers","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/Baseball/MLB/lad.png","source": {"source": "betradar","source_team_id": "24450"},"sources": [{"source": "betradar","source_team_id": "24450"},{"source": "sportradar","source_team_id": "sr:competitor:3638"}]},"started_at": 1747879800,"league": {"id": 8,"name": "MLB","source_league_id": "25","location": "USA"},"alternate_game_ids": {"betradar": "55310817"}},"action": "DELETE","timestamp": 1747857222508} -
When a game is complete as scheduled, you will receive a CLOSE message as an indication that KERO has closed the event. This message typically arrives between 12-24 hours after the event is finished and is meant to ensure that there is some time available for resettlement of any markets based on stat corrections.:
CLOSE{"type": "EVENT","sub_type": "EVENT","object": {"id": "08814556-61f4-4557-89e8-71082beaafe8","name": "INDIANA PACERS @ NEW YORK KNICKS","short_name": "IND @ NYK","game_id": "59796334","sport": "BASKETBALL","source": "betradar","team_home_position": "RIGHT","team_a": {"id": 97,"name": "Indiana Pacers","common_name": "Pacers","short_name": "IND","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/Basketball/NBA/ind.png","source": {"source": "betradar","source_team_id": "19400"},"sources": [{"source": "betradar","source_team_id": "19400"},{"source": "sportradar","source_team_id": "sr:competitor:3419"}]},"team_b": {"id": 101,"name": "New York Knicks","short_name": "NYK","common_name": "Knicks","image": "https://storage.googleapis.com/kero-cdn.rushsports.io/team_images/Basketball/NBA/ny.png","source": {"source": "betradar","source_team_id": "19442"},"sources": [{"source": "betradar","source_team_id": "19442"},{"source": "sportradar","source_team_id": "sr:competitor:3421"}]},"started_at": 1747872000,"league": {"id": 6,"name": "NBA","source_league_id": "177","location": "USA"},"alternate_game_ids": {"betradar": "59796334"}},"action": "CLOSE","timestamp": 1747883686033}
All messages (for every market and event) will have timestamps, a source game ID (e.g. Betradar ID, OPTA, Genius, IMG Arena), and all corresponding fields.
Event Mapping
Section titled “Event Mapping”Once you receive this message, you should ensure that the event is properly mapped on your side. For example. There is a Champions League game between Benfica and Monaco on Feb 18th, 2025. In the create message, Kero will provide the ids of this event from popular data providers:
"alternate_game_ids": { "betradar": "57684903", "opta": "chin1lzsdwbeepo9b2fbv6qdw"}as well as a Kero Event UUID.
The intended next step in the integration for you is as follows:
- Kero creates an event and sends you a CREATE message 2 days in advance
- You get a “CREATE” message in RMQ with the betradar id and the UUID from Kero.
- You take the betradar ID (or OPTA if that is how you map soccer events) and find such an event on your end.
- You now match the Kero event UUID to your UUID for the event and subsequently ensure that all market messages from Kero will be attached to the correct event.
- When markets are generated, they always carry a Kero event UUID. By mapping those Kero events to your events, you now know where to serve those markets.