Betradar - the betting arm of Sportradar

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt Include
HideElements
HideElements
nopaneltrue
Anchor
topOfPage
topOfPage

Excerpt Include
BetradarLogo
BetradarLogo
nopaneltrue

Panel

Client systems can recover messages they might have missed during downtime or disconnection by sending an error request.

Warning

NOTE

However, it is strongly recommended that current requests are used instead.

Error requests can generate a lot of XML messages which the client system needs to process, which can lead to disconnection if the message queue exceeds the limits specified in the section detailing access restrictions.


Current requests will not provide all the missed messages, but for each match the most recent match status and odds, a betstart or betstop, clearbets and cancelbets are returned. This way the client system can update the matches to the correct status instantly rather than updating each match multiple times for events which might already be outdated. Error requests can generate a lot of XML messages which the client system needs to process, which can lead to disconnection if the message queue exceeds the limits specified in the section detailing access restrictions.

Error requests can request missed messages as following:

  • One at a time, by specifying the msgnr from the missed message. If the attribute msgnr is not added, it’s possible to request a sequence of missed messages by specifying msgfrom and msgto.
  • If the msgfrom and msgto attributes are not present either, the value of the last successfull successful received message should be
  • passed in the attribute timestamp to receive all the messages after that timestamp.


Code Block
languagexml
titleXML example
<BookmakerStatus timestamp="0" type="error" bookmakerid="24" msgnr="36">
<Match matchid="661373" active="1" />
</BookmakerStatus>
Code Block
languagexml
titleXML example
<BookmakerStatus type="error" bookmakerid="24" msgfrom="12" msgto="15">
<Match matchid="661373" active="1" />
</BookmakerStatus>
Code Block
languagexml
titleXML example
<BookmakerStatus timestamp="1420070400" type="error" bookmakerid="24">
<Match matchid="661373" active="1" />
</BookmakerStatus>
ElementAttributes


AttributeDescriptionPossible values
BookmakerStatus



type

Keyword which describes what kind of request is sent.

String

"error" (for error requests)

msgnr

The id of the message which is requested. Optional attribute, if this is not passed, the system will look for the msgfrom and msgto attributes.

Integer
msgfrom

The id from the first message in the sequence which is requested. Optional attribute, if this is not passed, the system will look for the timestamp attribute.

Integer
msgto

The id from the first message in the sequence which is requested. Optional attribute, if this is not passed, the system will look for the timestamp attribute.

Integer
timestamp

Optional. The exact same timestamp as given in the last correct message. All messages from that point on will be resent to the client system.

Unix timestamp
Unlike the current match status request sending 0 as timestamp will NOT automatically translate into current time.

The response to the error request will look as following: First messages sent as type="current" get listed. After that all messages sent after timestamp for the given matches, are sent again. Alive messages are not included.

All messages are separated by a newline. The replytype attribute is set to "error" for the reply messages from error requests. The match element will include the msgnr attribute. If the client has missed one or several messages it can request those specific messages by specifying the missed msgnr(s).

Info

Note
Only matches finished the last 48 hours are available for error request. For older matches you will only receive clearbet and cancelbet messages.