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

# Resolve markets

> Translate a batch of native venue market identifiers into Rook IDs before requesting analytics. Each input requires venue and a unique client_reference. A venue_market_id alone resolves a market and returns its outcomes and listings; add venue_outcome_id to resolve one outcome side. Token IDs, or supported ticker/slug plus outcome forms, can resolve an individual listing.

For Polymarket, venue_market_id is the numeric market ID, encoded as decimal text. It is distinct from a numeric venue_event_id, a condition ID and a CLOB token ID. To look up an event, use /events with venue and venue_event_id. A market selector must never be populated with an event ID.

Each result echoes the native input and returns RESOLVED, UNRESOLVED or AMBIGUOUS. A resolved market includes market_id, market_version, event_ids, family_ids and outcomes; a resolved outcome also includes outcome_id, listing_id and mapping_version. Unknown or ambiguous inputs carry a reason and are never guessed. One failed item does not hide the results for other inputs. Use returned outcome/listing IDs in payouts, relationships and evaluations.

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


## OpenAPI

````yaml POST /markets:resolve
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:
  /markets:resolve:
    post:
      tags:
        - Reference data
      summary: Resolve markets
      description: >-
        Translate a batch of native venue market identifiers into Rook IDs
        before requesting analytics. Each input requires venue and a unique
        client_reference. A venue_market_id alone resolves a market and returns
        its outcomes and listings; add venue_outcome_id to resolve one outcome
        side. Token IDs, or supported ticker/slug plus outcome forms, can
        resolve an individual listing.


        For Polymarket, venue_market_id is the numeric market ID, encoded as
        decimal text. It is distinct from a numeric venue_event_id, a condition
        ID and a CLOB token ID. To look up an event, use /events with venue and
        venue_event_id. A market selector must never be populated with an event
        ID.


        Each result echoes the native input and returns RESOLVED, UNRESOLVED or
        AMBIGUOUS. A resolved market includes market_id, market_version,
        event_ids, family_ids and outcomes; a resolved outcome also includes
        outcome_id, listing_id and mapping_version. Unknown or ambiguous inputs
        carry a reason and are never guessed. One failed item does not hide the
        results for other inputs. Use returned outcome/listing IDs in payouts,
        relationships and evaluations.
      operationId: resolveMarkets
      parameters:
        - name: X-Client-Request-Id
          in: header
          required: false
          schema:
            type: string
          description: Caller correlation reference; not an idempotency guarantee.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveMarketsRequest'
            example:
              inputs:
                - client_reference: rfq_leg_1
                  venue: polymarket
                  venue_market_id: '1000001'
                - client_reference: rfq_leg_2
                  venue: polymarket
                  venue_market_id: '1000002'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveMarketsResponse'
              example:
                items:
                  - client_reference: rfq_leg_1
                    status: RESOLVED
                    market_id: mkt_fed_dec_2026_cut
                    market_version: '1'
                    input:
                      client_reference: rfq_leg_1
                      venue: polymarket
                      venue_market_id: '1000001'
                    event_ids:
                      - evt_pm_900001
                    family_ids:
                      - fam_fed_dec_2026
                    outcomes:
                      - outcome_id: out_fed_dec_2026_cut_yes
                        label: 'YES'
                        listings:
                          - listing_id: lst_pm_fed_dec_2026_cut_yes
                            venue: polymarket
                            venue_market_id: '1000001'
                            venue_outcome_id: 'YES'
                            outcome_id: out_fed_dec_2026_cut_yes
                            mapping_version: '1'
                            status: OPEN
                            trading_rules:
                              quantity_unit: shares
                              quote_currency: USDC
                              payout_currency: USDC
                              payout_unit: '1'
                              quantity_increment: '1'
                              tick_bands:
                                - lower_price: '0'
                                  upper_price: '1'
                                  tick_size: '0.01'
                            observed_at: '2026-10-19T12:00:00Z'
                            venue_event_ids:
                              - '900001'
                      - outcome_id: out_fed_dec_2026_cut_no
                        label: 'NO'
                        listings: []
                  - client_reference: rfq_leg_2
                    status: RESOLVED
                    market_id: mkt_fed_dec_2026_hold
                    market_version: '1'
                    input:
                      client_reference: rfq_leg_2
                      venue: polymarket
                      venue_market_id: '1000002'
                    event_ids:
                      - evt_pm_900002
                    family_ids:
                      - fam_fed_dec_2026
                    outcomes:
                      - outcome_id: out_fed_dec_2026_hold_yes
                        label: 'YES'
                        listings: []
                      - outcome_id: out_fed_dec_2026_hold_no
                        label: 'NO'
                        listings: []
                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:
    ResolveMarketsRequest:
      type: object
      properties:
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/ResolveInput'
          minItems: 1
          description: >-
            One or more native identifier tuples; unique client_reference per
            tuple. Each returns a status-bearing mapping result.
      required:
        - inputs
      additionalProperties: false
    ResolveMarketsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ResolvedInput'
        as_of:
          type: string
          format: date-time
      required:
        - items
        - as_of
      additionalProperties: true
    ResolveInput:
      type: object
      properties:
        client_reference:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        venue:
          type: string
          description: >-
            Venue identifier, such as polymarket or kalshi. Required when
            looking up a venue-native ID; never inferred from the ID.
        venue_market_id:
          type: string
          description: >-
            Original venue market ID. For Polymarket this is its numeric Gamma
            market ID, encoded as decimal text. It is not an event, condition or
            CLOB token ID.
          minLength: 1
        venue_outcome_id:
          type: string
          description: >-
            Original outcome selector on the venue, such as YES or NO. Selects a
            side within the native market; distinct from a Rook outcome_id.
          minLength: 1
        token_id:
          type: string
          description: >-
            Native outcome token ID. Polymarket CLOB token IDs are large decimal
            strings and must never pass through a floating-point number.
          minLength: 1
        ticker:
          type: string
        slug:
          type: string
      required:
        - client_reference
        - venue
      additionalProperties: false
      description: >-
        Supply venue and at least one exact native identity form. A
        venue_market_id alone resolves the whole market; add venue_outcome_id to
        select a side. Token, ticker+outcome and slug+outcome forms select an
        individual listing. If multiple forms are provided they must identify
        the same source record or fail validation. Unknown/ambiguous mappings
        are not guessed. Event IDs belong in
        /events?venue=...&venue_event_id=..., never venue_market_id.
      anyOf:
        - required:
            - venue_market_id
        - required:
            - token_id
        - required:
            - ticker
            - venue_outcome_id
        - required:
            - slug
            - venue_outcome_id
      allOf:
        - if:
            properties:
              venue:
                const: polymarket
            required:
              - venue
          then:
            properties:
              venue_market_id:
                pattern: ^[0-9]+$
    ResolvedInput:
      type: object
      properties:
        client_reference:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        status:
          type: string
          enum:
            - RESOLVED
            - UNRESOLVED
            - AMBIGUOUS
          description: >-
            Filter by the resource lifecycle status. This does not indicate
            analytical coverage or feed freshness.
        market_id:
          type: string
          description: >-
            Rook canonical market ID. Resolve a venue_market_id first; related
            markets do not share an ID merely because they share a family.
          minLength: 1
        market_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        outcome_id:
          type: string
          description: Rook outcome ID identifying one payout side, such as YES or NO.
          minLength: 1
        listing_id:
          type: string
          description: Rook ID identifying one outcome listing on a particular venue.
          minLength: 1
        mapping_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        reason_code:
          type: string
        reason:
          type: string
        input:
          $ref: '#/components/schemas/ResolveInput'
          description: Original native selector echoed unchanged.
        event_ids:
          type: array
          items:
            type: string
            description: >-
              Rook ID for one original venue event. Its identity is scoped to
              venue and venue_event_id; related events remain separate.
            minLength: 1
          description: >-
            Rook IDs of the original venue events containing these markets or
            listings. Family membership never rewrites event membership.
        family_ids:
          type: array
          items:
            type: string
            minLength: 1
            description: >-
              Rook family ID connecting related markets across original venue
              events.
          description: >-
            Rook family memberships for this resource, or family IDs to scope a
            change feed. Preserve all returned memberships.
        outcomes:
          type: array
          items:
            $ref: '#/components/schemas/Outcome'
      required:
        - client_reference
        - status
        - input
      additionalProperties: true
      allOf:
        - if:
            properties:
              status:
                const: RESOLVED
          then:
            required:
              - market_id
              - market_version
              - event_ids
              - family_ids
              - outcomes
          else:
            required:
              - reason_code
              - reason
        - if:
            properties:
              status:
                const: RESOLVED
              input:
                anyOf:
                  - required:
                      - venue_outcome_id
                  - required:
                      - token_id
            required:
              - status
              - input
          then:
            required:
              - outcome_id
              - listing_id
              - mapping_version
    Outcome:
      type: object
      properties:
        outcome_id:
          type: string
          description: Rook outcome ID identifying one payout side, such as YES or NO.
          minLength: 1
        label:
          type: string
        listings:
          type: array
          items:
            $ref: '#/components/schemas/Listing'
      required:
        - outcome_id
        - label
        - listings
      additionalProperties: true
    Listing:
      type: object
      properties:
        listing_id:
          type: string
          description: Rook ID identifying one outcome listing on a particular venue.
          minLength: 1
        venue:
          type: string
          description: >-
            Venue identifier, such as polymarket or kalshi. Required when
            looking up a venue-native ID; never inferred from the ID.
        venue_market_id:
          type: string
          description: >-
            Original venue market ID. For Polymarket this is its numeric Gamma
            market ID, encoded as decimal text. It is not an event, condition or
            CLOB token ID.
          minLength: 1
        venue_outcome_id:
          type: string
          description: >-
            Original outcome selector on the venue, such as YES or NO. Selects a
            side within the native market; distinct from a Rook outcome_id.
          minLength: 1
        token_id:
          anyOf:
            - type: string
              description: Opaque text identifier. Preserve its exact value.
              minLength: 1
            - type: 'null'
        outcome_id:
          type: string
          description: Rook outcome ID identifying one payout side, such as YES or NO.
          minLength: 1
        mapping_version:
          type: string
          description: Opaque text identifier. Preserve its exact value.
          minLength: 1
        status:
          type: string
          enum:
            - OPEN
            - HALTED
            - CLOSED
            - DISPUTED
            - RESOLVED
            - UNKNOWN
          description: >-
            Filter by the resource lifecycle status. This does not indicate
            analytical coverage or feed freshness.
        ticker:
          anyOf:
            - type: string
            - type: 'null'
        slug:
          anyOf:
            - type: string
            - type: 'null'
        venue_url:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        trading_rules:
          $ref: '#/components/schemas/TradingRules'
        listed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        opens_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        closes_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        settled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        source_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        observed_at:
          type: string
          format: date-time
        venue_event_ids:
          type: array
          items:
            type: string
            minLength: 1
            description: >-
              Original venue event ID. For Polymarket this is its numeric Gamma
              event ID, encoded as decimal text. It is not a market ID.
          description: >-
            Original event IDs reported by this listing’s venue. Preserved per
            listing so canonicalization cannot erase source event membership.
      required:
        - listing_id
        - venue
        - venue_market_id
        - venue_event_ids
        - venue_outcome_id
        - outcome_id
        - mapping_version
        - status
        - trading_rules
        - observed_at
      additionalProperties: true
      allOf:
        - if:
            properties:
              venue:
                const: polymarket
            required:
              - venue
          then:
            properties:
              venue_market_id:
                pattern: ^[0-9]+$
              venue_event_ids:
                items:
                  pattern: ^[0-9]+$
    TradingRules:
      type: object
      properties:
        quantity_unit:
          type: string
        quote_currency:
          type: string
        payout_currency:
          type: string
        payout_unit:
          $ref: '#/components/schemas/ExactValue'
        minimum_quantity:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
        minimum_notional:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
        quantity_increment:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
        tick_bands:
          type: array
          items:
            type: object
            properties:
              lower_price:
                $ref: '#/components/schemas/Decimal'
              upper_price:
                $ref: '#/components/schemas/Decimal'
              tick_size:
                $ref: '#/components/schemas/Decimal'
            required:
              - lower_price
              - upper_price
              - tick_size
            additionalProperties: false
        fee_schedule_id:
          anyOf:
            - type: string
              description: Opaque text identifier. Preserve its exact value.
              minLength: 1
            - type: 'null'
      required:
        - quantity_unit
        - quote_currency
        - payout_currency
        - payout_unit
      additionalProperties: true
    ExactValue:
      oneOf:
        - $ref: '#/components/schemas/Decimal'
        - type: object
          properties:
            numerator:
              type: string
              pattern: ^-?(0|[1-9][0-9]*)$
            denominator:
              type: string
              pattern: ^[1-9][0-9]*$
          required:
            - numerator
            - denominator
          additionalProperties: false
      description: >-
        Exact calculation value: finite decimal string, or reduced rational with
        positive denominator. Never round a repeating rational to pretend it is
        exact.
    Decimal:
      type: string
      description: >-
        Exact base-10 value encoded as a string; no exponent or non-finite
        values.
      pattern: ^-?(0|[1-9][0-9]*)(\.[0-9]+)?$
  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.