# Bet Cancel

A *bet\_cancel* message is sent when a bet made on a particular market needs to be cancelled and refunded due to an error (which is different to a bet-settlement/refund).

A bet\_cancel can be sent for a market that has already been settled. This however only happens in rare circumstances when a market that should have been cancelled has been settled in error in a previous message

{% hint style="success" %}
A market status is only defined by *odds\_change* messages i.e. there is no reason to deactivate markets based on a *bet\_cancel* message if there is no indication for doing so in an *odds\_change* message.
{% endhint %}

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Description</strong></td></tr><tr><td><pre><code>event_id
</code></pre></td><td>The ID of the event this cancel bet is for.</td></tr><tr><td><pre><code>timestamp
</code></pre></td><td>When this event was generated (seconds since Epoch UTC).</td></tr><tr><td><pre><code>product
</code></pre></td><td>The producer that generated this message (1=LiveOdds, 2=MTS, 3=BetradarCtrl, 4=Betpal, 5=premium cricket).</td></tr><tr><td><pre><code>start_time
end_time
</code></pre></td><td>If start and end time are specified, they designate a range in time for which bets made should be cancelled. If there is an end_time but no start_time, this means cancel all bets placed before the specified time. If there is a start_time but no end_time this means, cancel all bets placed after the specified start_time.</td></tr><tr><td><pre><code>superceded_by
</code></pre></td><td>Used in rare cases for outright odds, if the original tournament season id was wrong, the old odds_changes are bet_cancelled and the new tournament season id is included in the superceded_by attribute. A client seeing this bet_cancel has at least two choices: 1) just ignore the superceded_by attribute completely and just process the bet_cancel as any betcancel (i.e. void bets placed if any) 2) if possible move placed bets to the new tournament season id.</td></tr><tr><td><pre><code>void_reason
</code></pre></td><td><p>Describes the reason for voiding certain outcomes for a particular market. Only set if at least one of the outcomes have a void_factor.</p><p><em>A list of void reasons can be found in the</em> <a href="/pages/YV2KV8Bkl2BVyv9RVSVN"><em>bet settlment page</em></a> <em>or by using the API at</em> <a href="https://iodocs.betradar.com/unifiedfeed"><em>https://iodocs.betradar.com/</em></a></p></td></tr></tbody></table>

**XML Example**

```xml
<bet_cancel end_time="1564598513000" event_id="sr:match:18941600" product="1" start_time="1564597838000" timestamp="1564602448841">
<market name="1st half - 1st goal" id="62" specifier="goalnr="1" void_reason="12"/>
</bet_cancel>
```


---

# 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/data-and-features/messages/event/bet-cancel.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.
