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

# Get builder trades

> Retrieves trades attributed to a builder code.



## OpenAPI

````yaml openapi/zh/polymarket-clob.json GET /apis/v1/polymarket/builder/trades
openapi: 3.1.0
info:
  description: ''
  title: Polymarket Clob
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-configured-paths:
    - /apis/v1/polymarket/batch-prices-history
    - /apis/v1/polymarket/book
    - /apis/v1/polymarket/books
    - /apis/v1/polymarket/builder/trades
    - /apis/v1/polymarket/cancel-all
    - /apis/v1/polymarket/cancel-market-orders
    - /apis/v1/polymarket/clob-markets/{condition_id}
    - /apis/v1/polymarket/data/orders
    - /apis/v1/polymarket/fee-rate
    - /apis/v1/polymarket/fee-rate/{token_id}
    - /apis/v1/polymarket/heartbeats
    - /apis/v1/polymarket/last-trade-price
    - /apis/v1/polymarket/last-trades-prices
    - /apis/v1/polymarket/markets-by-token/{token_id}
    - /apis/v1/polymarket/midpoint
    - /apis/v1/polymarket/midpoints
    - /apis/v1/polymarket/order
    - /apis/v1/polymarket/order-scoring
    - /apis/v1/polymarket/order/{orderID}
    - /apis/v1/polymarket/orders
    - /apis/v1/polymarket/price
    - /apis/v1/polymarket/prices
    - /apis/v1/polymarket/prices-history
    - /apis/v1/polymarket/rebates/current
    - /apis/v1/polymarket/rewards/markets/current
    - /apis/v1/polymarket/rewards/markets/multi
    - /apis/v1/polymarket/rewards/markets/{condition_id}
    - /apis/v1/polymarket/rewards/user
    - /apis/v1/polymarket/rewards/user/markets
    - /apis/v1/polymarket/rewards/user/percentages
    - /apis/v1/polymarket/rewards/user/total
    - /apis/v1/polymarket/sampling-markets
    - /apis/v1/polymarket/sampling-simplified-markets
    - /apis/v1/polymarket/simplified-markets
    - /apis/v1/polymarket/spread
    - /apis/v1/polymarket/spreads
    - /apis/v1/polymarket/tick-size
    - /apis/v1/polymarket/tick-size/{token_id}
    - /apis/v1/polymarket/time
    - /apis/v1/polymarket/trades
  x-aisa-document:
    facts_hash: cb2482955528ad5270b2f3cf84d72a7f4ada570d5e717c4d116ddc6ef1099af2
    generator_version: '2'
    protocol_version: '1'
    schema_version: '1'
    composer_version: '13'
    response_pending: []
    document_hash: sha256:40638f56dd77ff988621358162b7f238b3c7ced8cc4eb76ecd1ba9d2f4b68fc9
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: polymarket-clob
  x-aisa-catalogs:
    polymarket-clob:
      title: Polymarket Clob
      description: ''
      x-aisa-document:
        facts_hash: cb2482955528ad5270b2f3cf84d72a7f4ada570d5e717c4d116ddc6ef1099af2
        generator_version: '2'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/polymarket/builder/trades:
    get:
      tags:
        - default
      summary: Get builder trades
      description: Retrieves trades attributed to a builder code.
      operationId: any_polymarket_clob_apis_v1_polymarket_builder_trades
      parameters:
        - name: after
          in: query
          description: Filter trades after this Unix timestamp
          required: false
          schema:
            type: string
            pattern: ^\d+$
          example: '1600000000'
        - name: asset_id
          in: query
          description: Asset ID (token ID) to filter trades
          required: false
          schema:
            type: string
          example: >-
            15871154585880608648532107628464183779895785213830018178010423617714102767076
        - name: before
          in: query
          description: Filter trades before this Unix timestamp
          required: false
          schema:
            type: string
            pattern: ^\d+$
          example: '1700000000'
        - name: builder_code
          in: query
          description: Builder code to fetch attributed trades for
          required: true
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{64}$
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
        - name: id
          in: query
          description: Trade ID to filter by specific trade
          required: false
          schema:
            type: string
          example: trade-123
        - name: market
          in: query
          description: Market (condition ID) to filter trades
          required: false
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{64}$
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
        - name: next_cursor
          in: query
          description: Cursor for pagination (base64 encoded offset)
          required: false
          schema:
            type: string
          example: MA==
      responses:
        '200':
          description: Successfully retrieved builder trades
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseE58613C05201_BuilderTradesResponse
              examples:
                example:
                  summary: Builder trades response
                  value:
                    limit: 300
                    next_cursor: MzAw
                    count: 2
                    data:
                      - id: trade-123
                        tradeType: TAKER
                        takerOrderHash: '0xabcdef1234567890abcdef1234567890abcdef12'
                        builder: >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                        market: >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                        assetId: >-
                          15871154585880608648532107628464183779895785213830018178010423617714102767076
                        side: BUY
                        size: '100000000'
                        sizeUsdc: '50000000'
                        price: '0.5'
                        status: TRADE_STATUS_CONFIRMED
                        outcome: 'YES'
                        outcomeIndex: 0
                        owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
                        maker: '0x1234567890123456789012345678901234567890'
                        transactionHash: >-
                          0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                        matchTime: '1700000000'
                        bucketIndex: 0
                        fee: '300000'
                        feeUsdc: '150000'
                        createdAt: '2024-01-01T00:00:00Z'
                        updatedAt: '2024-01-01T00:00:00Z'
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseE58613C05201_BuilderTradesResponse:
      type: object
      description: Paginated builder trades response
      required:
        - limit
        - next_cursor
        - count
        - data
      properties:
        limit:
          type: integer
          description: Maximum number of items per page
          example: 300
        next_cursor:
          type: string
          description: >-
            Cursor for next page (base64 encoded offset). "LTE=" indicates no
            more pages
          example: MzAw
        count:
          type: integer
          description: Number of items in current response
          example: 2
        data:
          type: array
          description: Array of builder trades
          items:
            $ref: '#/components/schemas/ResponseE58613C05201_BuilderTrade'
    ResponseE58613C05201_BuilderTrade:
      type: object
      description: Builder trade information
      required:
        - id
        - tradeType
        - takerOrderHash
        - builder
        - market
        - assetId
        - side
        - size
        - sizeUsdc
        - price
        - status
        - outcome
        - outcomeIndex
        - owner
        - maker
        - transactionHash
        - matchTime
        - bucketIndex
        - fee
        - feeUsdc
      properties:
        id:
          type: string
          description: Trade ID
          example: trade-123
        tradeType:
          type: string
          description: Trade type
          example: TAKER
        takerOrderHash:
          type: string
          description: Taker order hash
          example: '0xabcdef1234567890abcdef1234567890abcdef12'
        builder:
          type: string
          description: Builder code attributed to the trade
          pattern: ^0x[a-fA-F0-9]{64}$
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
        market:
          type: string
          description: Market (condition ID)
          pattern: ^0x[a-fA-F0-9]{64}$
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
        assetId:
          type: string
          description: Asset ID (token ID)
          example: >-
            15871154585880608648532107628464183779895785213830018178010423617714102767076
        side:
          type: string
          description: Trade side
          enum:
            - BUY
            - SELL
          example: BUY
        size:
          type: string
          description: Trade size
          example: '100000000'
        sizeUsdc:
          type: string
          description: Trade size in USDC
          example: '50000000'
        price:
          type: string
          description: Trade price
          example: '0.5'
        status:
          type: string
          description: Trade status
          example: TRADE_STATUS_CONFIRMED
        outcome:
          type: string
          description: Market outcome
          example: 'YES'
        outcomeIndex:
          type: integer
          description: Outcome index
          example: 0
        owner:
          type: string
          description: Owner UUID
          example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
        maker:
          type: string
          description: Maker address
          pattern: ^0x[a-fA-F0-9]{40}$
          example: '0x1234567890123456789012345678901234567890'
        transactionHash:
          type: string
          description: Transaction hash
          pattern: ^0x[a-fA-F0-9]{64}$
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        matchTime:
          type: string
          description: Match time (Unix timestamp)
          example: '1700000000'
        bucketIndex:
          type: integer
          description: Bucket index
          example: 0
        fee:
          type: string
          description: Fee amount
          example: '300000'
        feeUsdc:
          type: string
          description: Fee amount in USDC
          example: '150000'
        err_msg:
          type:
            - string
            - 'null'
          description: Error message (if any)
          example: null
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2024-01-01T00:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2024-01-01T00:00:00Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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