Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 62 Next »

In this section you will find the description of the sports data structure.
The main purpose of our sports data structure is to describe sports events such as fixtures, matches, races and leagues standings in the same format across all sports. The data structure is designed to be easily integrated into the customer's system, it's very flexible and will easily support any future updates. The following documents describes all important concepts of our sports data structure. The hierarchy of the objects are presented below:

  • Sport 
    • Competition
      • Season *
        • Stage
          • Group
            • Event *
              • Round
              • Event details
              • Participants
                • Results
                • Statistics
                • Lineups
              • Incidents

* For these objects betting offer described below could be related in BetPartner product

Below you'll find a detailed explanation of some terms:

Competition

  • Premiership

  • Bundesliga

  • Wimbledon

  • World Cup

Season

A season is the period of time/year that a competition is played in, this means that one competition can be related to multiple seasons. Each season will have its own unique identificator and belong to a competition. The structure of the season object is the same across all sports. Detailed information about the season structure can be found in the API resource: seasons.index

Some examples of seasons:

  • Premiership 2015/16

  • Premiership 2014/15

  • Wimbledon 2014

  • World Cup 2010

  • World Cup 2014

Stage

An event could optionally belong to stage. A stage is a part of a season e.g. for the Euro Championship in 2008 there were 2 stages: Group stage and Playoff stage. For NBA 2014/15 we also have 2 stages: Regular season and Playoffs. Stages belong to seasons. The used stages list can be found in the API resource: stages.index
Some examples of stages:

  • Group stage

  • Playoff

  • Qualification

  • Main tournament

Group

An event could optionally belong to group. For example, during the soccer World Cup, events can be played in Group A, Group B, Group C etc. The used groups list can be found in the API resource: groups.index

Event

An event is a main object in our sports data structure. It describes a soccer match, a volleyball match, a formula 1 race or a cycling event as well. All events have a unique identificator. Each event always belongs to a season. An event could be optionally related with a stage and/or group. Each event has its own unique identificator and the structure of the event object is the same across all sports.  An event could optionally belong to a Round e.g: Round 1, Querterfinal, etc. The rounds list can be found in the API resource: rounds.index

One of the most important attributes for an event is the status, which inform about the progress of an event e.g: 1st half, 2nd half, Not started, Finished etc. Please note that not all match statuses are used by all sports. For each sport the list of event statuses can be different. The used statuses are available in the Statuses section. Detailed information about event attributes can be found in the resource: events.index

Every event object contains some additional information called event details. For each sport the list of event details can be different.
The complete list of possible event details are available in the Event details section.

Some examples of events details:

  • First half start date

  • Second half start date

  • Number of possible sets

  • Period length

For each event we added Participants. For team sports like football, volleyball, ice hockey we added 2 participants to  an event e.g. Real Madrid and Barcelona. The number of participants related to an event could be higher for some sports e.g: formula 1, cycling, ski jumping. A Ski Jumping event contains 50 participants (each jumper is a participant for the event). We differentiate between three types of participants (teams, persons and doubles (used for tennis)).The participants list can be found in the API resource: participants.index. For each participant related to the event we will deliver Results and Statistics updated in real time and explained further below.

Some examples of events and their relation:

TourCompetitionSeasonStageGroupRoundEventEvent detailsParticipants
ATP TourWimbledonWimbledon 2015Main tournament
QuarterfinalFederer - Nadal

Surface: grass

Number of sets: 5

  • Federer
  • Nadal
ATP TourWimbledonWimbledon 2015Qualification
1st roundCoria - Delbonis

Surface: grass

Number of sets: 5

  • Coria
  • Delbonis

World CupWorld Cup 2010Group StageGroup A
Italy - Germany

Weather condition: sunny

Pitch condition: good
  • Italy
  • Germany

World CupWorld Cup 2010Playoff

Brazil - France

Weather condition: sunny

Pitch condition: good
  • Brazil
  • France
UCI TourGiro d'ItaliaGiro d'Italia 2015


Lens - Paris (stage 1)Length: 250 km
  • all riders e.g:
  • Rafał Majka
  • Alberto Contador
  • Peter Sagan

PremiershipPremiership 2015/16

25 roundManchester United - Chelsea

Weather condition: sunny

Pitch condition: good

  • Manchester United
  • Chelsea

Results

For each event we deliver the results, which are updated in real time. For each sport the list of results can be different. The complete list of possible results for each sport  are available in the Results section

Some examples of results:

  • Result

  • Regular time

Statistics

For each event we deliver statistics updated in real time. For each sport the list of statistics can be different. The complete list of possible statistics for each sport are available in the Statistics section

Some examples of statistics:

  • Result

  • First period

  • Corners

  • Throw ins

  • Dangerous attacks

Lineups

For some events we deliver lineups for each participant. This object includes the players starting and the names of all substitute players available for the event.

Incidents

Everything that happens in an event is an incident. Incidents are sent out when the events are running. For each sport the list of incidents can be different. The complete list of possible incidents are available in the Incidents section.
Some examples of incidents:

  • Goal scored

  • Throw in

  • 2pts shot scored

  • 3pts shot missed

  • First half started


Standings types

For each sport we provide standings. Standings can be related with a sport, a season, a competition, a stage or event. The complete list of possible standings for each sport are available in the Standings types section

Some examples of standings:

  • League standings

  • Halftime standings

  • World Cup 2015/16 standings

  • FIFA club standings

  • Heat standings (for speedway event)


Betting offer

Flexible data structure allows us to assign betting offer not only to a single event (e.g. a soccer match), but also to bigger objects like a competition's seasons (e.g. Premier League 2016/2017). This solution allows us to offer an expanded odds feed and automated resulting for all long term betting offers like season's head to head or outrights. Each betting offer has its own unique identificator and is related with the market and their market type described below. Each betting offer has related outcomes and their own odds.

We differentiate between two types of betting offers: live and prematch. It's described by the attribute is_live_offer. For prematch odds the is_live_offer attribute has "no" value, for live odds value of this attribute is "yes". We start to offer live odds a few minutes before events start.  The data structure of the betting object is the same for live and prematch odds.

The hierarchy of the betting offer objects are presented below:

  • Betting_offer
    • Outcomes
      • Outcome 1
      • Outcome 2
      • Outcome ..
      • Outcome 100

Some examples of betting offers:

Betting offer typeObject type idObject typeObject nameMarket typeMarket nameOutcomes
live34561eventLos Angeles Lakers - Utah JazzTotalsTotals
  • Under 212.5
  • Over 212.5


prematch325671eventReal Madrid - BarcelonaMain1x2
  • Real Madrid
  • X
  • Barcelona
prematch78912012seasonPremiership 2015/16OutrightsTopscorers
  • Wayne Rooney
  • Diego Costa
  • Daniel Sturridge
  • Oliver Giroud
  • Sergio Aguero

More information concering betting offers and their structure is available at: betting-offers.index


Markets and default outcomes

Markets are related with betting offer. Each market has their own unique identificator, name, static name and market type. Additionaly for each market we defined default outcomes. Default outcomes are always assigned to a market and used when the same outcomes appears for that market every time e.g. "Odd/even" market is always decided between default "Odd" and "Even" and a "1x2" market has always three possible outcomes: "Home", "Draw", "Away". Subtype of the market defines number of possible outcomes for particular market (2-way, 3-way-, n-way). Some markets are offered in prematch odds feed, some could be offered in live odds feed, some markets are offered in both types of odds. For some markets scope is assigned to help you find market related to each m

Some markets and their default outcomes names includes replacers. Replacers is a pattern to generate final market or outcomes name for specific betting offer, e.g. for market name "Who will win #nextPoint# point" we use replacer #nextPoint# and that generates final market name: "Who will win 3. point". The similar situation occurs when default outcomes name for a market include replacer e.g. "Under #totalPoints#" -> "Under 195.5", etc.

Some examples of markets:

Market idSportMarket nameMarket static nameDefault outcomesDescriptionSubtypePrematchLiveMarket typeScopeHas replacer
1Soccer1x23way
  • Home
  • Draw
  • Away
Match result in regular time3-wayYesYesMainRegular timeYes
215BasketballTotalsTotals
  • Under #totalPoints#
  • Over #totalPoints#
Number of points to be scored in the match. Including overtime2-wayYesYesTotalsFull timeYes
223BasketballFirst half - asian handicapTotals
  • #participant1# #pointsHandicap#
  • #participant2# #pointsHandicapRev#
Which team will score more points including handicap in first half2-wayYesNoAsian linesFisrt halfYes

Detailed information about markets and their defualt outcomes can be found in the API resource: markets.index.


Replacers

Replacers are used to generate the dynamic informations like event parts, number of points, participant names etc. Replacers are used in markets name and outcomes name during process of creation betting offer. If market or outcome uses a replacer, it's final name is generated for specific betting offer, e.g. for market name "Who will win #nextPoint#. point" we use replacer instead of #nextPoint#  and that generates market "Who will win 3. point").

Some examples of replacers:

Replacer idReplacer nameFormatExampleDescritpion

#totalPoints#

Contains the number of points (e.g in basketball, volleyball) used for specific market

#selectedRound#

Number of round in competition
11#currentGame#integer
  • 1
  • 2
  • 5
Contains the identifier of current game in tennis
41#pointsHandicap#

The value of player's points handicap
42#pointsHandicapRev#

Reversed value of #pointsHandicap# replacer used to display next to default outcome name

The list of all replacers can be found in the API resource: replacers.index


Scopes and market types

Scopes ana markets types could be used for filter our betting offer lists e.g. you can retrieve all betting offers related with Full time scope or all betting offers having Asian handicap market type. Market type is a category of a market e.g. "Both teams to score" market belongs to "Goals" market type category and "1x2" market belongs to "Main" category. Scope represents a name of event's part. Every scope can be used in many sports.

Some examples of markets types:

Market type idName
1Main
2Totals
3Asian Lines

Some examples of scopes:

Scope idName
1Full time
3First half
31Second quarter

You can retrieve list of all possible market types list using API resource: markets-types.index
You can retrieve list of all possible scopes list using API resource: scopes.index



  • No labels