> ## 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.

# Discover relationships

> Discover markets connected by settlement logic to a known market, outcome or original venue event. Supply exactly one Rook selector: market_id, outcome_id or event_id. For a native ID, first obtain the Rook ID from /events, /markets or /markets:resolve.

Results explain relationships such as implication or exclusivity and identify the related market and original event IDs. Related markets may belong to different venue events. Discovery preserves both events and exposes their connection through families and relationships. Optional type and related_venue filters narrow results; family_id and scenario_version must be supplied together.

Use this endpoint to discover neighbors. To analyze a specific basket, explicitly select its outcomes and call /relationships:analyze; discovered neighbors are not automatically included in calculations.

See the [integration guide](/guides/relationships) for the workflow and interpretation of this response.


## OpenAPI

````yaml GET /relationships
openapi: 3.1.0
info:
  title: Rook API
  version: 0.1.0-design
  description: Markets, settlement relationships, scenarios, payouts and market data.
servers:
  - url: https://api.rook.pm/v1
    description: Proposed API origin; not an assertion these operations are callable.
security:
  - ApiKeyBearer: []
tags:
  - name: Reference data
    description: Events, unified markets and native-ID resolution.
  - name: Families and scenarios
    description: Family scope and versioned scenario columns.
  - name: Relationships and Combos
    description: Related-market discovery, selected-set inference and Combo interpretation.
  - name: Payouts and exposure
    description: Scoped per-unit payouts and stateless portfolio/candidate calculations.
  - name: Market data
    description: Current prices, history, L2 books, prints, statistics and published fees.
  - name: Fair values
    description: Future private customer estimates; not Rook forecasts.
  - name: Coverage and updates
    description: Supported capabilities and incremental semantic changes.
paths:
  /relationships:
    get:
      tags:
        - Relationships and Combos
      summary: Discover relationships
      description: >-
        Discover markets connected by settlement logic to a known market,
        outcome or original venue event. Supply exactly one Rook selector:
        market_id, outcome_id or event_id. For a native ID, first obtain the
        Rook ID from /events, /markets or /markets:resolve.


        Results explain relationships such as implication or exclusivity and
        identify the related market and original event IDs. Related markets may
        belong to different venue events. Discovery preserves both events and
        exposes their connection through families and relationships. Optional
        type and related_venue filters narrow results; family_id and
        scenario_version must be supplied together.


        Use this endpoint to discover neighbors. To analyze a specific basket,
        explicitly select its outcomes and call /relationships:analyze;
        discovered neighbors are not automatically included in calculations.
      operationId: listRelationships
      parameters:
        - name: market_id
          in: query
          required: false
          description: >-
            Rook canonical market ID. Resolve a venue_market_id first; related
            markets do not share an ID merely because they share a family.
            Narrows the selection to this resource.
          schema:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
          example: mkt_fed_dec_2026_cut
        - name: outcome_id
          in: query
          required: false
          description: Rook outcome ID identifying one payout side, such as YES or NO.
          schema:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
        - name: event_id
          in: query
          required: false
          description: >-
            Rook ID for one original venue event. Its identity is scoped to
            venue and venue_event_id; related events remain separate. Narrows
            the selection to this resource.
          schema:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
        - name: family_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            Rook family ID connecting related markets across original venue
            events. Narrows the selection to this resource.
        - name: type
          in: query
          required: false
          description: >-
            Filter by a supported settlement relationship type, such as
            implication or exclusivity.
          schema:
            $ref: '#/components/schemas/RelationType'
        - name: related_venue
          in: query
          required: false
          description: >-
            Only return discovered neighbors with listings on this venue; does
            not change the starting selection.
          schema:
            type: string
        - name: scenario_version
          in: query
          required: false
          description: >-
            Published family scenario-catalog version. Use together with
            family_id to pin scenario meaning.
          schema:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
        - name: page_size
          in: query
          required: false
          description: >-
            Requested maximum items; service caps disclosed by coverage.
            Oversize requests fail explicitly.
          schema:
            type: integer
            minimum: 1
            default: 50
        - name: page_token
          in: query
          required: false
          description: >-
            Opaque continuation; reuse the same filters/order. Cursor pins the
            original snapshot.
          schema:
            type: string
        - name: X-Client-Request-Id
          in: header
          required: false
          schema:
            type: string
          description: Caller correlation reference; not an idempotency guarantee.
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRelationshipsResponse'
              example:
                items:
                  - relationship_id: rel_fed_cut_hold_exclusive
                    type: EXCLUSIVITY
                    from_outcome_id: out_fed_dec_2026_cut_yes
                    to_outcome_id: out_fed_dec_2026_hold_yes
                    related_market_ids:
                      - mkt_fed_dec_2026_cut
                      - mkt_fed_dec_2026_hold
                    related_event_ids:
                      - evt_pm_900001
                      - evt_pm_900002
                    explanation: >-
                      The same Fed decision cannot both lower the policy rate
                      and leave it unchanged. The two YES outcomes never pay
                      together in these scenarios.
                    scenario_pins:
                      - family_id: fam_fed_dec_2026
                        scenario_version: '1'
                    witnesses:
                      - family_id: fam_fed_dec_2026
                        scenario_version: '1'
                        scenario_id: scn_cut
                      - family_id: fam_fed_dec_2026
                        scenario_version: '1'
                        scenario_id: scn_hold
                next_page_token: null
                snapshot_id: snap_rates_20261019_120000
                as_of: '2026-10-19T12:00:00Z'
          headers:
            X-Request-Id:
              description: Server request trace ID.
              schema:
                type: string
                description: Opaque text identifier. Preserve its exact value.
                minLength: 1
components:
  schemas:
    RelationType:
      type: string
      enum:
        - EQUALITY
        - COMPLEMENT
        - IMPLICATION
        - EXCLUSIVITY
        - OVERLAP
    ListRelationshipsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Relationship'
        next_page_token:
          anyOf:
            - type: string
            - type: 'null'
        snapshot_id:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        as_of:
          type: string
          format: date-time
      required:
        - items
        - next_page_token
        - snapshot_id
        - as_of
      additionalProperties: true
    Relationship:
      type: object
      properties:
        relationship_id:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        type:
          $ref: '#/components/schemas/RelationType'
        from_outcome_id:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        to_outcome_id:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        related_market_ids:
          type: array
          items:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
        related_event_ids:
          type: array
          items:
            type: string
            description: Opaque text identifier. Preserve its exact value.
            minLength: 1
        explanation:
          type: string
        scenario_pins:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioPin'
        witnesses:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioColumn'
        evidence:
          type: array
          items:
            $ref: '#/components/schemas/Evidence'
      required:
        - relationship_id
        - type
        - from_outcome_id
        - to_outcome_id
        - explanation
        - scenario_pins
        - witnesses
      additionalProperties: true
    ScenarioPin:
      type: object
      properties:
        family_id:
          type: string
          minLength: 1
          description: >-
            Rook family ID connecting related markets across original venue
            events.
        scenario_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
      required:
        - family_id
        - scenario_version
      additionalProperties: false
    ScenarioColumn:
      oneOf:
        - $ref: '#/components/schemas/ScenarioRef'
        - $ref: '#/components/schemas/JointScenarioRef'
    Evidence:
      type: object
      properties:
        source_url:
          type: string
          format: uri
        passage:
          type: string
        captured_at:
          type: string
          format: date-time
        rule_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
      required:
        - source_url
        - rule_version
      additionalProperties: true
    ScenarioRef:
      type: object
      properties:
        family_id:
          type: string
          minLength: 1
          description: >-
            Rook family ID connecting related markets across original venue
            events.
        scenario_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        scenario_id:
          type: string
          minLength: 1
          description: Rook scenario ID within its family and published scenario version.
      required:
        - family_id
        - scenario_version
        - scenario_id
      additionalProperties: false
    JointScenarioRef:
      type: object
      properties:
        components:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioRef'
          minItems: 2
      required:
        - components
      additionalProperties: false
      description: >-
        Compatible tuple of Rook family scenario references; components have
        distinct family/version scopes.
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: >-
        Proposed server-to-server API key. No client request HMAC signing scheme
        is specified.

````

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