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

# Polymarket Trades



## OpenAPI

````yaml openapi.json GET /gateway/v1/prediction-market/polymarket/trades
openapi: 3.1.0
info:
  title: Hermod
  version: 0.0.1
servers:
  - url: https://api.asksurf.ai
security: []
paths:
  /gateway/v1/prediction-market/polymarket/trades:
    get:
      tags:
        - Prediction Market
      summary: Polymarket Trades
      description: >-
        Returns paginated trade records for a Polymarket market or wallet.


        **Filters:** `condition_id` (market) or `address` (wallet), plus
        `outcome_label`, `min_amount`, and date range. At least one of
        `condition_id` or `address` is required.


        **Sort:** `newest`, `oldest`, or `largest`.


        **Data refresh:** ~30 minutes
      operationId: polymarket-trades
      parameters:
        - description: Market condition identifier
          explode: false
          in: query
          name: condition_id
          schema:
            description: Market condition identifier
            examples:
              - '0x1234567890abcdef'
            type: string
        - description: Wallet address — returns trades where the address is maker or taker
          explode: false
          in: query
          name: address
          schema:
            description: >-
              Wallet address — returns trades where the address is maker or
              taker
            examples:
              - '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
            type: string
        - description: 'Filter by outcome label: `Yes` or `No`'
          explode: false
          in: query
          name: outcome_label
          schema:
            description: 'Filter by outcome label: `Yes` or `No`'
            enum:
              - 'Yes'
              - 'No'
            examples:
              - 'Yes'
            type: string
        - description: Minimum trade amount in USD
          explode: false
          in: query
          name: min_amount
          schema:
            description: Minimum trade amount in USD
            examples:
              - 10000
            format: double
            minimum: 0
            type: number
        - description: >-
            Start of time range. Accepts Unix seconds (`1704067200`) or date
            string (`2024-01-01`)
          explode: false
          in: query
          name: from
          schema:
            description: >-
              Start of time range. Accepts Unix seconds (`1704067200`) or date
              string (`2024-01-01`)
            examples:
              - '2024-01-01'
            type: string
        - description: >-
            End of time range. Accepts Unix seconds (`1706745600`) or date
            string (`2024-02-01`)
          explode: false
          in: query
          name: to
          schema:
            description: >-
              End of time range. Accepts Unix seconds (`1706745600`) or date
              string (`2024-02-01`)
            examples:
              - '2024-02-01'
            type: string
        - description: Field to sort results by
          explode: false
          in: query
          name: sort_by
          schema:
            default: timestamp
            description: Field to sort results by
            enum:
              - timestamp
              - notional_volume_usd
            examples:
              - timestamp
            type: string
        - description: Results per page
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Results per page
            examples:
              - 50
            format: int64
            maximum: 500
            minimum: 1
            type: integer
        - description: Pagination offset
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Pagination offset
            examples:
              - 0
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataResponsePolymarketTrade'
          description: OK
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAPIError'
          description: Error
      security:
        - AccessToken: []
components:
  schemas:
    DataResponsePolymarketTrade:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DataResponsePolymarketTrade.json
          format: uri
          readOnly: true
          type: string
        data:
          items:
            $ref: '#/components/schemas/PolymarketTrade'
          type:
            - array
            - 'null'
        meta:
          $ref: '#/components/schemas/OffsetMeta'
      required:
        - data
        - meta
      type: object
    DataAPIError:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DataAPIError.json
          format: uri
          readOnly: true
          type: string
        error:
          $ref: '#/components/schemas/DataAPIErrorDetail'
      required:
        - error
      type: object
    PolymarketTrade:
      additionalProperties: false
      properties:
        amount_usd:
          description: Trade amount in USD
          format: double
          type: number
        block_number:
          description: Block number
          format: int64
          type: integer
        block_time:
          description: Trade Unix timestamp in seconds
          format: int64
          type: integer
        condition_id:
          description: Market condition identifier
          type: string
        evt_index:
          description: Event log index
          format: int64
          type: integer
        exchange_address:
          description: Exchange contract address
          type: string
        fee_usd:
          description: Fee amount in USD
          format: double
          type: number
        maker_address:
          description: Maker wallet address
          type: string
        neg_risk:
          description: Whether this is a negative risk trade
          type: boolean
        outcome_label:
          description: Outcome label such as `Yes` or `No`
          type: string
        outcome_token_id:
          description: Outcome token identifier
          type: string
        price:
          description: Trade price (0-1)
          format: double
          type: number
        question:
          description: Market question text
          type: string
        shares:
          description: Number of shares traded
          format: double
          type: number
        taker_address:
          description: Taker wallet address
          type: string
        tx_hash:
          description: Transaction hash
          type: string
      required:
        - block_number
        - block_time
        - tx_hash
        - evt_index
        - exchange_address
        - condition_id
        - question
        - outcome_label
        - neg_risk
        - outcome_token_id
        - price
        - amount_usd
        - shares
        - fee_usd
        - maker_address
        - taker_address
      type: object
    OffsetMeta:
      additionalProperties: false
      properties:
        cached:
          description: Whether this response was served from cache
          type: boolean
        credits_used:
          description: Credits deducted for this request
          format: int64
          type: integer
        limit:
          description: Maximum number of items returned in this response
          format: int64
          type: integer
        offset:
          description: Number of items skipped (pagination offset)
          format: int64
          type: integer
        total:
          description: >-
            Total number of matching items (before pagination). Omitted when
            total is unknown.
          format: int64
          type: integer
      required:
        - limit
        - offset
        - credits_used
        - cached
      type: object
    DataAPIErrorDetail:
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object

````