Betradar - the betting arm of Sportradar

Page tree

Betradar - the betting arm of Sportradar

Skip to end of metadata
Go to start of metadata

BetPal generates an XML feed which has the same format as the Live Odds XML feed. Unlike the Live Odds system, BetPal offers custom odds for each client. These odds are collected through the BetPal application.

The BetPal feed is not directly accessible for clients. However, clients will connect to LivePlex instead. LivePlex is a system which connects to both Live Odds and BetPal (if the client has access to both those systems), and merges the information of these products together into one XML feed. The requests a client can send to LivePlex are the same as in Live Odds. The format of the feed sent by LivePlex is identical to the Live Odds feed as well. If the client has access to both systems and have booked a match in both systems, LivePlex will send the BetPal messages to the client. If the match is not configured or booked in BetPal, the Live Odds messages will be sent instead.

Access methods for BetPal

XML messages describing events happening during the match are sent through a socket connection to the client application. The system supports both SSL and plain connection, but the usage of the secure SSL connection is highly recommended. Each account is able to have up to two open connections simultaneously. Please note that if the client system connects to Live Odds directly as well as to LivePlex, connecting to LivePlex consumes one of the possible Live Odds connections. If the client system already has two open Live Odds connections, LivePlex connects to BetPal only.

Test environment

Clients testing their systems can connect to our test server. The connection details are:

Hostname: betpaltest.betradar.com
Port: 3002 (SSL)

Logging in to the test server is done the same way as for the operational server. From the test server, the client will receive matches configured and traded within the BetPal Test interfaces.

Live environment

Connection details for the live environment are:

Hostname: liveplex.betradar.com
Port: 1960 (use 1961 for SSL)

LivePlex

This section of the documentation features detailed information about LivePlex, a system which connects to both live Odds and BetPal (if you have access to both of those systems)

Going over from LiveOdds to LivePlex

Clients can use the same account clientid and key they use for Live Odds to log in to LivePlex. Since LivePlex and Live Odds have different sequences of IDs, clients may experience inconsistencies when switching from Live Odds to LivePlex.

NOTE

It is strongly recommended that clients switch at a time when no live matches are happening.

Implementation

Since LivePlex merges together feeds from two systems (BetPal and Live Odds), some implementation details need to be highlighted:

Login requests are forwarded to both systems.
Login to LivePlex is successful if at least one of the systems returns loginok. If one of the systems is not accessible, LivePlex will retry to establish a connection with that system automatically. In the meantime only messages from the system the client is connected to are forwarded. If it’s not possible to login to any of the systems within 10 seconds, connection to the client is closed.

A login request is returned as "ok" when the Live Odds service returns "ok", but BetPal returns "failed"


LivePlex prefers BetPal messages over Live Odds messages.
If you have access to the updates of a match in both systems, LivePlex sends only the BetPal messages for that match (including meta messages) to the client system.

Switching from Live Odds updates to BetPal updates is possible, even after the match started.
If a match is booked in only Live Odds and coverage of the match has started, it’s still possible to switch to a BetPal match. Configure the match in BetPal and switch to the BetPal feed.

Match currently in Live Odds

Match has been switched to BetPal

Matches from BOTH systems are included in the alive message (if both systems are available).

Both matches from Live odds and BetPal are included in the alive message.


When a system goes down or becomes unavailable

When one of the systems (Live Odds or BetPal) is not available or is disconnected, matches from the unavailable system are removed from the alive message. Here the mechanism as described in point 2 applies: If a match was available through both BetPal and Live Odds, it will be treated as a BetPal match. If for some reason the BetPal system becomes unavailable, all BetPal matches are removed from the alive message, illustrated in the following figure:

Matches C, D and E are removed from the alive message because BetPal is unavailable.

Important note when using Liveplex and BetPal

If a Live Odds XML publisher you are connected to goes down or becomes unresponsive (and you are connected to that publisher directly via liveodds.betradar.com), you would receive no data during the period it is unresponsive (also no alive messages).

Clients connecting via LivePlex would stop receiving Live Odds matches in the alive message, after Live Odds sends no more alive messages for 20 seconds. However, LivePlex doesn’t disconnect a client when a Live Odds XML publisher goes down since we want to be able to keep sending data from BetPal even though a Live Odds publisher is down (and vice versa).

It will instead remove those matches from the alive message, and keep trying to reconnect to Live Odds.

This means that in the current state, there will be a slightly longer delay before clients can detect that there is an issue if connected via LivePlex, rather than directly to Live Odds.