> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rook.pm/llms.txt
> Use this file to discover all available pages before exploring further.

# Relationships and basket structure

> Explain implication, overlap and gaps within an explicit selection.

Rook compares when your selected outcomes pay. It does not infer statistical dependence from prices.

## Analyze your selection

```json theme={null}
{
  "selection": [
    {
      "outcome_id": "out_fed_dec_2026_cut_yes"
    },
    {
      "outcome_id": "out_fed_dec_2026_hold_yes"
    }
  ],
  "scenario_pins": [
    {
      "family_id": "fam_fed_dec_2026",
      "scenario_version": "1"
    }
  ],
  "include": [
    "PAIRS",
    "BASKET",
    "WITNESSES"
  ]
}
```

Send this body to [`POST /relationships:analyze`](/api-reference/analyze-relationships). The result includes relationships, basket findings, per-input coverage and the scenario versions used in the comparison.

## Pairwise and basket findings

Pairwise findings include equality, complement, implication, payout dominance, exclusivity and overlap. Each result explains which scenarios and settlement rules it covers.

A basket can be classified as `PARTITION`, `EXCLUSIVE`, `EXHAUSTIVE`, `OVERLAPPING` or `UNCOMPUTED`. Counts distinguish no outcome paying, exactly one paying and two or more paying. Duplicate canonical outcomes are deduplicated for these set statistics.

Witness references explain a gap, overlap or counterexample. `witness_limit` restricts returned examples, not the domain used to establish a finding.

## Counts have a denominator

Counts depend on the published scenario version and representation. They are not probabilities. A compressed payout group must not be presented as a raw scenario count. `POSITIVE_PAYOUT` and `FULL_PAYOUT` differ when fractional or void settlements are possible.

By default, incomplete coverage rejects the analysis. Explicit partial analysis describes only the supported subset; it cannot establish a conclusion for the whole selection.

## Discover related markets separately

[`GET /relationships`](/api-reference/list-relationships) can return neighbors outside your initial market. Select those outcomes explicitly before including them in calculations. Discovery does not expand an analytical request automatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.