# Virtual Sports via Unified Odds Feed (UOF)

Virtual sports offer pre-match, in-play (live), and outright betting markets. Sports covered include:

* Virtual Football League Mode (VFLM)
* Virtual Football World Cup (VFWC)
* Virtual Football Nations Cup (VFNC)
* Virtual Football Asian Cup (VFAS)
* Virtual Football Champions Cup (VFCC)
* Virtual Football Bundesliga (VFB)
* Virtual Football English League (VFEL)
* Virtual Football German League (VFGL)
* Virtual Football Italian League (VFIL)
* Virtual Football Spanish League (VFSL)
* Virtual Football French League (VFFL)
* Virtual World Match Football (VWMF)
* Virtual Fast Football (VFF)
* Virtual Basketball League (VBL)
* Virtual Dog Racing – Kiron (VDK)
* Virtual Horse Racing – Kiron (VHK)

## Pre-match gaming

Due to the nature of virtual sports, matches are played more rapidly; meaning a full season lasts only a few hours. Although some markets are labeled as “pre-match,” odds are updated at a speed similar to live betting markets.

## Virtual Sport producers <a href="#virtual-sport-producers" id="virtual-sport-producers"></a>

Each Virtual Sport is exposed as a separate producer in Unified Odds Feed. See the list of [virtual sport producers](https://app.gitbook.com/o/ZO6TPSCtikUxdBddrKNy/s/1KlIQPveu0EGYCTI8DL1/introduction/key-concepts/producers).

## Virtual Sports markets

The Unified Odds Feed uses a unified list of markets for all producers which is the same for virtual sports. (e.g. 1x2 market has ID 1 for all producers).

## Virtual Sports entities URNs

Sports entities that belong to Virtual Sports (seasons, matches, stages, etc.) use specific URN prefixes, so they can be easily identified.

Virtual Football prefix is `vf`, e.g. `vf:match:1234567`.

See below the comprehensive list of prefixes:

* Virtual Football: `vf`
* Virtual Basketball League: `vbl`
* Virtual Dogs Kiron: `vdr`
* Virtual Horses Kiron: `vhc`

## UOF access

To access all feeds clients need to provide a valid access token. For the Recovery and SportsAPI use a header `key: x-access-token` with the token as value. For the XML-Feed use the token as username.

## UOF components

<table><thead><tr><th valign="top">Feed / API / Component</th><th valign="top">Staging</th><th valign="top">Production</th></tr></thead><tbody><tr><td valign="top">UOF XML-Feed (Rabbit MQ)</td><td valign="top"><a href="http://stgmq.betradar.com/">stgmq.betradar.com</a></td><td valign="top"><a href="http://mq.betradar.com/">mq.betradar.com</a>​</td></tr><tr><td valign="top">UOF Recovery</td><td valign="top">​<a href="https://stgapi.betradar.com/v1/%7Bproduct%7D/%7Bendpoint%7D">https://stgapi.betradar.com/v1/{product}/{endpoint}</a></td><td valign="top"><a href="https://api.betradar.com/v1/%7Bproduct%7D/%7Bendpoint%7D">https://api.betradar.com/v1/{product}/{endpoint}</a></td></tr><tr><td valign="top">UOF API</td><td valign="top"><a href="https://stgapi.betradar.com/v1/sports/%7Blanguage%7D/%7Bendpoint%7D">https://stgapi.betradar.com/v1/sports/{language}/{endpoint}</a></td><td valign="top"><a href="https://api.betradar.com/v1/sports/%7Blanguage%7D/%7Bendpoint%7D">https://api.betradar.com/v1/sports/{language}/{endpoint}</a></td></tr></tbody></table>

## API for Virtual Sport information

Virtual sports have their own URN type `vf:match:xxxx`, `vf:season:xxx`\`and `vf:tournament:xxxx` to retrieve virtual sport information form the API endpoints. The actual details of the matches/events are available for end-users in the front-end interfaces, and the *bet\_settlement* message includes the result.

The season information is important and this is looked up using the standard endpoints: `tournaments/(season-id)/info.xml and tournaments/(season-id)/schedule.xml` and follows the same format as real sports. The SDK automatically takes care of this, so if you are an SDK user you don’t have to worry.

## Schedule for a season

Because of fast bet cycles, Sports API endpoint for getting schedules for a specific date (or `SDK` methods `getCompetitionsFor` on `SportsInfoManager` interface in Java and `GetSportEventsByDateAsync` on `SportDataProvider` interface in .NET) do not include virtual seasons and matches. Schedule for a season needs to be obtained per season directly.&#x20;

Instead of informing about the upcoming seasons and matches on the API, virtual producers send a `fixture_change` information for every upcoming season.

To ensure that the client has the schedule for the upcoming season and can cache the information about the matches that will be played, the producer sends out a `fixture_change` message with the season as the event, when a new season starts.

The recommended behavior when receiving such a fixture change is retrieve the season schedule through API using the endpoint `tournaments/(season-id)/schedule`. The `SDK` handles this automatically, but if you want to do something extra on your end when a new virtual season starts, a good time to do that is when you receive the fixture change on a virtual season.

## API endpoints supported by Virtual Sports

The Unified Feed (UF) API is used by clients (via SDK) to fetch Virtual Sports meta data. That is, data that is not directly odds related, e.g. info about matches, seasons, tournaments.

In Virtual Sports, we use the same endpoints and same domain names as the common Sportradar UF API. However, in Virtual Sports we have our own implementation of some of these endpoints, and we only support these endpoints when using Virtual Sports IDs.

<table><thead><tr><th valign="top">Endpoint</th><th valign="top">URN type</th><th valign="top">Example URL production</th><th valign="top">Comments</th></tr></thead><tbody><tr><td valign="top">sports/{language}/sport_events/{urn_prefix}:{urn_type}:{urn_id}/fixture.xml</td><td valign="top"><code>match</code>, <code>season</code>, <code>tournament</code>, <code>stage</code></td><td valign="top"><a href="https://api.betradar.com/v1/sports/en/sport_events/vf:match:12345/fixture.xml">https://api.betradar.com/v1/sports/en/sport_events/vf:match:12345/fixture.xml</a></td><td valign="top">If URN-type season or tournament are used then the response is exactly the same as calling the endpoint 'info' with the same season/tournament ID.</td></tr><tr><td valign="top">sports/{language}/sport_events/{urn_prefix}:{urn_type}:{urn_id}/summary.xml</td><td valign="top"><code>match</code>, <code>season</code>, <code>tournmanet</code>, <code>stage</code></td><td valign="top"><a href="https://api.betradar.com/v1/sports/en/sport_events/vf:tournament:12345/summary.xml">https://api.betradar.com/v1/sports/en/sport_events/vf:tournament:12345/summary.xml</a></td><td valign="top">If URN-type season or tournament are used then the response is exactly the same as calling the endpoint 'info' with the same season/tournament ID.</td></tr><tr><td valign="top">sports/{language}/tournaments/{urn_prefix}:{urn_type}:{urn_id}/info.xml</td><td valign="top"><code>season</code>, <code>tournament</code>, <code>stage</code></td><td valign="top"><a href="https://api.betradar.com/v1/sports/en/tournaments/vf:season:12345/info.xml">https://api.betradar.com/v1/sports/en/tournaments/vf:season:12345/info.xml</a></td><td valign="top">Tournaments are always unique tournaments. If tournament type is used then the season in the response will be the current season.</td></tr><tr><td valign="top">sports/{language}/tournaments/{urn_prefix}:{urn_type}:{urn_id}/schedule.xml</td><td valign="top"><code>season</code>, <code>tournament</code>, <code>stage</code></td><td valign="top"><a href="https://api.betradar.com/v1/sports/en/tournaments/vf:tournament:12345/schedule.xml">https://api.betradar.com/v1/sports/en/tournaments/vf:tournament:12345/schedule.xml</a></td><td valign="top">Tournaments are always unique tournaments. If tournament type is used then the season in the response will be the current season.</td></tr></tbody></table>

## UOF recovery

As stated above each virtual sport is a separate producer, which means recovery needs to be done for each producer individually. This is handled automatically if you use the SDK. Also, failure handling must be considered about what happens when one of the virtual sports becomes unavailable.

UOF Recovery requests for Virtual Sports are made using URLs for the different endpoints specified in the table below. An 'accepted' response is given (immediately) through HTTPS and the actual messages are sent through the UOF XML-Feed (Rabbit MQ).

Recovery request should be made using the HTTP POST method, further documentation can be found in the general documentation of [Unified Feed endpoints](https://docs.sportradar.com/uof/).

<table><thead><tr><th valign="top">Recovery request</th><th valign="top">Endpoint URL</th><th valign="top">Example URL production</th></tr></thead><tbody><tr><td valign="top">Odds (after)</td><td valign="top"><p>/odds/initiate_request</p><p>(With after parameter)</p></td><td valign="top"><a href="https://api.betradar.com/v1/vf/odds/initiate_request&#x26;after=1462973515000">https://api.betradar.com/v1/vf/odds/initiate_request&#x26;after=1462973515000</a></td></tr><tr><td valign="top">Odds (full)</td><td valign="top">/odds/initiate_request</td><td valign="top"><a href="https://api.betradar.com/v1/vf/odds/initiate_request">https://api.betradar.com/v1/vf/odds/initiate_request</a></td></tr><tr><td valign="top">Odds sport event</td><td valign="top">/odds/events/{event}/initiate_request</td><td valign="top"><a href="https://api.betradar.com/v1/vf/odds/events/vf:match:1234567/initiate_request">https://api.betradar.com/v1/vf/odds/events/vf:match:1234567/initiate_request</a></td></tr><tr><td valign="top">Stateful (after)</td><td valign="top"><p>/stateful_messages/initiate_request</p><p>(With after parameter)</p></td><td valign="top"><a href="https://api.betradar.com/v1/vf/stateful_messages/initiate_request&#x26;after=1462973515000">https://api.betradar.com/v1/vf/stateful_messages/initiate_request&#x26;after=1462973515000</a></td></tr><tr><td valign="top">Statefull (full)</td><td valign="top">/stateful_messages/initiate_request</td><td valign="top"><a href="https://api.betradar.com/v1/vf/stateful_messages/initiate_request">https://api.betradar.com/v1/vf/stateful_messages/initiate_request</a></td></tr><tr><td valign="top">Stateful sport event</td><td valign="top">/stateful_messages/events/{event}/initiate_request</td><td valign="top"><a href="https://api.betradar.com/v1/vf/stateful_messages/events/vf:match:1234567/initiate_request">https://api.betradar.com/v1/vf/stateful_messages/events/vf:match:1234567/initiate_request</a></td></tr><tr><td valign="top">Recovery (after)</td><td valign="top"><p>/recovery/initiate_request</p><p>(With after parameter)</p></td><td valign="top"><a href="https://api.betradar.com/v1/vf/recovery/initiate_request&#x26;after=1462973515000">https://api.betradar.com/v1/vf/recovery/initiate_request&#x26;after=1462973515000</a></td></tr><tr><td valign="top">Recovery (full)</td><td valign="top">/recovery/initiate_request</td><td valign="top"><a href="https://api.betradar.com/v1/vf/recovery/initiate_request">https://api.betradar.com/v1/vf/recovery/initiate_request</a></td></tr></tbody></table>

## Subscription for Virtual Sports

To be able to receive messages in the UOF XML-feed, you must be subscribed to the feed. This is achieved by making a recovery request. Once the recovery request is successfully sent, you would receive messages within one minute.


---

# 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/games/virtual-sports/virtual-sports-via-unified-odds-feed-uof.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.
