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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get builder trades

> Retrieves trades attributed to a builder code.

## Request contract

* **Method and path:** GET /apis/v1/polymarket/builder/trades
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/polymarket/builder/trades`
* **after:** query; optional
* **asset\_id:** query; optional
* **before:** query; optional
* **builder\_code:** query; required
* **id:** query; optional
* **market:** query; optional
* **next\_cursor:** query; optional

[Complete OpenAPI definition](https://aisa.one/docs/openapi/polymarket-clob.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "any_polymarket_clob_apis_v1_polymarket_builder_trades",
  "method": "GET",
  "path": "/apis/v1/polymarket/builder/trades",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Filter trades after this Unix timestamp",
      "example": "1600000000",
      "in": "query",
      "name": "after",
      "required": false,
      "schema": {
        "pattern": "^\\d+$",
        "type": "string"
      }
    },
    {
      "description": "Asset ID (token ID) to filter trades",
      "example": "15871154585880608648532107628464183779895785213830018178010423617714102767076",
      "in": "query",
      "name": "asset_id",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Filter trades before this Unix timestamp",
      "example": "1700000000",
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
        "pattern": "^\\d+$",
        "type": "string"
      }
    },
    {
      "description": "Builder code to fetch attributed trades for",
      "example": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "in": "query",
      "name": "builder_code",
      "required": true,
      "schema": {
        "pattern": "^0x[a-fA-F0-9]{64}$",
        "type": "string"
      }
    },
    {
      "description": "Trade ID to filter by specific trade",
      "example": "trade-123",
      "in": "query",
      "name": "id",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Market (condition ID) to filter trades",
      "example": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "in": "query",
      "name": "market",
      "required": false,
      "schema": {
        "pattern": "^0x[a-fA-F0-9]{64}$",
        "type": "string"
      }
    },
    {
      "description": "Cursor for pagination (base64 encoded offset)",
      "example": "MA==",
      "in": "query",
      "name": "next_cursor",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.012 USD per successful request. Your account price may differ; use a request quote where supported.


## OpenAPI

````yaml openapi/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-catalogs:
    polymarket-clob:
      description: ''
      title: Polymarket Clob
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 82aea6f2c4f7a597f13ad38b776372a5289186335dfd2ac574ce675f273fca4f
        generator_version: '3'
        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-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:
    composer_version: '31'
    document_hash: sha256:a8dc9693db633e057fbb37a09c8dbc478620caf7f198add821694f86cdc66850
    facts_hash: 82aea6f2c4f7a597f13ad38b776372a5289186335dfd2ac574ce675f273fca4f
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: polymarket-clob
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:
        - description: Filter trades after this Unix timestamp
          example: '1600000000'
          in: query
          name: after
          required: false
          schema:
            pattern: ^\d+$
            type: string
        - description: Asset ID (token ID) to filter trades
          example: >-
            15871154585880608648532107628464183779895785213830018178010423617714102767076
          in: query
          name: asset_id
          required: false
          schema:
            type: string
        - description: Filter trades before this Unix timestamp
          example: '1700000000'
          in: query
          name: before
          required: false
          schema:
            pattern: ^\d+$
            type: string
        - description: Builder code to fetch attributed trades for
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
          in: query
          name: builder_code
          required: true
          schema:
            pattern: ^0x[a-fA-F0-9]{64}$
            type: string
        - description: Trade ID to filter by specific trade
          example: trade-123
          in: query
          name: id
          required: false
          schema:
            type: string
        - description: Market (condition ID) to filter trades
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
          in: query
          name: market
          required: false
          schema:
            pattern: ^0x[a-fA-F0-9]{64}$
            type: string
        - description: Cursor for pagination (base64 encoded offset)
          example: MA==
          in: query
          name: next_cursor
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                example:
                  summary: Builder trades response
                  value:
                    count: 2
                    data:
                      - assetId: >-
                          15871154585880608648532107628464183779895785213830018178010423617714102767076
                        bucketIndex: 0
                        builder: >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                        createdAt: '2024-01-01T00:00:00Z'
                        fee: '300000'
                        feeUsdc: '150000'
                        id: trade-123
                        maker: '0x1234567890123456789012345678901234567890'
                        market: >-
                          0x0000000000000000000000000000000000000000000000000000000000000001
                        matchTime: '1700000000'
                        outcome: 'YES'
                        outcomeIndex: 0
                        owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
                        price: '0.5'
                        side: BUY
                        size: '100000000'
                        sizeUsdc: '50000000'
                        status: TRADE_STATUS_CONFIRMED
                        takerOrderHash: '0xabcdef1234567890abcdef1234567890abcdef12'
                        tradeType: TAKER
                        transactionHash: >-
                          0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                        updatedAt: '2024-01-01T00:00:00Z'
                    limit: 300
                    next_cursor: MzAw
              schema:
                $ref: >-
                  #/components/schemas/ResponseDc26E95Ff83E_BuilderTradesResponse
          description: Successfully retrieved builder trades
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
      x-codeSamples:
        - label: Reference example
          lang: text
          source: >-
            # Fixed reference example. Playground inputs do not update this
            sample.

            curl --request GET \
              --url 'https://api.aisa.one/apis/v1/polymarket/builder/trades?after=1600000000&asset_id=15871154585880608648532107628464183779895785213830018178010423617714102767076&before=1700000000&builder_code=0x0000000000000000000000000000000000000000000000000000000000000001&id=trade-123&market=0x0000000000000000000000000000000000000000000000000000000000000001&next_cursor=MA%3D%3D' \
              --header 'Authorization: Bearer <token>'
components:
  schemas:
    ResponseDc26E95Ff83E_BuilderTradesResponse:
      description: Paginated builder trades response
      properties:
        count:
          description: Number of items in current response
          example: 2
          type: integer
        data:
          description: Array of builder trades
          items:
            $ref: '#/components/schemas/ResponseDc26E95Ff83E_BuilderTrade'
          type: array
        limit:
          description: Maximum number of items per page
          example: 300
          type: integer
        next_cursor:
          description: >-
            Cursor for next page (base64 encoded offset). "LTE=" indicates no
            more pages
          example: MzAw
          type: string
      required:
        - limit
        - next_cursor
        - count
        - data
      type: object
    ResponseDc26E95Ff83E_BuilderTrade:
      description: Builder trade information
      properties:
        assetId:
          description: Asset ID (token ID)
          example: >-
            15871154585880608648532107628464183779895785213830018178010423617714102767076
          type: string
        bucketIndex:
          description: Bucket index
          example: 0
          type: integer
        builder:
          description: Builder code attributed to the trade
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
          pattern: ^0x[a-fA-F0-9]{64}$
          type: string
        createdAt:
          description: Creation timestamp
          example: '2024-01-01T00:00:00Z'
          format: date-time
          type: string
        err_msg:
          description: Error message (if any)
          example: null
          type:
            - string
            - 'null'
        fee:
          description: Fee amount
          example: '300000'
          type: string
        feeUsdc:
          description: Fee amount in USDC
          example: '150000'
          type: string
        id:
          description: Trade ID
          example: trade-123
          type: string
        maker:
          description: Maker address
          example: '0x1234567890123456789012345678901234567890'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        market:
          description: Market (condition ID)
          example: '0x0000000000000000000000000000000000000000000000000000000000000001'
          pattern: ^0x[a-fA-F0-9]{64}$
          type: string
        matchTime:
          description: Match time (Unix timestamp)
          example: '1700000000'
          type: string
        outcome:
          description: Market outcome
          example: 'YES'
          type: string
        outcomeIndex:
          description: Outcome index
          example: 0
          type: integer
        owner:
          description: Owner UUID
          example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
          type: string
        price:
          description: Trade price
          example: '0.5'
          type: string
        side:
          description: Trade side
          enum:
            - BUY
            - SELL
          example: BUY
          type: string
        size:
          description: Trade size
          example: '100000000'
          type: string
        sizeUsdc:
          description: Trade size in USDC
          example: '50000000'
          type: string
        status:
          description: Trade status
          example: TRADE_STATUS_CONFIRMED
          type: string
        takerOrderHash:
          description: Taker order hash
          example: '0xabcdef1234567890abcdef1234567890abcdef12'
          type: string
        tradeType:
          description: Trade type
          example: TAKER
          type: string
        transactionHash:
          description: Transaction hash
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
          pattern: ^0x[a-fA-F0-9]{64}$
          type: string
        updatedAt:
          description: Last update timestamp
          example: '2024-01-01T00:00:00Z'
          format: date-time
          type: string
      required:
        - id
        - tradeType
        - takerOrderHash
        - builder
        - market
        - assetId
        - side
        - size
        - sizeUsdc
        - price
        - status
        - outcome
        - outcomeIndex
        - owner
        - maker
        - transactionHash
        - matchTime
        - bucketIndex
        - fee
        - feeUsdc
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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