# Market contingency

Some markets are connected to each other and should not be possible to combine in a Pick'em bet. The most important factors here are the Player and Competitors/Teams parameters. If, for example, the same Player is involved, then Pick'em selections should not be possible to add together.&#x20;

With market contingency, the general recommended flow is as follows:

1. Player picks a market that has market contingency restrictions.&#x20;
2. UI should now disable/hide other markets that clash with the initial market.&#x20;
3. The same goes for every market the player picks after the first pick.&#x20;

#### **UI Behaviour Rules**

**Case 1:**

* `ContingencyKey` overlaps
* One side the `ContingencyScope` is empty, the other is not empty
* **Result:** Reject

**Case 2:**

* `ContingencyKey` overlaps
* `ContingencyScope` has overlapping Ids
* **Result:** Reject

**Case 3:**

* `ContingencyKey` overlaps
* Both `ContingencyScope` s are empty
* **Result:** Reject

**Case 4:**

* `ContingencyKey` overlaps
* `ContingencyScope` disjoint (no overlap) - both are not empty
* **Result:** Allow

**Case 5:**

* `ContingencyKey` is empty
* **Result:** Allow

#### **Examples**

Example 1

```javascript
{
Id: 1500,
Name: "Team2 total",
IsActive: true,
ContingencyKey: [1001-MT3-MT3, 1001-MT3-MT4],
ContingencyScope: [C1112],
Selections: {…},
}
```

```javascript
{
Id: 1501,
Name: "Team1 total",
IsActive: true,
ContingencyKey: [1001-MT4-MT4, 1001-MT3-MT4],
ContingencyScope: [C1112],
Selections: {…},
}
```

Market 1500 and 1501 can not be combined since they have overlapping values in ContingencyKey and ContingencyScope

***

Example 2

```javascript
{
Id: 1300,
Name: "Haso runs",
IsActive: true,
ContingencyKey: [1001-MT1-MT1, 1001-MT1-MT2],
ContingencyScope: [P112],
Selections: {…},
}
,
{
Id: 1301,
Name: "Kako runs",
IsActive: true,
ContingencyKey: [1001-MT1-MT1, 1001-MT1-MT2],
ContingencyScope: [P1113],
Selections: {…},
}
```

```javascript
{
Id: 1400,
Name: "Total",
IsActive: true,
ContingencyKey: [1001-MT2-MT2, 1001-MT1-MT2],
ContingencyScope: [],
Selections: {…},
}
```

If Market 1400 is selected, Markets 1300 and 1301 should be considered invalid in the betslip (or removed from the Selection Deck in the UI) because they share overlapping ContingencyKeys, and Market 1400 has an empty ContingencyScope, which implies it applies to all scopes

&#x20;

In another scenario,

Markets 1301 and 1302 can be combined and accepted for betting because, although they share overlapping ContingencyKeys, their ContingencyScopes contain non-overlapping values.

***

Example 3

```javascript
{
Id: 1500,
Name: "Team2 total",
IsActive: true,
ContingencyKey: [1001-MT3-MT3, 1001-MT2-MT3],
ContingencyScope: [C1112],
Selections: {…},
}
```

```javascript
{
Id: 1600,
Name: "Total",
IsActive: true,
ContingencyKey: [1001-MT2-MT2, 1001-MT2-MT3],
ContingencyScope: [],
Selections: {…},
}
```

Markets 1500 and 1600 cannot be combined because they have overlapping ContingencyKeys, and Market 1600 has an empty ContingencyScope, which applies to all scopes.

&#x20;

<br>


---

# 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.odds88.io/integration-process/recommended-integration-flow/optional-features/pickem-integration/market-contingency.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.
