> ## 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 user earnings and markets configuration

> Returns an array of current rewards including user earnings and live percentages
per market for a provided day.

Results are paginated (100 items per page by default, max 500). Use next_cursor to fetch subsequent pages.
A next_cursor value of "LTE=" indicates the last page.

Requires CLOB L2 Auth headers.

Optional features:
- Search by question/description using the `q` parameter
- Filter by tag slugs using `tag_slug` parameter (multiple values are OR'ed)
- Filter by favorite markets using `favorite_markets=true`
- Sort by various fields using `order_by` and `position` parameters

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

## Request contract

* **Method and path:** GET /apis/v1/polymarket/rewards/user/markets
* **Availability:** enabled
* **Request URL template:** `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

[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_rewards_us_50d129",
  "method": "GET",
  "path": "/apis/v1/polymarket/rewards/user/markets",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Date in YYYY-MM-DD format. Defaults to current date if not provided.",
      "example": "2024-03-26",
      "in": "query",
      "name": "date",
      "required": false,
      "schema": {
        "format": "date",
        "type": "string"
      }
    },
    {
      "description": "If true, only show markets favorited by the user (requires auth)",
      "in": "query",
      "name": "favorite_markets",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Maker address to query data for",
      "example": "0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604",
      "in": "query",
      "name": "maker_address",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Pagination cursor from previous response",
      "in": "query",
      "name": "next_cursor",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Filter for markets with no competition",
      "in": "query",
      "name": "no_competition",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Filter for only mergeable markets",
      "in": "query",
      "name": "only_mergeable",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Filter for markets where user has open orders",
      "in": "query",
      "name": "only_open_orders",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Filter for markets where user has open positions",
      "in": "query",
      "name": "only_open_positions",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Field to sort by",
      "in": "query",
      "name": "order_by",
      "required": false,
      "schema": {
        "enum": [
          "max_spread",
          "min_size",
          "end_date",
          "earning_percentage",
          "rate_per_day",
          "earnings",
          "spread",
          "competitiveness",
          "question",
          "price",
          "market",
          "volume_24hr"
        ],
        "type": "string"
      }
    },
    {
      "description": "Number of items per page (max 500, values above are capped)",
      "in": "query",
      "name": "page_size",
      "required": false,
      "schema": {
        "default": 100,
        "maximum": 500,
        "type": "integer"
      }
    },
    {
      "description": "Sort direction",
      "in": "query",
      "name": "position",
      "required": false,
      "schema": {
        "enum": [
          "ASC",
          "DESC"
        ],
        "type": "string"
      }
    },
    {
      "description": "Search query to filter markets by question/description",
      "in": "query",
      "name": "q",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Signature type for address derivation (required for API KEY auth):\n- 0: EOA\n- 1: POLY_PROXY\n- 2: POLY_GNOSIS_SAFE\n",
      "in": "query",
      "name": "signature_type",
      "required": false,
      "schema": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer"
      }
    },
    {
      "description": "If true, returns sponsored reward earnings",
      "in": "query",
      "name": "sponsored",
      "required": false,
      "schema": {
        "default": false,
        "type": "boolean"
      }
    },
    {
      "description": "Filter by tag slug (can be repeated for OR logic)",
      "in": "query",
      "name": "tag_slug",
      "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/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-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/rewards/user/markets:
    get:
      tags:
        - default
      summary: Get user earnings and markets configuration
      description: >-
        Returns an array of current rewards including user earnings and live
        percentages

        per market for a provided day.


        Results are paginated (100 items per page by default, max 500). Use
        next_cursor to fetch subsequent pages.

        A next_cursor value of "LTE=" indicates the last page.


        Requires CLOB L2 Auth headers.


        Optional features:

        - Search by question/description using the `q` parameter

        - Filter by tag slugs using `tag_slug` parameter (multiple values are
        OR'ed)

        - Filter by favorite markets using `favorite_markets=true`

        - Sort by various fields using `order_by` and `position` parameters


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

````

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