Documentation
Technical Reference and Integration Guide for Sports Book Data Feed API
Sportsbook Data Feed Integration Documentation
Introduction
Welcome to the documentation for integrating the Sportsbook data feed into your application. This manual will guide you through the process of connecting to the RabbitMQ real-time data feed, understanding the structure of the received data, and fetching static data from the API endpoint. The Sportsbook data feed provides real-time updates for in-play and pre-game fixtures, including odds, statistics, live incidents, and other relevant information. The data feed is available via RabbitMQ, a reliable and efficient messaging protocol that allows for easy integration into your application. The data feed is available in JSON format, making it easy to parse and integrate into your application. Additionally, we provide a static data API to fetch entity translations for your application.
1. Connecting and Consuming the RabbitMQ Real-Time Data Feed
To receive real-time data updates for the Sportsbook, you can easily connect to our RabbitMQ server. Once connected, you need to create your own queue and bind it to the customer-exchange
exchange. After binding your queue, you will immediately start receiving Sportsbook snapshots for in-play and pre-game fixtures in easy-to-read JSON format. Additionally, upon request, we can provide JSON Patch updates and other formats for more efficient data transmission. The integration process into your application remains straightforward, making it a breeze to stay updated with real-time Sportsbook data.
1.1 Demo RabbitMQ Data Feed Account
To receive real-time data updates for the Sportsbook, you can easily connect to our RabbitMQ server using the provided connection details.
- Connection URI:
amqp://demo:[email protected]:5672//demo
- Exchange Name:
customer-exchange
- Routing Key:
#
1.2 Sample Code for .NET Core & Node.js
We provide code examples to help you get started integrating our real-time Sportsbook data into your application. Sample client projects demonstrating how to connect and consume the streaming data are available on GitHub for Node.js and .NET Core. These open-source projects contain documented code for establishing the AMQP connection, creating a queue, binding to the exchange, consuming messages, and deserializing the JSON payloads. The reusable client libraries abstract away the implementation details, allowing you to focus on incorporating the real-time data into your application. Use these projects as a starting point for building your own integration.
2. Fixture Data Structure
The fixture JSON data structure contains the following fields:
id
: Unique identifier for the fixture.start_datetime
: The date and time of the fixture start (in UTC) in ISO 8601 format.participant
: An array of participants, each containing anid
andname
.sport
: Contains theid
andname
of the sport.region
: Contains theid
andname
of the region.competition
: Contains theid
andname
of the competition.status
: Represents the status of the fixture (0: non-existent, 1: pre-game, 2: in-play).0
: Non-existent fixture. Remove the fixture from your sportsbook and do not accept any bets.1
: Pre-game fixture. The fixture is scheduled but has not started yet.2
: In-play fixture. The fixture is currently in progress.
state
: Indicates the current state of the fixture, depending on the sport. (See the separate table for details).-
statistics
: Contains various statistics related to the fixture, includingclock
,scoreboard
,timeline
, andincident
.-
clock
: Provides information about the game clock or timer related to the fixture. It contains the following properties:status
: Represents the current status of the clock (running, stopped).direction
: Indicates the direction of the clock (up, down).seconds
: The number of seconds displayed on the clock.
When the status is "running," the customer is responsible for incrementing or decrementing the seconds based on the specified direction ("up" for increasing and "down" for decreasing).
-
-
markets
: An array that may contain market data related to the fixture.id
: Unique identifier for the market.slug
: A unique identifier (slug) for the market.name
: Name of the market (e.g., Match Result, Double Chance, Team 1 Total Goals).sort
: Sorting value for ordering the markets.cols
: Number of columns used to display the market.group
: Group to which the market belongs (e.g., Match, Totals).odds
: An array of odds objects, each containing the following fields:id
: Unique identifier for the odds.price
: Betting odds for the specific outcome.name
: Name of the outcome (e.g., 1, Draw, 2).col
: Column number for displaying the outcome in the market.sort
: Sorting value for ordering the outcomes within the market.properties
: The properties of the odds are sport-specific and typically reflect the relevant statistics and characteristics that describe the specific bet. These properties may include participant information, outcome details, goal specifications, and other relevant data related to the fixture. Depending on the sport, theproperties
field provides valuable insights into the specific bet, allowing for better analysis and understanding of the odds.
2.1 Fixture state
Values for Soccer:
For soccer fixtures, the state
field may have the following values:
not-started
: The fixture has not started yet.half-time
: The fixture has reached half-time.finished
: The fixture has been completed.timeout
: There is a timeout during the fixture.period-1
: The fixture is in the first period (e.g., first half).period-2
: The fixture is in the second period (e.g., second half).overtime-1
: The fixture is in the first overtime period.overtime-2
: The fixture is in the second overtime period.penalties
: The fixture has entered the penalty shoot-out.
3. Documentation Static Data API
We provide a static data API to fetch entity translations for your application.
3.1 Get Supported Locales
Endpoint: https://bs.betbro.eu/1.0.1/locales
This endpoint provides a list of supported locales for translations.
Sample Response:
[
{ "en": "English" },
{ "el": "Greek" },
{ "fa": "Farsi" },
{ "fr": "French" },
{ "de": "German" },
{ "ru": "Russian" }
]
3.2 Get Supported Sports
Endpoint: https://bs.betbro.eu/1.0.1/sports
Retrieve a list of supported sports along with their IDs.
Sample Response:
{
"1": "Football",
"2": "Snooker",
"3": "Cricket",
...
}
3.3 Sport Translations
Endpoint: https://bs.betbro.eu/1.0.1/sports/locale/{locale}
Retrieve translations for sports based on the specified locale.
Sample Response:
{
"Handball": "Handball",
"Snooker": "Snooker",
...
}
3.4 Region Translations
Endpoint: https://bs.betbro.eu/1.0.1/regions/locale/{locale}
Retrieve translations for regions based on the specified locale.
Sample Response:
{
"Korea (South)": "Südkorea",
"Turkey": "Türkei",
...
}
3.5 Competition Translations
Endpoint: https://bs.betbro.eu/1.0.1/competitions/locale/{locale}/sport/{sport}
Retrieve translations for competitions based on the specified locale and sport.
Sample Response:
{
"Zone League": "Zone League",
"NPL SA State League 2": "NPL SA State League 2",
...
}
3.6 Participant Translations
Endpoint: https://bs.betbro.eu/1.0.1/participants/locale/{locale}/sport/{sport}
Retrieve translations for participants (teams, countries) based on the specified locale and sport.
Sample Response:
{
"Austria": "Österreich",
"Ukraine": "Ukraine",
...
}
3.7 Participant Image
Endpoint: https://bs.betbro.eu/1.0.1/assets/participants/{participant.id}.png
This endpoint returns a PNG image of the participant's logo or image based on the participant ID.