# Number Betting Service

Numbers betting delivers betting markets on various lotteries. The events in Numbers Betting represent a single draw of a lottery and uses event\_ids like wns:draw:1234. The draws are connected to one lottery, similar to how matches are connected to a tournament. Numbers betting still uses the same concept of categories and a sport, 108. Most attributes about a draw are shared between all draws in a lottery. Only draw time, results and the match status is specific to a draw.

In order to start receiving Numbers Betting messages, you need to select what lottery types you want to receive from the ctrl feed options page.

#### Feed messages <a href="#uofnumberbettingservice-feedmessages" id="uofnumberbettingservice-feedmessages"></a>

All feed messages are generated by product 7 (wns). The format of the messages is the same as those generated by other producers (see section 3.3). The normal life cycle for a wns draw is in some rare circumstances draws are cancelled. A betstop and bet\_settlement might then be sent before the draw start. The markets in the settlement will then be voided and use an appropriate void reason.

*Feed messages from product 7 (wns):*

| **Time**                  | **Message**     | **Notes**                                                                                                |
| ------------------------- | --------------- | -------------------------------------------------------------------------------------------------------- |
| Midnight before the event | odds\_change    | Note that there isn't a fixture change message. In 99% of cases there is only one odds update per event. |
| Minute before draw start  | bet\_stop       | <p><br></p>                                                                                              |
| Sometime after draw       | bet\_settlement | <p><br></p>                                                                                              |

#### API - Number betting <a href="#uofnumberbettingservice-api-numberbetting" id="uofnumberbettingservice-api-numberbetting"></a>

Due to the physical differences in lottery draws compared to other sports, Numbers Betting has some different endpoints and responses. Self-service documentation of the API exists in <https://iodocs.betradar.com/?urls.primaryName=Unified%20Feed%20Numbers%20betting>.

*Number betting APIL endpoints*

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>HTTP</strong></td><td><strong>Endpoint</strong></td><td><strong>Description</strong></td></tr><tr><td>GET</td><td><pre><code>/wns/{language}/sport_events/wns:draw:{id}/fixture.xml
</code></pre></td><td>Look up for a single draw. No additional information is found here that doesn't exist in the schedule.</td></tr><tr><td>GET</td><td><pre><code>/wns/{language}/sport_events/wns:draw:{id}/summary.xml
</code></pre></td><td>Look up both the fixture and the result for a single draw. If event hasn't ended then result is omitted.</td></tr><tr><td>GET</td><td><pre><code>/wns/{language}/lotteries.xml
</code></pre></td><td>Full list of all lotteries (tournaments) that are considered relevant</td></tr><tr><td>GET</td><td><pre><code>/wns/{language}/lotteries/wns:lottery:{id}/schedule.xml
</code></pre></td><td>Get the list of draws for a given lottery. Only relevant lotteries that are in the future or have recently ended are shown. This is similar to the tournament schedule endpoint in the Sports API</td></tr><tr><td>POST</td><td><pre><code>/wns/recovery/initiate_request
?after=(timestamp)[&#x26;request_id=(x)][&#x26;node_id=(y)]
</code></pre></td><td>Perform recovery. Data is sent over the feed. See 4.6</td></tr></tbody></table>

*Lottery attributes*

| **Name**                 | **Description**                                                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                       | Unique identifier of the lottery                                                                                                                                                    |
| name                     | Name of the lottery                                                                                                                                                                 |
| sport                    | Sport element similar to Sports API                                                                                                                                                 |
| category                 | Category element similar to Sports API                                                                                                                                              |
| draw\_info.draw\_type    | Enum taking one of the values drum or rng. This indicates if the pick is performed using a drum or a random number generator.                                                       |
| draw\_info.time\_type    | Enum taking one of the values fixed or interval. Interval lotteries offers frequent draws.                                                                                          |
| draw\_info.game\_type    | String in the form "6/39". Where 6 indicates number of balls to be picked, while 39 is the number of balls used in the draw                                                         |
| bonus\_info.bonus\_balls | The number of bonus balls used in the draw                                                                                                                                          |
| bonus\_info.bonus\_drum  | Enumeration, either same or additional. If bonus drum is additional, it means that draws will be picked from a new drum, allowing the same balls to be picked from the regular draw |
| bonus\_range             | String in the form "1-49" indicating the range of values the bonus balls can take                                                                                                   |

*Fixtures attributes*

| **Name**                         | **Description**                                                                                                                                                                                                                                     |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                               | Unique id of the draw                                                                                                                                                                                                                               |
| draw\_date                       | Date and time of the draw in ISO 8601 format. Time is specified in UTC time.                                                                                                                                                                        |
| lottery                          | Lottery element see (lottery attributes section)                                                                                                                                                                                                    |
| status                           | Enum taking a value of either open, closed, finished, canceled. Open means that the draw has not started yet. Closed means that the lottery is being played. Finished means that we have a result and canceled indicates that the draw was aborted. |
| draw\_result                     | Element for result if the draw is finished or canceled                                                                                                                                                                                              |
| draw\_result.draws.chronological | Boolean specifying if the draws are specified in the order they were picked (chronological) or sorted by value                                                                                                                                      |
| draw\_result.draws.draw\.name    | The name of the single draw in the form "draw\_3". If the lottery has bonus balls, this will be displayed as "draw\_b1".                                                                                                                            |
| draw\_result.draws.draw\.value   | The ball number of the draw.                                                                                                                                                                                                                        |

&#x20;
