Handover Between Producers

Intent: to create clear and concise documentation explaining the underlying procedure to handle match handover from producer to producer.

Intended Audience: bookmaker developers


A few minutes before a match starts, Betradar's live operators start covering the match (assuming we have scheduled to cover the match). In practice, the transition from one producer to producer will be seamless. It will just be one odds change message for the match including the updated odds.

For documentation purposes, the producer that is transferring is referred to as the current producer and the producer that is taking over is called the new producer

Handover Overview

During the handover, the new producer will inform the current producer what markets will be offered, and then start sending odds for these markets to the client's account. The current producer will send a final odds_change message with market statuses, it won't include any odds. The markets will have one of the following statuses, deactivated (status=0) or handed_over (status=-2). The markets that will be deactivated should be closed in the client's system as these are markets that the live producer will no longer send.

The markets that will have the status handed over should be handled the following way:

  • When the odds change message is sent from the current producer with market statuses handed over, these markets should be suspended and you should wait for the next odds changes message from the new producer.

  • If it have already received odds change message for these markets from the new producer, you should update the markets based on that message and ignore the market statuses for those markets that will be sent later from the old producer. The markets that has the market status deactivated in the odds change message sent by the old producer should be closed in your system.

This last step is to ensure consistency on the client side in the unlikely scenario that the new odds producer fails after it has told the current producer to stop sending odds, but before it has been able to send its first odds update for this sport event. In such a case the markets will be suspended as they should, and as soon as the new Odds producer is available again, it will start sending odds for this market.

  • Consider only the odds_change messages to track the correct producer id ( i.e.. attribute 'product' ) that is sending the odds and store it in your backend. The change in the producer id indicates the handover. Never assume that the live odds are only sent by producer 1 or only by producer 4

  • After the handover, note the status attribute in the odds_change messages the markets that are handed over are marked with status="-2"

  • Check the timestamp for recovery to make sure the messages are received in the right order from both the producers and the odds are updated correctly.

Handover Process by Example

1. First you will receive an odds_change message from the current producer like this:

XML example

<odds_change product="1" event_id="sr:match:14011583" timestamp="1522772129383">
  <sport_event_status status="0" match_status="0"/>
  <odds>
    <market status="1" id="16" specifiers="hcp=-1.75" extended_specifiers="hcp_for_the_rest=-1.75">
      <outcome id="1714" odds="2.25" probabilities="0.4175194696" active="1"/>
      <outcome id="1715" odds="1.65" probabilities="0.5824805304" active="1"/>
    </market>
 
    <market favourite="1" status="1" id="546">
      <outcome id="1718" odds="2.0" probabilities="0.4652838638" active="1"/>
      <outcome id="1719" odds="2.25" probabilities="0.4140078768" active="1"/>
      <outcome id="1720" odds="2.35" probabilities="0.3956347016" active="1"/>
      <outcome id="156" odds="29.0" probabilities="9.556228E-4" active="1"/>
    </market>

2. Then, the first producer will send another odds_change message that is considered as handover message which will contain only market statuses. (where inactive markets are marked with status=”0” (inactive)). For markets that are active and handed over to the live odds producer, these are marked with status=”-2” (handed over).

XML example

<odds_change product="3" event_id="sr:match:14011583" timestamp="1522772130071">
  <sport_event_status status="0" match_status="0"/>
  <odds_generation_properties expected_totals="3.21868" expected_supremacy="1.54487"/>
  <odds>
    <market status="-2" id="546"/>
    <market status="0" id="156"/>
    <market status="0" id="542"/>
  </odds>
</odds_change>

3. When Betradar is not covering the match live, a bet_stop message is sent out from the pre-match producer before the match is scheduled to start.

XML example

<bet_stop event_id="sr:match: 14011583" groups="all" product="3" timestamp="1531465374159"/>

if the markets are not offered in live they will become suspended or deactivated

Last updated

Was this helpful?