components:
  headers:
    Retry-After:
      description: Seconds to wait before retrying (429 responses).
      schema:
        format: int32
        type: integer
    X-RateLimit-Limit:
      description: Requests allowed in the current window for this caller.
      schema:
        format: int32
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in the current window for this caller.
      schema:
        format: int32
        type: integer
    X-Request-Id:
      description: Unique id for this request; echoed in error.request_id.
      schema:
        type: string
  parameters:
    Cursor:
      description: |
        Opaque pagination cursor from a previous next_cursor. Bound to the
        operation and its query filters (not limit). Tampered, malformed,
        foreign-route or foreign-query cursors are 400 invalid_request with
        no detail.
      in: query
      name: cursor
      schema:
        type: string
    Limit:
      description: |
        Page size (ARCHITECTURE 9.4). Default 100, maximum 1,000. May change
        between pages; the cursor does not bind to limit.
      in: query
      name: limit
      schema:
        default: 100
        maximum: 1000
        minimum: 1
        type: integer
  responses:
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: |
        forbidden_plan: the plan does not allow this request, and error.plan
        names the unlocking plan. blocked: the data policy withholds this
        venue's data, and error.block_reason_code says why.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    ForbiddenPlan:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Plan does not allow this request; error.plan names the unlocking plan
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    Internal:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Internal error; message never leaks internals
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    InvalidRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Bad request (validation, 11th active key, etc.)
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Resource not found
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Missing or invalid session (or API key on data routes)
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
  schemas:
    Candle:
      properties:
        close:
          description: Last trade price in the bucket, derived for readers.
          format: double
          type: number
        decimals:
          description: Scale of volume_raw in venue units.
          format: int32
          type: integer
        high:
          description: Highest trade price in the bucket, derived for readers.
          format: double
          type: number
        low:
          description: Lowest trade price in the bucket, derived for readers.
          format: double
          type: number
        market_id:
          description: Venue-native market identifier.
          type: string
        open:
          description: First trade price in the bucket, derived for readers.
          format: double
          type: number
        res:
          description: 'Candle bucket size: 1m, 1h or 1d.'
          enum:
            - 1m
            - 1h
            - 1d
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        token_id:
          description: Token or outcome identifier for this series.
          type: string
        trades:
          description: Number of trades in the bucket.
          format: int64
          type: integer
        ts:
          description: Bucket start time, UTC.
          format: date-time
          type: string
        venue:
          description: Venue key that owns this market.
          type: string
        volume:
          description: Sum of trade size in the bucket, derived for readers.
          format: double
          type: number
        volume_raw:
          description: Exact sum of size_raw in the bucket.
          format: int64
          type: integer
      required:
        - venue
        - market_id
        - token_id
        - res
        - ts
        - open
        - high
        - low
        - close
        - volume
        - volume_raw
        - decimals
        - trades
        - schema_version
      type: object
    CandleList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Candle'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    ErrorBody:
      properties:
        block_reason_code:
          description: |
            Set on blocked: why the data policy withholds this venue's data
            (licence_undecided, licence_derived_only or geo_policy). Null
            otherwise.
          nullable: true
          type: string
        code:
          $ref: '#/components/schemas/ErrorCode'
        docs_url:
          description: Link to the docs error page for this code.
          format: uri
          type: string
        message:
          description: Plain sentence saying what to do.
          type: string
        plan:
          allOf:
            - $ref: '#/components/schemas/PlanId'
          description: |
            Set on forbidden_plan: the plan that unlocks the request. Null
            otherwise.
          nullable: true
        request_id:
          description: Same value as the X-Request-Id response header.
          type: string
        resets_at:
          description: |
            Set on quota_exceeded: UTC time when the monthly quota resets.
            Null otherwise.
          format: date-time
          nullable: true
          type: string
        upgrade_url:
          description: |
            Set on quota_exceeded: URL for upgrading the plan. Null otherwise.
          format: uri
          nullable: true
          type: string
      required:
        - code
        - message
        - docs_url
        - request_id
      type: object
    ErrorCode:
      description: Machine-readable error code (ARCHITECTURE 9.5).
      enum:
        - unauthorized
        - forbidden_plan
        - blocked
        - not_found
        - invalid_request
        - rate_limited
        - quota_exceeded
        - internal
      type: string
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      type: object
    Fee:
      properties:
        category:
          description: Category this schedule covers, or asterisk for all.
          type: string
        effective_from:
          description: Start of the period this schedule is in force, UTC.
          format: date-time
          type: string
        effective_to:
          description: End of the period this schedule is in force, UTC. Null means open-ended.
          format: date-time
          nullable: true
          type: string
        formula:
          description: Fee formula.
          enum:
            - quadratic
            - complement
            - flat_bps
            - zero
          type: string
        maker_rebate_params:
          additionalProperties:
            format: int64
            type: integer
          description: Maker rebate parameters in micro-units keyed by name.
          type: object
        min_fee_micros:
          description: Minimum fee in micro-units when the venue sets one.
          format: int64
          nullable: true
          type: integer
        rounding:
          description: Rounding mode.
          enum:
            - none
            - up
            - down
            - nearest
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        source_url:
          description: Public URL of the fee schedule this row was taken from.
          type: string
        taker_params:
          additionalProperties:
            format: int64
            type: integer
          description: Taker fee parameters in micro-units keyed by name.
          type: object
        venue:
          description: Venue key this fee schedule applies to.
          type: string
      required:
        - venue
        - category
        - effective_from
        - formula
        - taker_params
        - maker_rebate_params
        - rounding
        - source_url
        - schema_version
      type: object
    FeeList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Fee'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    Fill:
      properties:
        block_number:
          description: Block number when known. Null when the venue has no blocks.
          format: int64
          nullable: true
          type: integer
        block_reason_code:
          description: |
            Why fields are withheld: licence_undecided, licence_derived_only or
            geo_policy. Null when blocked is false.
          nullable: true
          type: string
        blocked:
          description: |
            True when the data policy withholds some of this row's fields for
            this request. Those fields are null and block_reason_code says why.
          type: boolean
        contract_version:
          description: Venue contract version such as v1, v2 or v3; for polymarket the V1 exchanges, the CTF V2 exchanges and ExchangeV3.
          type: string
        decimals:
          description: Scale of the raw size and notional columns.
          format: int32
          type: integer
        fee_raw:
          description: Exact fee in venue raw units when known.
          format: int64
          nullable: true
          type: integer
        leg:
          description: 'Match leg: maker or taker.'
          enum:
            - maker
            - taker
          type: string
        log_index:
          description: Log index on chain, or the venue trade sequence when there is no log.
          format: int64
          type: integer
        maker:
          description: Maker address when published.
          type: string
        market_id:
          description: Venue-native market identifier.
          type: string
        match_model:
          description: 'How the trade was matched: clob for an order book match, amm for a trade against an automated market maker pool, where the row is the whole trade with the pool as maker. Rows written before 1.2.0 are clob.'
          enum:
            - amm
            - clob
          type: string
        notional_raw:
          description: Exact notional in venue raw units.
          format: int64
          type: integer
        price:
          description: |
            Derived convenience price equal to notional_raw divided by size_raw.
            Null when the data policy withholds it (blocked is true).
          format: double
          nullable: true
          type: number
        schema_version:
          description: Data schema version for this row.
          type: string
        side:
          description: Buy or sell from the taker view.
          enum:
            - buy
            - sell
          type: string
        size_raw:
          description: Exact size in venue raw units.
          format: int64
          type: integer
        taker:
          description: Taker address when published.
          type: string
        token_id:
          description: Token or outcome identifier for this fill.
          type: string
        ts:
          description: Fill time from the block or venue clock, UTC.
          format: date-time
          type: string
        tx_hash:
          description: Transaction hash of the fill. Part of its identity with venue and log_index.
          type: string
        venue:
          description: Venue key that owns this market.
          type: string
      required:
        - venue
        - market_id
        - token_id
        - ts
        - tx_hash
        - log_index
        - leg
        - side
        - size_raw
        - notional_raw
        - decimals
        - price
        - maker
        - taker
        - contract_version
        - match_model
        - schema_version
        - blocked
        - block_reason_code
      type: object
    FillList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Fill'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    Market:
      properties:
        block_reason_code:
          description: |
            Why fields are withheld: licence_undecided, licence_derived_only or
            geo_policy. Null when blocked is false.
          nullable: true
          type: string
        blocked:
          description: |
            True when the data policy withholds some of this row's fields for
            this request. Those fields are null and block_reason_code says why.
          type: boolean
        category:
          description: Venue category label when present.
          nullable: true
          type: string
        close_at:
          description: Time the market closed for trading, UTC.
          format: date-time
          nullable: true
          type: string
        first_trade_at:
          description: Time of the first known trade, UTC.
          format: date-time
          nullable: true
          type: string
        last_trade_at:
          description: Time of the latest known trade, UTC.
          format: date-time
          nullable: true
          type: string
        market_id:
          description: Venue-native market identifier.
          type: string
        open_at:
          description: Time the market opened for trading, UTC.
          format: date-time
          nullable: true
          type: string
        outcomes:
          description: Selectable outcomes with labels and token ids.
          items:
            $ref: '#/components/schemas/Outcome'
          type: array
        quality_flags:
          description: Quality markers such as volume_quality_flagged.
          items:
            type: string
          type: array
        question:
          description: Market question text as published by the venue.
          nullable: true
          type: string
        rules_hash:
          description: |
            Hash of rules_text used to detect rule changes. Null when the data
            policy withholds rules_text.
          nullable: true
          type: string
        rules_text:
          description: Full resolution rules text when available.
          nullable: true
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        slug:
          description: Short public slug when the venue publishes one.
          nullable: true
          type: string
        source_kind:
          description: Source that supplied the market text.
          enum:
            - chain
            - venue_api
            - bulk_dataset
          type: string
        status:
          description: Life-cycle status of the market.
          enum:
            - open
            - closed
            - resolved
            - voided
          type: string
        updated_at:
          description: Time this row was last updated, UTC.
          format: date-time
          type: string
        venue:
          description: Venue key that owns this market.
          type: string
        venue_event_id:
          description: |
            The venue's own grouping key for sibling markets, when it
            publishes one: for Polymarket the neg-risk market id of a
            neg-risk group, else the Gamma event id. Not a Skewtape matched
            event id.
          nullable: true
          type: string
      required:
        - venue
        - market_id
        - outcomes
        - status
        - source_kind
        - quality_flags
        - schema_version
        - updated_at
        - blocked
        - block_reason_code
      type: object
    MarketList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Market'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    MatchedEvent:
      properties:
        category:
          description: Category of the event.
          nullable: true
          type: string
        confidence:
          description: Overall confidence, the minimum pairwise_confidence of active members.
          format: double
          maximum: 1
          minimum: 0
          type: number
        event_id:
          description: Stable matched event identifier.
          example: st_evt_00412
          pattern: ^st_evt_\d{5,}$
          type: string
        members:
          description: Member markets, nested. member_count and venue_count count active members and are derived, not stored.
          items:
            $ref: '#/components/schemas/MatchedEventMember'
          minItems: 2
          type: array
        method_version:
          description: Version of the matching method used for this matched event.
          type: string
        question_canonical:
          description: Canonical question this matched event stands for.
          type: string
        resolution_equal:
          description: True only if all active members resolve identically.
          type: boolean
        resolution_source:
          description: Source text the event resolves on.
          nullable: true
          type: string
        resolves_at:
          description: Expected resolution time, UTC.
          format: date-time
          nullable: true
          type: string
        reviewed_at:
          description: Time of the review decision, UTC.
          format: date-time
          type: string
        reviewer:
          description: Name or id of the reviewer who approved this matched event.
          type: string
        reviewer_notes:
          description: Full reviewer notes. Available on Pro and above plans.
          nullable: true
          type: string
        rule_note:
          description: Plain-words note on rule differences. Required when resolution_equal is false.
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        status:
          description: Review status of the matched event.
          enum:
            - approved
            - needs_rereview
            - retired
          type: string
        updated_at:
          description: Time this matched event row was last updated, UTC.
          format: date-time
          type: string
      required:
        - event_id
        - question_canonical
        - confidence
        - resolution_equal
        - rule_note
        - reviewer
        - reviewed_at
        - status
        - method_version
        - schema_version
        - updated_at
        - members
      type: object
    MatchedEventList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/MatchedEvent'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    MatchedEventMember:
      properties:
        block_reason_code:
          description: |
            Why this member's data is withheld: licence_undecided,
            licence_derived_only or geo_policy. Null when blocked is false.
          nullable: true
          type: string
        blocked:
          description: |
            True when the data policy withholds this member venue's data for
            this request. The member ids stay, its venue labels are null, its
            outcome_map is empty and block_reason_code says why. Event-level
            fields are never withheld.
          type: boolean
        market_id:
          description: Venue-native market identifier of this member.
          type: string
        outcome_map:
          additionalProperties:
            type: string
          description: Map from this member outcome to the matching outcome on other members.
          type: object
        pairwise_confidence:
          description: The weakest pairwise edge touching this member.
          format: double
          maximum: 1
          minimum: 0
          type: number
        resolution_equal_with:
          description: Keys (venue:market_id) of members that resolve the same as this one.
          items:
            type: string
          type: array
        rule_variant_notes:
          description: How this member's rules differ from the others.
          nullable: true
          type: string
        side_no_label:
          description: Venue label for the no side. Binary markets only.
          nullable: true
          type: string
        side_yes_label:
          description: Venue label for the yes side. Binary markets only.
          nullable: true
          type: string
        status:
          description: Whether this member participates in confidence and resolution_equal.
          enum:
            - active
            - inactive
          type: string
        venue:
          description: Venue key of this member market.
          type: string
      required:
        - venue
        - market_id
        - outcome_map
        - pairwise_confidence
        - resolution_equal_with
        - status
        - blocked
        - block_reason_code
      type: object
    NextCursor:
      description: |
        Opaque cursor for the next page, or null when there is no further page
        (ARCHITECTURE 9.4). Pass as the cursor query parameter.
      nullable: true
      type: string
    Outcome:
      properties:
        label:
          description: Outcome label as shown by the venue.
          type: string
        token_id:
          description: Venue token or outcome identifier.
          type: string
      required:
        - label
        - token_id
      type: object
    Pair:
      properties:
        confidence:
          description: Match confidence from 0 to 1.
          format: double
          maximum: 1
          minimum: 0
          type: number
        members:
          description: The two active member markets.
          items:
            $ref: '#/components/schemas/PairMember'
          maxItems: 2
          minItems: 2
          type: array
        method_version:
          description: Version of the matching method used for this pair.
          type: string
        pair_id:
          description: |
            Identifier of the two-member matched event. Carries the event_id
            value (st_evt_...). TODO(decision): whether pair_id keeps a
            distinct st_pair_ form (ARCHITECTURE 9.1).
          example: st_evt_00412
          type: string
        resolution_equal:
          description: True when member venues would settle the same question the same way.
          type: boolean
        reviewed_at:
          description: Time of the review decision, UTC.
          format: date-time
          type: string
        reviewer:
          description: Name or id of the reviewer who approved this pair.
          type: string
        reviewer_notes:
          description: Full reviewer notes. Available on Pro and above plans.
          nullable: true
          type: string
        rule_note:
          description: Plain-words note on rule differences. Required when resolution_equal is false.
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        status:
          description: Pair status.
          enum:
            - approved
            - needs_rereview
            - retired
          type: string
        updated_at:
          description: Time this pair row was last updated, UTC.
          format: date-time
          type: string
      required:
        - pair_id
        - confidence
        - resolution_equal
        - rule_note
        - reviewer
        - reviewed_at
        - status
        - method_version
        - schema_version
        - updated_at
        - members
      type: object
    PairList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Pair'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    PairMember:
      properties:
        block_reason_code:
          description: |
            Why this member's data is withheld: licence_undecided,
            licence_derived_only or geo_policy. Null when blocked is false.
          nullable: true
          type: string
        blocked:
          description: |
            True when the data policy withholds this member venue's data for
            this request. The member ids stay, its outcome_map is empty and
            block_reason_code says why.
          type: boolean
        market_id:
          description: Venue-native market identifier of this member.
          type: string
        outcome_map:
          additionalProperties:
            type: string
          description: Map from this member outcome to the matching outcome on the other side.
          type: object
        venue:
          description: Venue key of this member market.
          type: string
      required:
        - venue
        - market_id
        - outcome_map
        - blocked
        - block_reason_code
      type: object
    PlanId:
      description: |
        Machine-readable plan id (ARCHITECTURE 9.2; no Team: enterprise is
        custom contracts). Display names live in the dashboard.
      enum:
        - free
        - history
        - builder
        - pro
      type: string
    Resolution:
      properties:
        created_at:
          description: Time this event row was recorded, UTC.
          format: date-time
          type: string
        event_type:
          description: Resolution step.
          enum:
            - pending
            - proposed
            - disputed
            - reset
            - resolved
            - reversed
            - voided
          type: string
        is_current:
          description: True when this event is the current state of the market.
          type: boolean
        market_id:
          description: Venue-native market identifier.
          type: string
        outcome:
          description: Outcome label when this event sets or proposes one.
          nullable: true
          type: string
        resolved_at:
          description: Time associated with this resolution step, UTC.
          format: date-time
          nullable: true
          type: string
        schema_version:
          description: Data schema version for this row.
          type: string
        seq:
          description: Order of events for this market.
          format: int32
          type: integer
        source_kind:
          description: Source of this event.
          enum:
            - chain
            - venue_api
            - bulk_dataset
          type: string
        source_ref:
          description: Transaction hash or API reference for this event.
          nullable: true
          type: string
        source_text:
          description: Source text that explains the resolution step.
          nullable: true
          type: string
        venue:
          description: Venue key that owns this market.
          type: string
      required:
        - venue
        - market_id
        - seq
        - event_type
        - source_kind
        - is_current
        - schema_version
        - created_at
      type: object
    ResolutionList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Resolution'
          type: array
        next_cursor:
          $ref: '#/components/schemas/NextCursor'
      required:
        - data
        - next_cursor
      type: object
    Venue:
      properties:
        beta:
          description: True when the venue is still in beta.
          type: boolean
        coverage:
          $ref: '#/components/schemas/VenueCoverage'
        flags:
          description: Venue flags from venue_config.
          items:
            type: string
          type: array
        key:
          description: Venue key.
          type: string
        rights:
          description: Effective rights and history_from per kind.
          items:
            $ref: '#/components/schemas/VenueKindRights'
          type: array
      required:
        - key
        - beta
        - flags
        - rights
      type: object
    VenueCoverage:
      properties:
        closed_markets:
          description: Closed markets counted for resolution coverage.
          format: int32
          nullable: true
          type: integer
        computed_at:
          description: When this coverage snapshot was written, UTC.
          format: date-time
          nullable: true
          type: string
        coverage_percent:
          description: 100 * with_final_resolution / closed_markets when closed is positive.
          format: double
          nullable: true
          type: number
        with_final_resolution:
          description: Closed markets that have a final resolution label.
          format: int32
          nullable: true
          type: integer
      required:
        - closed_markets
        - with_final_resolution
        - coverage_percent
        - computed_at
      type: object
    VenueKindRights:
      properties:
        history_from:
          description: Earliest history the adapter can serve for this kind, or null when unknown.
          format: date-time
          nullable: true
          type: string
        kind:
          description: Data kind.
          enum:
            - markets
            - trades
            - resolutions
          type: string
        rights:
          description: Effective rights for this kind (without basis or evidence).
          enum:
            - raw
            - derived_only
            - none
          type: string
      required:
        - kind
        - rights
      type: object
    VenueList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Venue'
          type: array
      required:
        - data
      type: object
  securitySchemes:
    ApiKey:
      description: Data endpoints. Format st_live_<prefix>_<secret> (ADR-0012).
      in: header
      name: X-API-Key
      type: apiKey
info:
  description: |
    Matched, resolution-labelled Polymarket and Kalshi data for developers.
    The canonical name is matched event; pair is a 2-member special case kept as
    an alias in the public API only (/v1/pairs, sk.pairs).

    Pagination uses a cursor only. Every list response is
    {"data": [...], "next_cursor": string or null}. Shared query parameters are
    limit and cursor; next_cursor is null on the last page.
  title: Skewtape API
  version: 0.1.0
openapi: 3.0.3
paths:
  /v1/candles:
    get:
      description: |
        Candles from the lake in (market_id, token_id, ts) order. With
        event_id, active members are read in (venue, market_id) order, each
        in that table order. With venue alone, the same key across the
        venue's markets. Exactly one selector: venue with market_id, event_id
        alone, or venue alone. from is inclusive and clamped to the plan's
        history; to is exclusive and must be after from. With venue alone,
        from and to are at most 7 days apart. Candles count each trade once
        (an order book match's maker legs, a market maker trade's one row)
        and arrive within an hour. event_id resolves an approved matched event
        the caller can see and reads its active members only; members outside
        the plan's candle venues are left out, and members whose venue's
        trades rights are not raw contribute no rows. A missing or hidden
        event_id is 404. Free and History include Polymarket daily candles
        (res=1d); other venues and resolutions need the builder plan.
      operationId: listCandles
      parameters:
        - description: |
            Venue key. Required with market_id, or alone for a venue-wide
            range of at most 7 days. Must not be set with event_id.
          in: query
          name: venue
          schema:
            type: string
        - description: |
            One market. Requires venue. Must not be set with event_id or with
            venue alone.
          in: query
          name: market_id
          schema:
            type: string
        - description: |
            Matched event id. Reads active members only, in (venue, market_id)
            order. Members outside the plan's candle venues are omitted. Must
            not be set with venue or market_id.
          in: query
          name: event_id
          schema:
            type: string
        - description: Inclusive start of the time range, UTC. Clamped to the plan's history.
          in: query
          name: from
          required: true
          schema:
            format: date-time
            type: string
        - description: |
            Exclusive end of the time range, UTC. Must be after from. With
            venue alone, at most 7 days after from.
          in: query
          name: to
          required: true
          schema:
            format: date-time
            type: string
        - description: Candle bucket size.
          in: query
          name: res
          required: true
          schema:
            enum:
              - 1m
              - 1h
              - 1d
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CandleList'
          description: Candles page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List candles
      tags:
        - data
  /v1/feed:
    get:
      description: |
        WebSocket upgrade (ADR-0013, ARCHITECTURE 10). Builder and Pro plans;
        the plans table says how many connections an account may hold (Builder
        3, Pro 10, counted across all its keys). Not served by a generated
        handler: this operation documents the protocol.

        Authentication: the X-API-Key header on the upgrade, or the first
        message {"op":"auth","key":"st_live_..."} within 10 seconds.

        Messages from the client:
        {"op":"subscribe","topics":["markets","resolutions","trades","event_spread"],
        "venues":["kalshi"],"markets":[{"venue":"polymarket","market_id":"0x..."}],
        "events":["st_evt_00042"],"resume_from":123} replaces the subscription
        (topics required; the filters are ORed and optional; the events filter,
        matched event ids, narrows event_spread, whose rows belong to an event
        and not a venue, so the venue and market filters do not narrow them;
        it needs that topic: with other topics alone it is refused, and
        beside event_spread it leaves those topics to the venue and market
        filters, whole when there are none; a market filter cuts a
        trades_batch to its markets' fills);
        {"op":"ping"} answers {"op":"pong"} at once, even during a replay.
        markets, resolutions and trades need Builder or above, event_spread Pro;
        a plan that loses a topic during a connection is told (error
        topic_not_in_plan) and keeps its other topics.

        Trades (E15-T3) are fills from venue streams, one event per fill with
        the stored row's identity (venue, tx_hash, log_index) up to 400 a
        second per venue, the rest of the second folded into one trades_batch;
        the hourly walk stores the row afterwards, and a leader that takes
        over re-reads the last blocks, so dedupe by identity. event_spread is
        one approved matched event's fee-adjusted spread, at most one event
        per matched event per five seconds (FeedSpread). Right after
        subscribed, a subscription to event_spread receives the latest spread
        of each event it names as snapshot messages (op snapshot,
        FeedSnapshot): a state with no seq, never a point to resume from; the
        replay then carries the other topics and live spreads follow as
        events, so a replay returns the latest per event, never each tick. A
        subscription sent before the instance has read the log once is
        answered error not_ready: send it again. Subscribes sent
        while the connection is busy (a replay, a slow write) are not queued:
        the latest one is applied when the connection is free, and each
        earlier one that never ran is answered error superseded.

        Messages from the server, each with op: hello (connection_id, plan,
        the current seq, the replay window and the reconnect schedule),
        subscribed (what was accepted, replay_to, masked_venues), snapshot
        (one FeedSnapshot: the latest spread of a matched event, no seq),
        event (one FeedEvent: seq, topic, kind, venue, market_id, at,
        payload), resync
        (resume_from is older than the replay window: read the API for what
        you missed, live events follow), reconnect (sent at 55 minutes with
        resume_from; the connection closes at 59 minutes, before the 60-minute
        platform limit), error (code, message).

        Replay (D2): resume_from replays the stored events after that seq that
        match the subscription, then switches to live with no gap and no
        duplicate; a client keeps the last seq it saw. Every connection also
        receives the feed's own gap notices (topic feed, kind gap) when a venue
        stream reconnected: the stored data has no gap, so read the API for
        that window or wait for the next hourly run.

        Policy (ADR-0028): a subscription naming a venue the live_data policy
        blocks is refused (error venue_blocked); a masked venue's events ship
        with the listed fields null and blocked true.

        Close codes: 4000 reconnect (the age limit, or a registration that
        expired while the server could not heartbeat; both carry
        resume_from), 4001 unauthorized (also when the key is revoked during
        the connection: keys and plans are read again every few minutes),
        4003 plan (no feed, or a topic the plan no longer covers), 4008
        connection limit, 4009 slow consumer (the reason carries
        resume_from), 4029 too many failed key lookups, 4400 bad message,
        1001 server restarting.
      operationId: connectFeed
      parameters:
        - description: The API key; or send the auth message first.
          in: header
          name: X-API-Key
          schema:
            type: string
      responses:
        "101":
          description: Switching Protocols. The WebSocket carries the messages described above.
        "401":
          $ref: '#/components/responses/Unauthorized'
        "503":
          description: The instance is shutting down; connect again.
      summary: Live feed (WebSocket)
      tags:
        - data
  /v1/fees:
    get:
      description: |
        Fee schedule rows in (venue, category, effective_from) order. Open to
        every plan. Optional venue filter.
      operationId: listFees
      parameters:
        - in: query
          name: venue
          schema:
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeList'
          description: Fees page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List fee schedules
      tags:
        - data
  /v1/fills:
    get:
      description: |
        Fills from published lake files in (market_id, ts, log_index, tx_hash)
        order. With event_id, active members are read in (venue, market_id)
        order, each in that table order. With venue alone, the same key across
        the venue's markets. Exactly one selector: venue with market_id,
        event_id alone, or venue alone. from is inclusive and clamped to the
        plan's history; to is exclusive and must be after from. With venue
        alone, from and to are at most 7 days apart. Fills arrive within a day.
        event_id resolves an approved matched event the caller can see and
        reads its active members only; members whose venue's trades rights are
        not raw contribute no rows. A missing or hidden event_id is 404. Free
        and History plans do not include fills.
      operationId: listFills
      parameters:
        - description: |
            Venue key. Required with market_id, or alone for a venue-wide
            range of at most 7 days. Must not be set with event_id.
          in: query
          name: venue
          schema:
            type: string
        - description: |
            One market. Requires venue. Must not be set with event_id or with
            venue alone.
          in: query
          name: market_id
          schema:
            type: string
        - description: |
            Matched event id. Reads active members only, in (venue, market_id)
            order. Must not be set with venue or market_id.
          in: query
          name: event_id
          schema:
            type: string
        - description: Inclusive start of the time range, UTC. Clamped to the plan's history.
          in: query
          name: from
          required: true
          schema:
            format: date-time
            type: string
        - description: |
            Exclusive end of the time range, UTC. Must be after from. With
            venue alone, at most 7 days after from.
          in: query
          name: to
          required: true
          schema:
            format: date-time
            type: string
        - description: |
            Match leg to return. Default maker. Kalshi publishes maker rows
            only, so maker and all return the same rows there.
          in: query
          name: leg
          schema:
            default: maker
            enum:
              - maker
              - taker
              - all
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FillList'
          description: Fills page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List fills
      tags:
        - data
  /v1/markets:
    get:
      description: |
        Markets in (venue, market_id) order. Filter by venue, up to 100
        market_id values, and updated_since. Rights and plan rules apply in
        the dataset door.
      operationId: listMarkets
      parameters:
        - description: Restrict to one venue key.
          in: query
          name: venue
          schema:
            type: string
        - description: Restrict to these market ids (at most 100).
          explode: true
          in: query
          name: market_id
          schema:
            items:
              type: string
            maxItems: 100
            type: array
          style: form
        - description: Only markets updated at or after this UTC time.
          in: query
          name: updated_since
          schema:
            format: date-time
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketList'
          description: Markets page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List markets
      tags:
        - data
  /v1/markets/{venue}/{market_id}:
    get:
      description: |
        One market by venue and market_id. Missing or hidden from the plan is
        404; the response never says which. A venue the data policy blocks is
        403 blocked, whether or not the market exists.
      operationId: getMarket
      parameters:
        - in: path
          name: venue
          required: true
          schema:
            type: string
        - in: path
          name: market_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Market'
          description: Market
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/Forbidden'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: Get one market
      tags:
        - data
  /v1/matched_events:
    get:
      description: |
        Matched events in event_id order. Filters: min_confidence,
        resolution_equal, venue (any active member), status. Free and History
        keep events whose resolves_at is null or at most 30 days in the past.
        Plans see status approved only.
      operationId: listMatchedEvents
      parameters:
        - description: Minimum overall confidence (inclusive).
          in: query
          name: min_confidence
          schema:
            format: double
            maximum: 1
            minimum: 0
            type: number
        - in: query
          name: resolution_equal
          schema:
            type: boolean
        - description: Restrict to events with an active member on this venue.
          in: query
          name: venue
          schema:
            type: string
        - in: query
          name: status
          schema:
            enum:
              - approved
              - needs_rereview
              - retired
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchedEventList'
          description: Matched events page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List matched events
      tags:
        - data
  /v1/matched_events/{event_id}:
    get:
      description: |
        One matched event by event_id. Missing or hidden from the plan is 404;
        the response never says which.
      operationId: getMatchedEvent
      parameters:
        - in: path
          name: event_id
          required: true
          schema:
            pattern: ^st_evt_\d{5,}$
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchedEvent'
          description: Matched event
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: Get one matched event
      tags:
        - data
  /v1/pairs:
    get:
      description: |
        Thin alias of matched events with exactly two active members, in the
        old pair shape (ARCHITECTURE 9.1). Same filters as matched_events.
        Derived server-side from the same dataset read.
      operationId: listPairs
      parameters:
        - in: query
          name: min_confidence
          schema:
            format: double
            maximum: 1
            minimum: 0
            type: number
        - in: query
          name: resolution_equal
          schema:
            type: boolean
        - in: query
          name: venue
          schema:
            type: string
        - in: query
          name: status
          schema:
            enum:
              - approved
              - needs_rereview
              - retired
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PairList'
          description: Pairs page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List two-member matched events
      tags:
        - data
  /v1/pairs/{pair_id}:
    get:
      description: |
        Thin alias of getMatchedEvent for events with exactly two active
        members. pair_id carries the event_id value. Missing, hidden, or not
        a two-member event is 404.
      operationId: getPair
      parameters:
        - in: path
          name: pair_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pair'
          description: Pair
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: Get one two-member matched event
      tags:
        - data
  /v1/resolutions:
    get:
      description: |
        Resolution events in (venue, market_id, seq) order. Filter by venue
        and created_since.
      operationId: listResolutions
      parameters:
        - in: query
          name: venue
          schema:
            type: string
        - description: Only events created at or after this UTC time.
          in: query
          name: created_since
          schema:
            format: date-time
            type: string
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolutionList'
          description: Resolutions page
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List resolution events
      tags:
        - data
  /v1/venues:
    get:
      description: |
        Every enabled venue with its key, beta and flags; rights per kind
        (raw, derived_only or none, without basis or evidence); history_from
        per kind (null when unknown); and resolution coverage from
        venue_health when present. Not paged.
      operationId: listVenues
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VenueList'
          description: Enabled venues
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "400":
          $ref: '#/components/responses/InvalidRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/ForbiddenPlan'
        "429":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: |
            rate_limited (Retry-After) or quota_exceeded (resets_at, upgrade_url).
            See RateLimited and QuotaExceeded response components.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        "500":
          $ref: '#/components/responses/Internal'
      security:
        - ApiKey: []
      summary: List enabled venues
      tags:
        - data
servers:
  - url: https://api.skewtape.com
tags:
  - description: Public data API; SDKs and /openapi.yaml are generated from this tag only.
    name: data
