# OnMarketSettlement

This message would be responsible in settling the outcome of the markets.

*MessageType: onmarketsettlement*

Here is a sample JSON payload on what you should expect to receive on your end:

<details>

<summary>Sample payload</summary>

```
{
    "sportId": 1005,
    "fixtureSpecifier": "vti:match:29014975",
    "selections": [
        {
            "marketTemplateId": "218",
            "marketSpecifier": "setnr=1\u0026gamenr=3\u0026pointnr=7",
            "selectionTemplateId": "4",
            "result": false,
            "voidFactor": 0,
            "deadHeatFactor": 1.0
        },
        {
            "marketTemplateId": "218",
            "marketSpecifier": "setnr=1\u0026gamenr=3\u0026pointnr=7",
            "selectionTemplateId": "5",
            "result": true,
            "voidFactor": 0,
            "deadHeatFactor": 1.0
        }
    ],
    "timeStampSent": 1710487390654,
    "timeStampReceived": 1710487390741,
    "raw": "\u003C?xml version=\u00221.0\u0022 encoding=\u0022UTF-8\u0022 standalone=\u0022yes\u0022?\u003E\u003Cbet_settlement certainty=\u00222\u0022 product=\u002212\u0022 event_id=\u0022vti:match:29014975\u0022 timestamp=\u00221710487390654\u0022\u003E\u003Coutcomes\u003E\u003Cmarket id=\u0022218\u0022 specifiers=\u0022setnr=1|gamenr=3|pointnr=7\u0022\u003E\u003Coutcome id=\u00224\u0022 result=\u00220\u0022/\u003E\u003Coutcome id=\u00225\u0022 result=\u00221\u0022/\u003E\u003C/market\u003E\u003C/outcomes\u003E\u003C/bet_settlement\u003E"
}
```

</details>

Properties:

| Name              | Type             | Description                                                                |
| ----------------- | ---------------- | -------------------------------------------------------------------------- |
| sportId           | int              | Unique id of a sport.                                                      |
| fixtureSpecifier  | string           | Unique id of the fixture.                                                  |
| selections        | List\<Selection> | See [Selection](#selection-model) for more details                         |
| timeStampSent     | long             | epoch timestamp on when the message was sent by the provider               |
| timeStampReceived | long             | epoch timestamp on when our service received the message from the provider |

### Selection Model

| Name                | Type       | Description                                                                                                                                                                 |
| ------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| marketTemplateId    | string     | Template id of the market                                                                                                                                                   |
| marketSpecifier     | string     | Unique market specifier                                                                                                                                                     |
| selectionTemplateId | string     | Template id of the selection.                                                                                                                                               |
| result              | bool       | <p>Determines the status of the selection<br><br>Go to the <a href="/pages/cG1Yw37G6LQEb6wNb7JV">Settlement Status </a>for more details</p>                                 |
| voidFactor          | VoidFactor | <p>Determines the status of the selection<br><br>Go to the <a href="/pages/cG1Yw37G6LQEb6wNb7JV">Settlement Status </a>for more details</p>                                 |
| deadHeatFactor      | decimal    | <p>Determines the number of selections won under a market.<br><br>Example:<br><br>1.00 - only one selection resulted to WON<br><br>.5 - two selections resulted to WON </p> |


---

# 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://flyingcockatoo.gitbook.io/odds-feed-documentation/odds-feed-integration/message-types/onmarketsettlement.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.
