> ## 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
> ## Agent Instructions (AIsa)
>
> - 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`.
> - Paid calls need approval first. Docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP discovery are free to read. Before any paid, dynamically priced, or high-cost call, state the exact scope, rate, and maximum USD exposure, then wait for a separate user message approving that scope and cap. A request to collect data is not approval; do not send unapproved probes. Full rule: https://aisa.one/docs/llms.txt

# Get user earnings and markets configuration

> Returns user earnings together with market configurations. Requires API key auth headers.

<!-- aisa-pricing:start -->
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Request contract

* **Method and path:** GET /apis/v1/polymarket/rewards/user/markets
* **Request URL template:** [https://api.aisa.one/apis/v1/polymarket/rewards/user/markets](https://api.aisa.one/apis/v1/polymarket/rewards/user/markets)
* **date:** query; optional
* **favorite\_markets:** query; optional
* **maker\_address:** query; optional
* **next\_cursor:** query; optional
* **no\_competition:** query; optional
* **only\_mergeable:** query; optional
* **only\_open\_orders:** query; optional
* **only\_open\_positions:** query; optional
* **order\_by:** query; optional
* **page\_size:** query; optional
* **position:** query; optional
* **q:** query; optional
* **signature\_type:** query; optional
* **sponsored:** query; optional
* **tag\_slug:** query; optional
* **Runtime facts:** 3ef99d33457af3e3c3b16299db54930852c884758cba034bdda67a08da5ab7fb

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

Effective request and pricing declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "any_polymarket_clob_apis_v1_polymarket_rewards_us_50d129",
  "method": "GET",
  "path": "/apis/v1/polymarket/rewards/user/markets",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "name": "date",
      "in": "query",
      "description": "Date in YYYY-MM-DD format. Defaults to current date if not provided.",
      "required": false,
      "schema": {
        "type": "string",
        "format": "date"
      },
      "example": "2024-03-26"
    },
    {
      "name": "favorite_markets",
      "in": "query",
      "description": "If true, only show markets favorited by the user (requires auth)",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "maker_address",
      "in": "query",
      "description": "Maker address to query data for",
      "required": false,
      "schema": {
        "type": "string"
      },
      "example": "0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604"
    },
    {
      "name": "next_cursor",
      "in": "query",
      "description": "Pagination cursor from previous response",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "no_competition",
      "in": "query",
      "description": "Filter for markets with no competition",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "only_mergeable",
      "in": "query",
      "description": "Filter for only mergeable markets",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "only_open_orders",
      "in": "query",
      "description": "Filter for markets where user has open orders",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "only_open_positions",
      "in": "query",
      "description": "Filter for markets where user has open positions",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "order_by",
      "in": "query",
      "description": "Field to sort by",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "max_spread",
          "min_size",
          "end_date",
          "earning_percentage",
          "rate_per_day",
          "earnings",
          "spread",
          "competitiveness",
          "question",
          "price",
          "market",
          "volume_24hr"
        ]
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "description": "Number of items per page (max 500, values above are capped)",
      "required": false,
      "schema": {
        "type": "integer",
        "default": 100,
        "maximum": 500
      }
    },
    {
      "name": "position",
      "in": "query",
      "description": "Sort direction",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ]
      }
    },
    {
      "name": "q",
      "in": "query",
      "description": "Search query to filter markets by question/description",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "signature_type",
      "in": "query",
      "description": "Signature type for address derivation (required for API KEY auth):\n- 0: EOA\n- 1: POLY_PROXY\n- 2: POLY_GNOSIS_SAFE\n",
      "required": false,
      "schema": {
        "type": "integer",
        "enum": [
          0,
          1,
          2
        ]
      }
    },
    {
      "name": "sponsored",
      "in": "query",
      "description": "If true, returns sponsored reward earnings",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      }
    },
    {
      "name": "tag_slug",
      "in": "query",
      "description": "Filter by tag slug (can be repeated for OR logic)",
      "required": false,
      "schema": {
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-pricing": {
    "cost_contract": "fixed_success",
    "customer_pricing": "fixed_success",
    "default_request_estimate_usd": 0.012,
    "estimate_source": "profile_seed",
    "evidence_source": "request_snapshot"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.012 USD per successful request. Account-specific pricing and final settlement may differ.

Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

* **Default request reference estimate (USD):** 0.012
* **Cost contract:** fixed\_success
* **Settlement evidence source:** request\_snapshot


## OpenAPI

````yaml openapi/polymarket-clob.json GET /apis/v1/polymarket/rewards/user/markets
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: 3ef99d33457af3e3c3b16299db54930852c884758cba034bdda67a08da5ab7fb
    generator_version: '3'
    protocol_version: '1'
    schema_version: '1'
    composer_version: '20'
    response_pending: []
    document_hash: sha256:4f5e4ee43fc291a2eac81a6de1e0cf1aa0b2c203f52e26bb112d5fa95e18ab72
  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: 3ef99d33457af3e3c3b16299db54930852c884758cba034bdda67a08da5ab7fb
        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-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/rewards/user/markets:
    get:
      tags:
        - default
      summary: Get user earnings and markets configuration
      description: >-
        Returns user earnings together with market configurations. Requires API
        key auth headers.


        <!-- aisa-pricing:start -->

        Published reference price: $0.012 USD per successful request.
        Account-specific pricing and final settlement may differ.

        <!-- aisa-pricing:end -->
      operationId: any_polymarket_clob_apis_v1_polymarket_rewards_us_50d129
      parameters:
        - name: date
          in: query
          description: Date in YYYY-MM-DD format. Defaults to current date if not provided.
          required: false
          schema:
            type: string
            format: date
          example: '2024-03-26'
        - name: favorite_markets
          in: query
          description: If true, only show markets favorited by the user (requires auth)
          required: false
          schema:
            type: boolean
            default: false
        - name: maker_address
          in: query
          description: Maker address to query data for
          required: false
          schema:
            type: string
          example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
        - name: next_cursor
          in: query
          description: Pagination cursor from previous response
          required: false
          schema:
            type: string
        - name: no_competition
          in: query
          description: Filter for markets with no competition
          required: false
          schema:
            type: boolean
            default: false
        - name: only_mergeable
          in: query
          description: Filter for only mergeable markets
          required: false
          schema:
            type: boolean
            default: false
        - name: only_open_orders
          in: query
          description: Filter for markets where user has open orders
          required: false
          schema:
            type: boolean
            default: false
        - name: only_open_positions
          in: query
          description: Filter for markets where user has open positions
          required: false
          schema:
            type: boolean
            default: false
        - name: order_by
          in: query
          description: Field to sort by
          required: false
          schema:
            type: string
            enum:
              - max_spread
              - min_size
              - end_date
              - earning_percentage
              - rate_per_day
              - earnings
              - spread
              - competitiveness
              - question
              - price
              - market
              - volume_24hr
        - name: page_size
          in: query
          description: Number of items per page (max 500, values above are capped)
          required: false
          schema:
            type: integer
            default: 100
            maximum: 500
        - name: position
          in: query
          description: Sort direction
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
        - name: q
          in: query
          description: Search query to filter markets by question/description
          required: false
          schema:
            type: string
        - name: signature_type
          in: query
          description: |
            Signature type for address derivation (required for API KEY auth):
            - 0: EOA
            - 1: POLY_PROXY
            - 2: POLY_GNOSIS_SAFE
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
              - 2
        - name: sponsored
          in: query
          description: If true, returns sponsored reward earnings
          required: false
          schema:
            type: boolean
            default: false
        - name: tag_slug
          in: query
          description: Filter by tag slug (can be repeated for OR logic)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved user earnings and market configurations
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseE58613C05201_PaginatedUserRewardsMarkets
              example:
                limit: 100
                count: 1
                total_count: 42
                next_cursor: LTE=
                data:
                  - condition_id: >-
                      0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
                    market_id: '248849'
                    event_id: '12345'
                    question: Will Trump win the 2024 Iowa Caucus?
                    market_slug: will-trump-win-the-2024-iowa-caucus
                    event_slug: will-trump-win-the-2024-iowa-caucus
                    image: >-
                      https://polymarket-upload.s3.us-east-2.amazonaws.com/trump1+copy.png
                    rewards_max_spread: 99
                    rewards_min_size: 10
                    volume_24hr: 12345.67
                    spread: 0.12
                    market_competitiveness: 0.42
                    tokens:
                      - token_id: >-
                          1343197538147866997676250008839231694243646439454152539053893078719042421992
                        outcome: 'YES'
                        price: 0.8
                      - token_id: >-
                          16678291189211314787145083999015737376658799626183230671758641503291735614088
                        outcome: 'NO'
                        price: 0.2
                    rewards_config:
                      - id: 0
                        asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
                        start_date: '2024-03-01'
                        end_date: '2500-12-31'
                        rate_per_day: 2
                        total_rewards: 92
                    maker_address: '0xD527CCdBEB6478488c848465F9947bDA3C2e6994'
                    earning_percentage: 30
                    earnings:
                      - asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
                        earnings: 0.585051
                        asset_rate: 1.001
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseE58613C05201_PaginatedUserRewardsMarkets:
      type: object
      description: Paginated list of user rewards markets
      properties:
        limit:
          type: integer
          description: Maximum number of items per page
        count:
          type: integer
          description: Number of items in the current response
        total_count:
          type: integer
          description: Total number of items across all pages
        next_cursor:
          type: string
          description: Cursor for the next page. "LTE=" indicates the last page.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ResponseE58613C05201_UserRewardsMarket'
      required:
        - limit
        - count
        - next_cursor
        - data
    ResponseE58613C05201_UserRewardsMarket:
      type: object
      description: Market with user rewards earnings and configuration
      properties:
        condition_id:
          type: string
          description: Condition ID of the market
        market_id:
          type: string
          description: Market ID
        event_id:
          type: string
          description: Event ID
        question:
          type: string
          description: Market question
        market_slug:
          type: string
          description: URL slug for the market
        event_slug:
          type: string
          description: URL slug for the event
        image:
          type: string
          description: URL to market image
        rewards_max_spread:
          type: number
          description: Maximum spread for rewards eligibility
        rewards_min_size:
          type: number
          description: Minimum order size for rewards eligibility
        volume_24hr:
          type: number
          format: double
          description: 24-hour trading volume
        spread:
          type: number
          format: double
          description: Current spread
        market_competitiveness:
          type: number
          format: double
          description: Competitiveness score of the market
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/ResponseE58613C05201_RewardsToken'
        rewards_config:
          type: array
          items:
            $ref: '#/components/schemas/ResponseE58613C05201_CurrentRewardConfig'
        maker_address:
          type: string
          description: Maker address
        earning_percentage:
          type: number
          format: double
          description: Percentage of total rewards the user is earning
        earnings:
          type: array
          items:
            $ref: '#/components/schemas/ResponseE58613C05201_AssetEarning'
      required:
        - condition_id
        - market_id
        - question
        - tokens
    ResponseE58613C05201_RewardsToken:
      type: object
      description: Token information for rewards markets
      properties:
        token_id:
          type: string
          description: Token ID
        outcome:
          type: string
          description: Outcome name (e.g., "YES", "NO")
        price:
          type: number
          format: double
          description: Current price of the token
      required:
        - token_id
        - outcome
    ResponseE58613C05201_CurrentRewardConfig:
      type: object
      description: Reward configuration entry for a current rewards market
      properties:
        id:
          type: integer
          description: Rewards config ID (always 0 on /rewards/markets/current)
        asset_address:
          type: string
          description: Address of the reward asset
        start_date:
          type: string
          format: date
          description: Start date of the rewards period
        end_date:
          type: string
          format: date
          description: End date of the rewards period
        rate_per_day:
          type: number
          format: double
          description: Daily reward rate
        total_rewards:
          type: number
          format: double
          description: Total rewards amount
      required:
        - asset_address
        - start_date
        - rate_per_day
    ResponseE58613C05201_AssetEarning:
      type: object
      description: Earnings for a specific asset
      properties:
        asset_address:
          type: string
          description: Address of the reward asset
        earnings:
          type: number
          format: double
          description: Amount of earnings
        asset_rate:
          type: number
          format: double
          description: Exchange rate of the asset
      required:
        - asset_address
        - earnings
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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