GT data feed: RabbitMQ Data Access
- Betgate Cluster Integration
- Domain
-
Markets description
AmericanFootball AnyOther AustralianFootball Badminton Bandy Baseball Basketball Bowls BeachFootball BeachVolleyball Biathlon Boxing Chess Cricket Curling Darts Entertainment ESport FieldHockey Floorball Football Futsal Golf Handball IceHockey Kabaddi MMA MotorSport Olympics Politics Rugby Snooker Squash TableTennis Tennis UFC Volleyball Waterpolo
Table of Contents
Overview
The BGC platform’s API provides data streams on sports events, markets, scores, and other related information via RabbitMQ exchanges. Clients can connect to RabbitMQ and subscribe to specific exchanges to receive updates tailored to their needs. Each queue is created with a specific routing key, allowing clients to filter information based on sport, category, tournament, and event.
RabbitMQ Exchanges
The following exchanges are available for data consumption:
- heartbeats - Platform and feed vitality heartbeats.
- gt.sports – Provides updates on sports data.
- gt.categories – Provides information on the sports categories.
- gt.tournaments – Contains information on tournaments.
- gt.events – Delivers details on current and upcoming events.
- gt.markets – Shares updates on available markets.
- gt.market-results – Supplies results for markets as they become available.
- gt.scores – Broadcasts live scores and score updates.
Routing Key Structure
Each message is posted with a routing key in the following format:
SportId + "." + CategoryId + "." + TournamentId + "." + EventId
This format enables clients to route specific data according to sport, category, tournament, and event.
Example Routing Key:
For an event with SportId = TableTennis, CategoryId = 61e33123dcda439d835fffde5a66f00d, TournamentId = d4adcf858240492bb99a4e542f4c1369, and EventId = 12193727:
TableTennis.61e33123dcda439d835fffde5a66f00d.d4adcf858240492bb99a4e542f4c1369.12193727
The default configuration for new customers implies binding queues one-to-one per exchange. Every integration has a fully isolated environment with administrator access to RabbitMQ Management UI, which allows custom queues and bindings to be created based on provided routing keys.
Message Structure
Each exchange will have a unique message structure based on the data type. To parse the messages correctly, refer to the specific API documentation for each exchange’s schema.
Error Handling and Reconnection
Implement error handling to manage connection interruptions and consider implementing automatic reconnection logic to maintain a continuous connection to RabbitMQ.
Additionally, the platform sends the vitality heartbeats that should be properly treated closing any active reception for the following cases:
- No heartbeats within time range of 30 seconds.
- General status is not UP.
- GT feed status is not UP.
{
"status": "UP",
"feeds": {
"GT": "UP"
},
"timestamp": "2024-10-27T20:45:27.9227208+00:00"
}