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

# Get trader trades

> Retrieve trade history for a specific trader across all markets



## OpenAPI

````yaml https://api.struct.to/openapi.json get /polymarket/trader/trades/{address}
openapi: 3.1.0
info:
  title: Polymarket API
  description: >-
    RESTful API for querying Polymarket prediction markets data including
    events, markets, traders, holders, and real-time metrics
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.struct.to/v1
security: []
paths:
  /polymarket/trader/trades/{address}:
    get:
      tags:
        - Trader
      summary: Get trader trades
      description: Retrieve trade history for a specific trader across all markets
      operationId: get_trader_trades
      parameters:
        - name: address
          in: path
          description: Trader wallet address
          required: true
          schema:
            type: string
        - name: condition_ids
          in: query
          description: Comma-separated condition IDs (max 20)
          required: false
          schema:
            type: string
        - name: slugs
          in: query
          description: Comma-separated market slugs
          required: false
          schema:
            type: string
        - name: position_ids
          in: query
          description: Comma-separated position IDs
          required: false
          schema:
            type: string
        - name: builder_codes
          in: query
          description: Comma-separated builder codes (max 25)
          required: false
          schema:
            type: string
        - name: side
          in: query
          description: 'Trade side: 0 (Buy), 1 (Sell)'
          required: false
          schema:
            $ref: '#/components/schemas/TradeSide'
        - name: outcome
          in: query
          description: Outcome name filter (e.g. Yes, No)
          required: false
          schema:
            type: string
        - name: outcome_index
          in: query
          description: 'Outcome index: 0 (Yes), 1 (No)'
          required: false
          schema:
            $ref: '#/components/schemas/OutcomeIndex'
        - name: trade_types
          in: query
          description: >-
            Comma-separated trade types: OrderFilled, Redemption, Merge, Split,
            Cancelled, PositionsConverted, OrdersMatched, MakerRebate, Reward,
            Yield, ComboCreation, ComboExecution, ComboStatusUpdate,
            ComboPositionsSplit, ComboPositionsMerged, ComboSplitOnCondition,
            ComboMergedOnCondition, ComboExtracted, ComboInjected,
            ComboConvertedToYesBasket, ComboMergedFromYesBasket,
            ComboCompressed, ComboPositionRedeemed, ComboWrapped,
            ComboUnwrapped, ComboHorizontalSplit, ComboHorizontalMerge,
            ComboPositionConverted, ComboPositionMigrated
          required: false
          schema:
            type: string
        - name: min_usd_amount
          in: query
          description: Min USD amount
          required: false
          schema:
            type: number
            format: double
        - name: max_usd_amount
          in: query
          description: Max USD amount
          required: false
          schema:
            type: number
            format: double
        - name: min_shares_amount
          in: query
          description: Min shares amount
          required: false
          schema:
            type: number
            format: double
        - name: max_shares_amount
          in: query
          description: Max shares amount
          required: false
          schema:
            type: number
            format: double
        - name: min_price
          in: query
          description: Min price (0.0-1.0)
          required: false
          schema:
            type: number
            format: double
        - name: max_price
          in: query
          description: Max price (0.0-1.0)
          required: false
          schema:
            type: number
            format: double
        - name: from
          in: query
          description: Start timestamp (ms)
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: End timestamp (ms)
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: 'Results per page (default: 10, max: 250)'
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: offset
          in: query
          description: >-
            Pagination offset (number of results to skip). Takes precedence over
            pagination_key.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: pagination_key
          in: query
          description: >-
            Cursor-based pagination key obtained from previous response's
            pagination.pagination_key
          required: false
          schema:
            type: string
        - name: sort_desc
          in: query
          description: 'Sort newest first (default: true)'
          required: false
          schema:
            type: boolean
        - name: ai
          in: query
          description: >-
            Return truncated response optimized for AI consumers (default:
            false)
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: >-
            Trader's trade history with advanced filtering (same as
            /market/trades but filtered by trader)
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TradeEvent'
components:
  schemas:
    TradeSide:
      type: string
      enum:
        - '0'
        - '1'
    OutcomeIndex:
      type: string
      enum:
        - '0'
        - '1'
    TradeEvent:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/OrderFilledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - OrderFilled
          title: OrderFilled
        - allOf:
            - $ref: '#/components/schemas/OrderFilledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - OrdersMatched
          title: OrdersMatched
        - allOf:
            - $ref: '#/components/schemas/OrderFilledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - MakerRebate
          title: MakerRebate
        - allOf:
            - $ref: '#/components/schemas/OrderFilledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Reward
          title: Reward
        - allOf:
            - $ref: '#/components/schemas/OrderFilledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Yield
          title: Yield
        - allOf:
            - $ref: '#/components/schemas/RedemptionTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Redemption
          title: Redemption
        - allOf:
            - $ref: '#/components/schemas/MergeTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Merge
          title: Merge
        - allOf:
            - $ref: '#/components/schemas/SplitTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Split
          title: Split
        - allOf:
            - $ref: '#/components/schemas/PositionsConvertedTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - PositionsConverted
          title: PositionsConverted
        - allOf:
            - $ref: '#/components/schemas/CancelledTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Cancelled
          title: Cancelled
        - allOf:
            - $ref: '#/components/schemas/QuestionInitializedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Initialization
          title: Initialization
        - allOf:
            - $ref: '#/components/schemas/AssertionMadeEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Proposal
          title: Proposal
        - allOf:
            - $ref: '#/components/schemas/AssertionDisputedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Dispute
          title: Dispute
        - allOf:
            - $ref: '#/components/schemas/AssertionSettledEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Settled
          title: Settled
        - allOf:
            - $ref: '#/components/schemas/QuestionResolvedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Resolution
          title: Resolution
        - allOf:
            - $ref: '#/components/schemas/ConditionResolutionEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ConditionResolution
          title: ConditionResolution
        - allOf:
            - $ref: '#/components/schemas/QuestionResetEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Reset
          title: Reset
        - allOf:
            - $ref: '#/components/schemas/QuestionFlaggedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Flag
          title: Flag
        - allOf:
            - $ref: '#/components/schemas/QuestionUnflaggedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Unflag
          title: Unflag
        - allOf:
            - $ref: '#/components/schemas/QuestionPausedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Pause
          title: Pause
        - allOf:
            - $ref: '#/components/schemas/QuestionUnpausedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Unpause
          title: Unpause
        - allOf:
            - $ref: '#/components/schemas/QuestionEmergencyResolvedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ManualResolution
          title: ManualResolution
        - allOf:
            - $ref: '#/components/schemas/NegRiskOutcomeReportedEvent'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - NegRiskOutcomeReported
          title: NegRiskOutcomeReported
        - allOf:
            - $ref: '#/components/schemas/RegisterTokenTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - RegisterToken
          title: RegisterToken
        - allOf:
            - $ref: '#/components/schemas/ApprovalTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - Approval
          title: Approval
        - allOf:
            - $ref: '#/components/schemas/ComboCreationTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboCreation
          title: ComboCreation
        - allOf:
            - $ref: '#/components/schemas/ComboExecutionTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboExecution
          title: ComboExecution
        - allOf:
            - $ref: '#/components/schemas/ComboStatusUpdateTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboStatusUpdate
          title: ComboStatusUpdate
        - allOf:
            - $ref: '#/components/schemas/ComboPositionPairTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboPositionsSplit
          title: ComboPositionsSplit
        - allOf:
            - $ref: '#/components/schemas/ComboPositionPairTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboPositionsMerged
          title: ComboPositionsMerged
        - allOf:
            - $ref: '#/components/schemas/ComboConditionTransformTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboSplitOnCondition
          title: ComboSplitOnCondition
        - allOf:
            - $ref: '#/components/schemas/ComboConditionTransformTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboMergedOnCondition
          title: ComboMergedOnCondition
        - allOf:
            - $ref: '#/components/schemas/ComboConditionTransformTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboExtracted
          title: ComboExtracted
        - allOf:
            - $ref: '#/components/schemas/ComboConditionTransformTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboInjected
          title: ComboInjected
        - allOf:
            - $ref: '#/components/schemas/ComboBasketTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboConvertedToYesBasket
          title: ComboConvertedToYesBasket
        - allOf:
            - $ref: '#/components/schemas/ComboBasketTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboMergedFromYesBasket
          title: ComboMergedFromYesBasket
        - allOf:
            - $ref: '#/components/schemas/ComboCompressedTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboCompressed
          title: ComboCompressed
        - allOf:
            - $ref: '#/components/schemas/ComboRedemptionTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboPositionRedeemed
          title: ComboPositionRedeemed
        - allOf:
            - $ref: '#/components/schemas/ComboWrapTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboWrapped
          title: ComboWrapped
        - allOf:
            - $ref: '#/components/schemas/ComboWrapTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboUnwrapped
          title: ComboUnwrapped
        - allOf:
            - $ref: '#/components/schemas/ComboHorizontalTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboHorizontalSplit
          title: ComboHorizontalSplit
        - allOf:
            - $ref: '#/components/schemas/ComboHorizontalTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboHorizontalMerge
          title: ComboHorizontalMerge
        - allOf:
            - $ref: '#/components/schemas/ComboPositionConvertedTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboPositionConverted
          title: ComboPositionConverted
        - allOf:
            - $ref: '#/components/schemas/ComboMigrationTrade'
            - type: object
              required:
                - trade_type
              properties:
                trade_type:
                  type: string
                  enum:
                    - ComboPositionMigrated
          title: ComboPositionMigrated
      description: >-
        Tagged enum for all trade types — serializes with `"trade_type": "..."`
        discriminator

        and only includes fields relevant to each type.
      discriminator:
        propertyName: trade_type
    OrderFilledTrade:
      type: object
      description: >-
        Output payload for OrderFilled and OrdersMatched trades (actual
        buy/sell).
      required:
        - id
        - hash
        - trader
        - side
        - position_id
        - usd_amount
        - shares_amount
        - price
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        order_hash:
          type:
            - string
            - 'null'
          description: CLOB order hash filled by this trade.
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader whose fill is represented by this row.
        taker:
          type:
            - string
            - 'null'
          description: Counterparty/taker address when emitted by the exchange.
        side:
          type: string
          description: Fill side from `trader` perspective.
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition ID for the filled position.
        position_id:
          type: string
          description: ERC1155 position ID filled.
        outcome:
          type:
            - string
            - 'null'
          description: Human-readable outcome label, when enriched.
        outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Outcome index for the filled position.
          minimum: 0
        question:
          type:
            - string
            - 'null'
          description: Market question, when enriched.
        image_url:
          type:
            - string
            - 'null'
          description: Market image URL, when enriched.
        slug:
          type:
            - string
            - 'null'
          description: Market slug, when enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug, when enriched.
        usd_amount:
          type: number
          format: double
          description: USDC notional for the fill.
        shares_amount:
          type: number
          format: double
          description: Shares filled.
        price:
          type: number
          format: double
          description: Fill price per share.
        probability:
          type:
            - number
            - 'null'
          format: double
          description: Probability adjusted for outcome direction when outcome is known.
        fee:
          type:
            - number
            - 'null'
          format: double
          description: Fee in USDC when known.
        fee_shares:
          type:
            - number
            - 'null'
          format: double
          description: Raw share-denominated fee for buy fills when applicable.
        fee_pct:
          type:
            - number
            - 'null'
          format: double
          description: Fee rate as a percent value, not a fraction.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Exchange contract namespace that emitted the fill.
        builder_code:
          type:
            - string
            - 'null'
          description: >-
            CLOB V2 builder code (lower-cased "0x..." bytes32 hex). Always
            absent for V1

            trades and may be `0x0000…` for V2 trades placed without a builder
            code.
        builder_fee:
          type:
            - number
            - 'null'
          format: double
          description: Builder fee in USDC. Absent when no builder code is attached.
    RedemptionTrade:
      type: object
      description: >-
        Output payload for CTF `PayoutRedemption` trades after market
        resolution.


        Combo module `PositionRedeemed` events are exposed separately as

        `ComboPositionRedeemed` and do not use this type.
      required:
        - id
        - hash
        - trader
        - usd_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that redeemed resolved CTF outcome tokens.
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition redeemed.
        outcome:
          type:
            - string
            - 'null'
          description: Human-readable redeemed outcome label, when enriched.
        outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Redeemed outcome index.
          minimum: 0
        question:
          type:
            - string
            - 'null'
          description: Market question, when enriched.
        image_url:
          type:
            - string
            - 'null'
          description: Market image URL, when enriched.
        slug:
          type:
            - string
            - 'null'
          description: Market slug, when enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug, when enriched.
        usd_amount:
          type: number
          format: double
          description: Payout received from CTF redemption.
        winning_outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Winning outcome index for the redeemed condition.
          minimum: 0
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Per-position burn amounts.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Contract namespace that emitted the redemption.
    MergeTrade:
      type: object
      description: >-
        Output payload for Merge trades (burn outcome tokens → receive
        collateral).
      required:
        - id
        - hash
        - trader
        - usd_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that burned outcome tokens to receive collateral.
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition merged.
        question:
          type:
            - string
            - 'null'
          description: Market question, when enriched.
        image_url:
          type:
            - string
            - 'null'
          description: Market image URL, when enriched.
        slug:
          type:
            - string
            - 'null'
          description: Market slug, when enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug, when enriched.
        usd_amount:
          type: number
          format: double
          description: Collateral received by the merge.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Per-position burn amounts.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Contract namespace that emitted the merge.
    SplitTrade:
      type: object
      description: >-
        Output payload for Split trades (deposit collateral → receive outcome
        tokens).
      required:
        - id
        - hash
        - trader
        - usd_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that deposited collateral to mint outcome tokens.
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition split.
        question:
          type:
            - string
            - 'null'
          description: Market question, when enriched.
        image_url:
          type:
            - string
            - 'null'
          description: Market image URL, when enriched.
        slug:
          type:
            - string
            - 'null'
          description: Market slug, when enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug, when enriched.
        usd_amount:
          type: number
          format: double
          description: Collateral deposited by the split.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Per-position mint amounts.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Contract namespace that emitted the split.
    PositionsConvertedTrade:
      type: object
      description: |-
        Output payload for NegRisk PositionsConverted trades
        (convert NO-position tokens → YES tokens + collateral).
      required:
        - id
        - hash
        - trader
        - market_id
        - index_set
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that converted neg-risk NO positions.
        market_id:
          type: string
          description: NegRisk umbrella market ID.
        index_set:
          type: string
          description: Bitmask of question indices whose NO tokens are being converted.
        shares_amount:
          type: number
          format: double
          description: Shares converted by the neg-risk adapter.
        fee:
          type:
            - number
            - 'null'
          format: double
          description: Conversion fee in USDC, when emitted.
        fee_pct:
          type:
            - number
            - 'null'
          format: double
          description: Conversion fee rate as a percent value, not a fraction.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Per-position input/output details for the conversion.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Contract namespace that emitted the conversion.
    CancelledTrade:
      type: object
      description: Output payload for Cancelled orders.
      required:
        - id
        - hash
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        order_hash:
          type:
            - string
            - 'null'
          description: Order hash that was cancelled on the exchange.
        question:
          type:
            - string
            - 'null'
          description: >-
            Market question for the cancelled order, when the market can be
            enriched.
        image_url:
          type:
            - string
            - 'null'
          description: >-
            Market image for the cancelled order, when the market can be
            enriched.
        slug:
          type:
            - string
            - 'null'
          description: >-
            Market slug for the cancelled order, when the market can be
            enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: >-
            Parent event slug for the cancelled order, when the market can be
            enriched.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Exchange contract namespace that emitted the cancellation.
    QuestionInitializedEvent:
      type: object
      description: 'UMA CTF Adapter: questionID first initialized on-chain.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
        - creator
        - reward_token
        - reward
        - proposal_bond
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        creator:
          type: string
        reward_token:
          type: string
        reward:
          type: string
        proposal_bond:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    AssertionMadeEvent:
      type: object
      description: 'V3 UMA OOv3: a new assertion (resolution proposal) was made.'
      required:
        - id
        - hash
        - oracle_contract
        - assertion_id
        - domain_id
        - claim
        - asserter
        - callback_recipient
        - escalation_manager
        - caller
        - expiration_time
        - currency
        - bond
        - identifier
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        assertion_id:
          type: string
        domain_id:
          type: string
        claim:
          type: string
        asserter:
          type: string
        callback_recipient:
          type: string
        escalation_manager:
          type: string
        caller:
          type: string
        expiration_time:
          type: integer
          format: int64
          minimum: 0
        currency:
          type: string
        bond:
          type: string
        identifier:
          type: string
        condition_id:
          type:
            - string
            - 'null'
        proposed_outcome:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    AssertionDisputedEvent:
      type: object
      description: 'V3 UMA OOv3: an assertion was disputed.'
      required:
        - id
        - hash
        - oracle_contract
        - assertion_id
        - caller
        - disputer
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        assertion_id:
          type: string
        caller:
          type: string
        disputer:
          type: string
        condition_id:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    AssertionSettledEvent:
      type: object
      description: 'V3 UMA OOv3: an assertion liveness period expired and was settled.'
      required:
        - id
        - hash
        - oracle_contract
        - assertion_id
        - bond_recipient
        - disputed
        - settlement_resolution
        - settle_caller
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        assertion_id:
          type: string
        bond_recipient:
          type: string
        disputed:
          type: boolean
        settlement_resolution:
          type: boolean
        settle_caller:
          type: string
        condition_id:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionResolvedEvent:
      type: object
      description: 'UMA CTF Adapter: market resolved with definitive outcome.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
        - settled_price
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        settled_price:
          type: integer
          format: int64
        proposed_outcome:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    ConditionResolutionEvent:
      type: object
      description: >-
        CTF ConditionResolution: positions become redeemable on the Conditional
        Tokens contract.
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
        - oracle
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        oracle:
          type: string
        proposed_outcome:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionResetEvent:
      type: object
      description: 'UMA CTF Adapter: dispute succeeded, market returns to active.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionFlaggedEvent:
      type: object
      description: 'UMA CTF Adapter: market flagged for emergency resolution.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionUnflaggedEvent:
      type: object
      description: 'UMA CTF Adapter: flag removed.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionPausedEvent:
      type: object
      description: 'UMA CTF Adapter: market paused by admin.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionUnpausedEvent:
      type: object
      description: 'UMA CTF Adapter: market unpaused.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    QuestionEmergencyResolvedEvent:
      type: object
      description: 'UMA CTF Adapter: admin emergency resolution.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        proposed_outcome:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    NegRiskOutcomeReportedEvent:
      type: object
      description: 'NegRisk Adapter: outcome reported for a neg-risk market question.'
      required:
        - id
        - hash
        - oracle_contract
        - condition_id
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        oracle_contract:
          type: string
        condition_id:
          type: string
        proposed_outcome:
          type:
            - string
            - 'null'
        question:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        slug:
          type:
            - string
            - 'null'
        event_slug:
          type:
            - string
            - 'null'
    RegisterTokenTrade:
      type: object
      description: >-
        Output payload for RegisterToken events (YES/NO token pair registered
        for a condition).
      required:
        - id
        - hash
        - condition_id
        - token0
        - token1
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        condition_id:
          type: string
          description: Market condition whose YES/NO pair was registered.
        token0:
          type: string
          description: YES token ID registered for the condition.
        token1:
          type: string
          description: NO token ID registered for the condition.
        question:
          type:
            - string
            - 'null'
          description: Market question, when enriched.
        image_url:
          type:
            - string
            - 'null'
          description: Market image URL, when enriched.
        slug:
          type:
            - string
            - 'null'
          description: Market slug, when enriched.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug, when enriched.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Exchange contract namespace that registered the pair.
    ApprovalTrade:
      type: object
      description: Output payload for ERC-1155 approval changes.
      required:
        - id
        - hash
        - trader
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Account that changed its operator approval.
        operator:
          type:
            - string
            - 'null'
          description: Operator address whose approval changed.
        approved:
          type:
            - boolean
            - 'null'
          description: New approval state.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Exchange or token contract namespace that emitted the approval.
    ComboCreationTrade:
      type: object
      description: New combo market metadata.
      required:
        - id
        - hash
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TraderInfo'
              description: Account associated with the combo creation.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition ID.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the combo creation.
        event_id:
          type:
            - string
            - 'null'
          description: Combo event ID.
        position_id:
          type:
            - string
            - 'null'
          description: Combo position ID.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the combo creation.
        question:
          type:
            - string
            - 'null'
          description: Primary market question for the combo.
        image_url:
          type:
            - string
            - 'null'
          description: Primary market image for the combo.
        slug:
          type:
            - string
            - 'null'
          description: Primary market slug for the combo.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the combo.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboExecutionTrade:
      type: object
      description: Executed combo trade.
      required:
        - id
        - hash
        - trader
        - side
        - position_id
        - usd_amount
        - shares_amount
        - price
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        order_hash:
          type:
            - string
            - 'null'
          description: Order hash for the filled combo order.
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader whose combo order fill is represented.
        taker:
          type:
            - string
            - 'null'
          description: Counterparty or taker address.
        side:
          type: string
          description: Fill side from the trader's perspective.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition ID.
        position_id:
          type: string
          description: Combo position ID traded.
        outcome:
          type:
            - string
            - 'null'
          description: Human-readable combo outcome label.
        outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Combo outcome index.
          minimum: 0
        question:
          type:
            - string
            - 'null'
          description: Market question for the combo.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the combo.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the combo.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the combo.
        usd_amount:
          type: number
          format: double
          description: Combo trade notional in USDC.
        shares_amount:
          type: number
          format: double
          description: Combo shares traded.
        price:
          type: number
          format: double
          description: Fill price per combo share.
        probability:
          type:
            - number
            - 'null'
          format: double
          description: Implied probability adjusted for the selected outcome.
        fee:
          type:
            - number
            - 'null'
          format: double
          description: Fee in USDC.
        fee_shares:
          type:
            - number
            - 'null'
          format: double
          description: Share-denominated fee for buy fills.
        fee_pct:
          type:
            - number
            - 'null'
          format: double
          description: Fee rate as a percent value.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the trade.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the trade.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo trade.
        builder_code:
          type:
            - string
            - 'null'
          description: Builder code attached to the combo order.
        builder_fee:
          type:
            - number
            - 'null'
          format: double
          description: Builder fee in USDC.
    ComboStatusUpdateTrade:
      type: object
      description: Combo status or result update.
      required:
        - id
        - hash
        - trader
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Account associated with the status update.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition ID whose status or result changed.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the status update.
        event_id:
          type:
            - string
            - 'null'
          description: Combo event ID when the update applies to an event.
        result:
          type: array
          items:
            type: string
          description: Result values for the combo status update.
        question:
          type:
            - string
            - 'null'
          description: Market question for the resolved condition.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the resolved condition.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the resolved condition.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the resolved condition.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboPositionPairTrade:
      type: object
      description: Binary Combo position split/merge.
      required:
        - id
        - hash
        - trader
        - usd_amount
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that initiated the Combo split or merge.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo binary condition being split or merged.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the split or merge.
        recipient:
          type:
            - string
            - 'null'
          description: Recipient for merged collateral/output positions.
        recipient0:
          type:
            - string
            - 'null'
          description: Recipient of outcome index 0 in split events.
        recipient1:
          type:
            - string
            - 'null'
          description: Recipient of outcome index 1 in split events.
        usd_amount:
          type: number
          format: double
          description: Collateral amount represented by the split or merge, in USDC.
        shares_amount:
          type: number
          format: double
          description: Combo shares moved by the split or merge.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the split or merge.
        question:
          type:
            - string
            - 'null'
          description: Market question for the condition.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the condition.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the condition.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the condition.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboConditionTransformTrade:
      type: object
      description: >-
        Combo condition transformation, such as splitting, merging, extracting,
        or adding legs.
      required:
        - id
        - hash
        - trader
        - position_id
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that initiated the condition transformation.
        condition_id:
          type:
            - string
            - 'null'
          description: Primary combo condition for the transformation.
        position_id:
          type: string
          description: Primary combo position ID.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the transformation.
        parent_condition_id:
          type:
            - string
            - 'null'
          description: Parent condition for split or merge transformations.
        child_yes_condition_id:
          type:
            - string
            - 'null'
          description: YES-side child condition for split or merge transformations.
        child_no_condition_id:
          type:
            - string
            - 'null'
          description: NO-side child condition for split or merge transformations.
        reduced_condition_id:
          type:
            - string
            - 'null'
          description: Reduced condition after extracting or adding a leg.
        residual_condition_id:
          type:
            - string
            - 'null'
          description: Residual condition after extracting or adding a leg.
        shares_amount:
          type: number
          format: double
          description: Combo shares transformed.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details describing transformation inputs and outputs.
        question:
          type:
            - string
            - 'null'
          description: Market question for the primary condition.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the primary condition.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the primary condition.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the primary condition.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboBasketTrade:
      type: object
      description: Combo basket conversion or merge.
      required:
        - id
        - hash
        - trader
        - position_id
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that converted to or merged from a combo basket.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition associated with the basket.
        position_id:
          type: string
          description: Primary combo position for the basket action.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the basket action.
        shares_amount:
          type: number
          format: double
          description: Combo shares converted or merged.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for this basket action.
        question:
          type:
            - string
            - 'null'
          description: Market question for the primary combo position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the primary combo position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the primary combo position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the primary combo position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboCompressedTrade:
      type: object
      description: Combo position compression into a new position and/or collateral.
      required:
        - id
        - hash
        - trader
        - position_id
        - usd_amount
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that initiated the compression.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition for the input position.
        position_id:
          type: string
          description: Input combo position ID.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the compression.
        old_position_id:
          type:
            - string
            - 'null'
          description: Input combo position ID.
        new_position_id:
          type:
            - string
            - 'null'
          description: Output combo position ID.
        usd_amount:
          type: number
          format: double
          description: Collateral released by compression, in USDC.
        shares_amount:
          type: number
          format: double
          description: Input combo shares compressed.
        position_amount:
          type:
            - string
            - 'null'
          description: Output position amount in base units.
        collateral_out:
          type:
            - string
            - 'null'
          description: Collateral output in base units.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the compression.
        question:
          type:
            - string
            - 'null'
          description: Market question for the input position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the input position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the input position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the input position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboRedemptionTrade:
      type: object
      description: |-
        Combo position redemption.

        Returned when a combo position is redeemed for its final payout.
      required:
        - id
        - hash
        - trader
        - position_id
        - usd_amount
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that redeemed the Combo position.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition for the redeemed position.
        position_id:
          type: string
          description: Combo position ID redeemed.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the redemption.
        recipient:
          type:
            - string
            - 'null'
          description: Address receiving the redemption payout.
        usd_amount:
          type: number
          format: double
          description: Payout amount in USDC.
        shares_amount:
          type: number
          format: double
          description: Combo shares redeemed.
        payout:
          type:
            - string
            - 'null'
          description: Payout amount in base units.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the redemption.
        question:
          type:
            - string
            - 'null'
          description: Market question for the redeemed position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the redeemed position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the redeemed position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the redeemed position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboWrapTrade:
      type: object
      description: Combo wrap/unwrap between an underlying position and Combo position.
      required:
        - id
        - hash
        - trader
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that wrapped or unwrapped the position.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition for the combo-side position.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the wrap or unwrap.
        underlying_position_id:
          type:
            - string
            - 'null'
          description: Underlying market position ID involved in the wrap or unwrap.
        combinatorial_position_id:
          type:
            - string
            - 'null'
          description: Combo position ID involved in the wrap or unwrap.
        old_position_id:
          type:
            - string
            - 'null'
          description: Input position ID for the wrap or unwrap.
        new_position_id:
          type:
            - string
            - 'null'
          description: Output position ID for the wrap or unwrap.
        shares_amount:
          type: number
          format: double
          description: Shares wrapped or unwrapped.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/ComboLeg'
          description: Underlying markets that make up this combo.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the wrap or unwrap.
        question:
          type:
            - string
            - 'null'
          description: Market question for the combo-side position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the combo-side position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the combo-side position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the combo-side position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboHorizontalTrade:
      type: object
      description: Event-wide combo split or merge.
      required:
        - id
        - hash
        - trader
        - usd_amount
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that initiated the horizontal split or merge.
        condition_id:
          type:
            - string
            - 'null'
          description: Condition ID when the action is tied to a specific market.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the split or merge.
        event_id:
          type:
            - string
            - 'null'
          description: Combo event ID associated with the split or merge.
        recipient:
          type:
            - string
            - 'null'
          description: Recipient for positions or collateral produced by the operation.
        usd_amount:
          type: number
          format: double
          description: Collateral amount represented by the action, in USDC.
        shares_amount:
          type: number
          format: double
          description: Combo shares moved by the action.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the action.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboPositionConvertedTrade:
      type: object
      description: Combo position conversion.
      required:
        - id
        - hash
        - trader
        - position_id
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader that initiated the conversion.
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition associated with the converted position.
        position_id:
          type: string
          description: Position ID consumed by the conversion.
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the conversion.
        event_id:
          type:
            - string
            - 'null'
          description: Combo event ID associated with the conversion.
        condition_index:
          type:
            - string
            - 'null'
          description: Market index within the combo event.
        recipient:
          type:
            - string
            - 'null'
          description: Recipient for converted positions or collateral.
        old_position_id:
          type:
            - string
            - 'null'
          description: Input position ID consumed by the conversion.
        shares_amount:
          type: number
          format: double
          description: Shares converted.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the conversion.
        question:
          type:
            - string
            - 'null'
          description: Market question for the converted position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the converted position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the converted position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the converted position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    ComboMigrationTrade:
      type: object
      description: Combo position migration.
      required:
        - id
        - hash
        - trader
        - position_id
        - shares_amount
        - exchange
      properties:
        id:
          type: string
        hash:
          type: string
        block:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        confirmed_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        received_at:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        log_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        block_index:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        trader:
          $ref: '#/components/schemas/TraderInfo'
          description: Trader whose position was migrated.
        condition_id:
          type:
            - string
            - 'null'
          description: Combo condition for the migrated position.
        position_id:
          type: string
          description: Migrated combo position ID.
        outcome:
          type:
            - string
            - 'null'
          description: Human-readable migrated outcome label.
        outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Migrated outcome index.
          minimum: 0
        source_contract:
          type:
            - string
            - 'null'
          description: Source address for the migration.
        new_position_id:
          type:
            - string
            - 'null'
          description: New combo position ID created by the migration.
        shares_amount:
          type: number
          format: double
          description: Shares migrated.
        position_details:
          type: array
          items:
            $ref: '#/components/schemas/PositionDetail'
          description: Position-level details for the migration.
        question:
          type:
            - string
            - 'null'
          description: Market question for the migrated position.
        image_url:
          type:
            - string
            - 'null'
          description: Market image for the migrated position.
        slug:
          type:
            - string
            - 'null'
          description: Market slug for the migrated position.
        event_slug:
          type:
            - string
            - 'null'
          description: Parent event slug for the migrated position.
        exchange:
          $ref: '#/components/schemas/PolymarketExchange'
          description: Polymarket venue for this combo activity.
    TraderInfo:
      type: object
      description: Trader profile info - backwards compatibility
      required:
        - address
      properties:
        address:
          type: string
        name:
          type:
            - string
            - 'null'
        pseudonym:
          type:
            - string
            - 'null'
        profile_image:
          type:
            - string
            - 'null'
        x_username:
          type:
            - string
            - 'null'
        verified_badge:
          type: boolean
    PolymarketExchange:
      type: string
      description: Polymarket exchange contract types.
      enum:
        - CTFExchange
        - NegRiskExchange
        - ConditionalTokens
        - NegRiskAdapter
        - CTFExchangeV2
        - NegRiskExchangeV2
        - ComboExchange
        - ComboCombinatorialModule
        - ComboNegRiskModule
        - Unknown
    PositionDetail:
      type: object
      description: Per-position detail for Split/Merge/Redemption trades.
      required:
        - position_id
        - outcome_index
        - amount
      properties:
        condition_id:
          type:
            - string
            - 'null'
          description: Market condition ID for this ERC1155 position.
        position_id:
          type: string
          description: ERC1155 position ID
        outcome_index:
          type: integer
          format: int32
          description: Outcome index (0 = Yes, 1 = No for binary)
          minimum: 0
        outcome:
          type:
            - string
            - 'null'
          description: >-
            Outcome name (e.g. "Yes", "No"). Optional — may be omitted when the
            market metadata isn't yet available.
        amount:
          type: string
          description: Amount of shares created/burned/redeemed for this position
        collateral_amount:
          type: string
          description: |-
            Collateral paid out for this specific position, when applicable.

            For NegRisk PositionsConverted this is allocated only to burned NO
            inputs. YES output details intentionally carry zero collateral.
        minted:
          type:
            - boolean
            - 'null'
          description: |-
            Inventory direction from the trader's perspective:
            `Some(true)` = minted/received, `Some(false)` = burned/surrendered,
            `None` = unknown (legacy rows and parsers that don't stamp it).
            Combo transforms burn and mint tokens of the SAME outcome index, so
            unlike NegRisk conversions the direction cannot be inferred from
            `outcome_index` — the PnL engine's generic basis-migration arm keys
            on this field.
    ComboLeg:
      type: object
      description: Market details for one leg of a combo.
      required:
        - position_id
      properties:
        position_id:
          type: string
          description: Position ID for the underlying market outcome used as a leg.
        condition_id:
          type:
            - string
            - 'null'
          description: Underlying market condition ID for this leg.
        outcome:
          type:
            - string
            - 'null'
          description: Human-readable underlying outcome label, usually `Yes` or `No`.
        outcome_index:
          type:
            - integer
            - 'null'
          format: int32
          description: Underlying outcome index for this leg.
          minimum: 0
        question:
          type:
            - string
            - 'null'
          description: Underlying market question.
        slug:
          type:
            - string
            - 'null'
          description: Underlying market slug.
        image_url:
          type:
            - string
            - 'null'
          description: Underlying market image URL.
        title:
          type:
            - string
            - 'null'
          description: Underlying market title, when separate from the question.

````