Betradar - the betting arm of Sportradar

Page tree

Betradar - the betting arm of Sportradar

Skip to end of metadata
Go to start of metadata

Alive messages are sent by each producer every 10 seconds. This is indicating that the given producer is operating normally and you are able to receive messages from it. You can also see from the message if you are subscribed to that producer or not.

If it should happen that you stop receiving alive messages at the expected intervals, it is indicating something might be wrong on the connection between our service and yours. What is important to look at is the timestamp inside the alive messages, and the time interval you are receiving them. If the timestamp inside the messages is consistent at 10 seconds, but you receive the messages at a slower pace or irregular interval, this might indicate a bad network connection between your servers and our service, or slow processing on your side. If the timestamp inside the alive messages is not at an approximate 10 seconds interval, this indicates something is wrong on our side. Both these situations are denoted as not receiving an alive message in the below.

  • The recommended action is described below, and you can only treat the connection as up again once a recovery has been completed (confirmed with a snapshot_complete message)
  • If you do not receive an alive message for more than 15 seconds you must wait until you start receiving alive messages again, and then issue a recovery from the time you last received a message.
  • Be aware that if you start issuing recovery requests before you start receiving alive messages, the requests will not be successful, and you might hit our rate limiting on the recovery endpoint.

If you have not received an alive message, and successfully completed a recovery from a given producer for a certain amount of time, you should act according to the match state. Here are some recommendations, but you are free to use other thresholds for the actions:

  • If the match is pre-match, and kicking off in more than 5 minutes, and you have not received an alive message in 5 minutes, then you should suspend all markets on that match. We recommend to suspend all markets. However, to avoid losing business, it might be good to keep accepting bets in a restricted way (e.g. increased odds key, reduced limits, limited market offers, etc.).


Note

Matches which are scheduled to start in the next 5 minutes have to be suspended until the system is fully recovered.


  • If the match is in play or kicking off in the less than 5 minutes, and you have not received an alive message in 15 seconds, you should suspend all markets.
  • Matches from the Virtual producers should be treated as if the match is in play.
  • Matches from the Numbers Betting producer should be treated as if it is pre match.


For all producers you should only reopen bets after you have successfully completed a recovery. Please contact Betradar support (bottom of page for contact info) if you have any questions about recovery not covered in the documentation.

XML example
<alive timestamp="1234579" product="2" subscribed="1"/>

Example showing how to act for an in play event

Time/seconds

10

24

30

40

45

50

56

60

70

Alive message from live producer

OK

 OK

OK




OK

OK

OK

In play event status

Active

Active

Active

Active

Suspended

Suspended

Suspended

Active

Active

Connection handling

-

-

-

-

-

-

Issue recovery

Snapshot complete

-

Example showing how to act for a pre-match event

Time/minutes:seconds

1:00

1:10

1:20…

2:00

2:10…

7:00

10:00…

11:00…

12:00…

Alive message from pre match producer

OK



OK



OK

OK

OK

Pre-match event status

Active

Active

Active

Active

Active

Suspended

Suspended

Active

Active

Connection handling

-

-

-

-

-

-

Issue recovery

Snapshot complete

-

Alive attributes

Name

Description

timestamp

Timestamp in milliseconds since epoch when this message was generated according to generating system's clock.

product

The producer that sent this alive message.

subscribed

If set to 0 this means the product is up again after downtime, and the receiving client will have to issue recovery messages against the API to start receiving any additional messages and get the current state.

Here are some producers that are available for the product attribute found in the above table:

XML example
<producers response_code="OK">
    <producer id="1" name="LO" description="Live Odds" /> 
    <producer id="3" name="Ctrl" description="Betradar Ctrl" /> 
    <producer id="4" name="BetPal" description="BetPal" />
    <producer id="5" name="PremiumCricket" description="Premium Cricket" />
    <producer id="6" name="VF" description="Virtual football" />
    <producer id="7" name="WNS" description="World Number Service" />
    <producer id="8" name="VBL" description="Virtual Basketball League" />
    <producer id="9" name="VTO" description="Virtual Tennis Open" />
</producers>