# \[Deprecated] Probabilities and cashout

The probability endpoints can be found near the bottom of our self-service documentation.

* For the production environment: <https://iodocs.betradar.com/unifiedfeed>
* For the integration environment: <https://iodocs.betradar.com/ufstaging>

**Currently, the cashout service is available for matches that fit the following criteria**:

The match is for a cashout supported sport:\
\&#xNAN;*Soccer, Baseball, Basketball, Tennis, Table Tennis, Badminton, Volleyball, Beach Volleyball, Squash, Handball, Ice Hockey, Field Hockey*

**Table of contents**

**XML contentCashout statusError messagesInclude partly refundable probabilities**

* The match is active in Live Odds (and you have Live Odds access to this match): Live Odds is offered for this match; odds are enabled 15 minutes before match start
* The match is not older than 5 days
* Test clients/accounts do not have access to the probability/cashout API

Matches that **do not** fit the above criteria will **not** be available in the cashout service.

The purpose of the probabilities is to give Betradar clients a way to offer their customers the option to cash out on bets that have already been placed, but are not settled yet. This is done in order to increase turnover. To cash out a bet, the client needs to know the current probability of the outcomes, so that they can offer a reasonable return for a customer that wants to cash out a bet before the bet can be definitively settled. To do this, our probabilities service offers probabilities for all active markets and all markets that have previously been offered for the match.

Currently we offer probabilities down to 1e-10 (0.0000000001), and markets with a lower probability than this will be ignored. The feed will produce a message that has a valid odds value, but the probability value will be missing from this market outcome.

XML example

```xml
<market favorite="1" status="1" id="435" specifier="framenr=4">
    <outcome id="1" odds="1.7" probabilities="0.54865 active="1"/>
    <outcome id="2" odds="3.8" probabilities="0.22432 active="1"/>
    <outcome id="3" odds="20.0" active="1"/> …Probability lower than 1e-10…
</market>
```

**Note**: The normal odds\_change message include probabilities for the markets offered in the odds\_change message. Customers are strongly recommended to cache and use probabilities where available for speed and efficiency reasons. The probabilities API is primarily intended for market lines with low likelihood that are currently not offered in the odds\_change message (e.g. a totals line with a total far from the current most likely total).

**Probability API**<br>

In order to offer cashout probabilities, we provide a cashout API where the clients can request the cashout probabilities for all markets for all active matches.&#x20;

| Endpoint                                                | Path Parameters                        | Description                                                                                    |
| ------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------- |
| /probabilities/sr:match:{matchid}                       | Match id                               | Retrieve all probabilities available for the specified match.                                  |
| /probabilities/sr:match:{matchid}/{market}/{specifiers} | Match id, market id, market specifiers | Retrieve the probabilites for the specified market line.                                       |
| /probabilities/sr:match:{matchid}/{market}              | Match id, market id, market specifiers | Retrieve all the probabilities for all the market lines for the specified match and market id. |

**XML content**

The following table has an overview over what elements are present in the Cashout XML response.

| Element              | Description                                                                                                                                                      | Attribute                                                                                                                                                                                                                                                                                                                                                                                                                            | Description                              | Possible values                                                                                                                                                                                                                                       |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cashout              | Top level element                                                                                                                                                | product                                                                                                                                                                                                                                                                                                                                                                                                                              | What product the probabilities come from | Currently only 1 for Live Odds                                                                                                                                                                                                                        |
| event\_id            | Match id                                                                                                                                                         | The match id in urn format, sr:match:{matchid}                                                                                                                                                                                                                                                                                                                                                                                       |                                          |                                                                                                                                                                                                                                                       |
| timestamp            | When the message was created                                                                                                                                     | The number of milliseconds since January 1, 1970 UTC                                                                                                                                                                                                                                                                                                                                                                                 |                                          |                                                                                                                                                                                                                                                       |
| sport\_event\_status | Subelement of cashout. Has attributes for the sport event's current status. See more in the dedicated section for more information about this sub element.       | status                                                                                                                                                                                                                                                                                                                                                                                                                               | The current betstatus                    | <ul><li>0 (match not started)</li><li>1 (betstart, also early betstart if the bookmaker has enabled early betstart in the xml config)</li><li>2 (betstop)</li><li>3 (match is ended)</li><li>4 (match is ended and all markets are cleared)</li></ul> |
| match\_status        | The current match status                                                                                                                                         | <p><strong>Soccer</strong></p><ul><li>0 (not started)</li><li>6 (first half)</li><li>7 (second half)</li><li>31 (halftime)</li><li>32 (awaiting ot)</li><li>33 (ot halftime)</li><li>34 (awaiting penalties)</li><li>41 (first half ot)</li><li>42 (second half ot)</li><li>50 (penalty shooting)</li><li>80 (interrupted)</li><li>90 (abandoned)</li><li>100 (ended)</li><li>110 (after ot)</li><li>120 (after penalties)</li></ul> |                                          |                                                                                                                                                                                                                                                       |
| odds                 | Subelement of cashout. This element contains all the active markets. The odds element with market probabilities are available also when the match is on betstop. | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                                                          | <p><br></p>                              | <p><br></p>                                                                                                                                                                                                                                           |
| <p><br></p>          | <p><br></p>                                                                                                                                                      | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                                                          |                                          |                                                                                                                                                                                                                                                       |
| <p><br></p>          | <p><br></p>                                                                                                                                                      | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                                                          |                                          |                                                                                                                                                                                                                                                       |
| <p><br></p>          | <p><br></p>                                                                                                                                                      | <p><br></p>                                                                                                                                                                                                                                                                                                                                                                                                                          |                                          |                                                                                                                                                                                                                                                       |
| market               | Subelement of odds. Contains market information. The markets are only added to the odds element if the match is on betstart.                                     | id                                                                                                                                                                                                                                                                                                                                                                                                                                   | Unified feed market id                   | Integer                                                                                                                                                                                                                                               |
| specifiers           | Unified feed market specifiers                                                                                                                                   | String                                                                                                                                                                                                                                                                                                                                                                                                                               |                                          |                                                                                                                                                                                                                                                       |
| status               | Market status                                                                                                                                                    | <ul><li>0 (inactive)</li><li>1 (active)</li><li>-3 (cleared)</li><li>-4 (cancelled)</li></ul>                                                                                                                                                                                                                                                                                                                                        |                                          |                                                                                                                                                                                                                                                       |
| cashout\_status      | The cashout status of the market                                                                                                                                 | <ul><li>1 AVAILABLE (available for cashout)</li><li>-1 UNAVAILABLE (temporarily unavailable for cashout)</li><li>-2 CLOSED (permanently unavailable for cashout)</li></ul>                                                                                                                                                                                                                                                           |                                          |                                                                                                                                                                                                                                                       |
| outcome              | <p><br></p>                                                                                                                                                      | id                                                                                                                                                                                                                                                                                                                                                                                                                                   | Unified feed outcome id                  | Integer                                                                                                                                                                                                                                               |
| probabilities        | Outcome probability                                                                                                                                              | Raw model output. Not rounded.                                                                                                                                                                                                                                                                                                                                                                                                       |                                          |                                                                                                                                                                                                                                                       |
| active               | If the outcome is active                                                                                                                                         | <ul><li>1 (active)</li><li>0 (inactive)</li></ul>                                                                                                                                                                                                                                                                                                                                                                                    |                                          |                                                                                                                                                                                                                                                       |

**Cashout status**

Each market element will have a cashout\_status attribute determining if the market is available for cashout or not. The value of the cashout\_status attribute will be determined by the following rules, applied in prioritized order:

| **Id** | **Name**    | **Description**                                                                                                               |
| ------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **-2** | Closed      | Market is settled or canceled.                                                                                                |
| **1**  | Available   | Market is active and match is on betstart or early betstart if the bookmaker has early betstarts enabled in his configuration |
| **-1** | Unavailable | Default status. A market will be unavailable in cashout unless any of the rules above apply.                                  |

A market will only contain cashout probabilities if the cashout status is Available (cashout\_status=”1”).

XML example

```xml
<cashout product="1" event_id="sr:match:10383187" timestamp="1488376222936">
    <sport_event_status status="1" match_status="6"/>
    <odds>
        <market status="1" cashout_status="1" id="20" specifiers="total=1.5">
            <outcome id="425" probabilities="0.6163236925215048" active="0"/>
            <outcome id="426" probabilities="0.38367630747849524" active="0"/>
        </market>
        <market status="1" cashout_status="1" id="29">
            <outcome id="41" probabilities="0.5761726108027806" active="0"/>
            <outcome id="42" probabilities="0.4238273891358624" active="0"/>
        </market>
        <market status="1" cashout_status="1" id="18" specifiers="total=3">
            <outcome id="114" probabilities="0.6366925169830813" active="0"/>
            <outcome id="115" probabilities="0.36330748301691873" active="0"/>
        </market>
    </odds>
</cashout>
```

**Error messages**

This section covers what error messages the server will reply with if something went wrong or some of the provided information is incorrect, etc.

| **Symptom**                              | **Reason**                                        |
| ---------------------------------------- | ------------------------------------------------- |
| XML Message with response code Forbidden | No authentication token                           |
| XML Message with response code Forbidden | Invalid authentication token                      |
| 500 Internal server error                | Error processing the request                      |
| 404 Not Found                            | Trying to access resource that does not exist     |
| 403 Forbidden                            | Bookmaker is blocked from accessing that resource |

**Include partly refundable probabilities**

If you enable this configuration it will allow the possibility to include the probabilities of asian handicap markets (i.e. markets with x.0, x.25 and x.75 lines), both for asian handicap, asian total and no bet markets (draw no bet, home no bet, etc.).

Asian outcomes refer to the probabilities for:

* win probabilities
* lose probabilities
* refund probabilities
* half win probabilities
* half lose probabilities

<br>

XML example

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cashout product="1" event_id="sr:match:20005429" timestamp="1571216072115">
    <sport_event_status status="0" match_status="0"/>
    <odds>
        <market status="-1" cashout_status="-1" id="16" specifiers="hcp=-1.25">
            <outcome id="1715" probabilities="0.5553225068056259" win_probabilities="0.3862513744416066" lose_probabilities="0.39633879985491377" half_win_probabilities="0.21740974186924522" half_lose_probabilities="0.0" active="1"/>
            <outcome id="1714" probabilities="0.4446774931943741" win_probabilities="0.39633879985491377" lose_probabilities="0.3862513744416066" half_win_probabilities="0.0" half_lose_probabilities="0.21740974186924522" active="1"/>
        </market>
        <market status="-1" cashout_status="-1" id="16" specifiers="hcp=-1">
            <outcome id="1715" probabilities="0.4935550505882632" win_probabilities="0.3862513744416066" lose_probabilities="0.39633879985491377" refund_probabilities="0.21740974186924522" active="1"/>
            <outcome id="1714" probabilities="0.5064449494117368" win_probabilities="0.39633879985491377" lose_probabilities="0.3862513744416066" refund_probabilities="0.21740974186924522" active="1"/>
        </market>
        <market status="-1" cashout_status="-1" id="11">
            <outcome id="4" probabilities="0.8575649164628653" win_probabilities="0.6137485417241589" lose_probabilities="0.10193901724880175" refund_probabilities="0.2843123571928049" active="1"/>
            <outcome id="5" probabilities="0.14243508353713483" win_probabilities="0.10193901724880175" lose_probabilities="0.6137485417241589" refund_probabilities="0.2843123571928049" active="1"/>
        </market>
        <market status="-1" cashout_status="-1" id="16" specifiers="hcp=-0.75">
            <outcome id="1715" probabilities="0.4333596828321439" win_probabilities="0.3862513744416066" lose_probabilities="0.39633879985491377" half_win_probabilities="0.0" half_lose_probabilities="0.21740974186924522" active="1"/>
            <outcome id="1714" probabilities="0.5666403171678561" win_probabilities="0.39633879985491377" lose_probabilities="0.3862513744416066" half_win_probabilities="0.21740974186924522" half_lose_probabilities="0.0" active="1"/>
        </market>
        <market status="0" cashout_status="-1" id="1"/>
    </odds>
</cashout
```

**Please Note**:

The configuration "Enable market refund probabilities" is accessible via <https://config.betradar.com/feed-options> and is currently only applied for the sport soccer.

Click the links in the box below to download additional information:

|   | File                                                                                     | Modified                   |
| - | ---------------------------------------------------------------------------------------- | -------------------------- |
|   | PDF File Cashout\_Function\_201119 .pdf                                                  | 26/May/20 by Stefan Pammer |
|   | <p>Labels</p><ul><li>No labels</li><li>Edit Labels</li></ul><p>$itemLabel $itemLabel</p> |                            |
|   | Microsoft Excel Spreadsheet Cashout Algorithm\_051218.xlsx                               | 26/May/20 by Stefan Pammer |
|   | <p>Labels</p><ul><li>No labels</li><li>Edit Labels</li></ul><p>$itemLabel $itemLabel</p> |                            |

* Drag and drop to upload or browse for files&#x20;

Upload file File description  Download All


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/uof/support-and-history/archived/deprecated-probabilities-and-cashout.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
