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

# Agent Polymarket Positions (x402)

> Polymarket positions and collateral (USDC, pUSD) of a Polymarket wallet on Polygon, in the portfolio format. Pass the Polymarket (proxy) wallet itself: the address is read as-is. Same response as GET /portfolio/proxy/polymarket.

Paid per call via the x402 payment protocol instead of an API key. An unpaid request returns 402 with a base64 `payment-required` header carrying the payment challenge (0.025 USDC on Base, eip155:8453); an x402-capable client settles it and retries.

**The API-key REST API is the default way to use Octav.** Use these only when the caller explicitly wants pay-per-call, or is an autonomous agent holding a wallet but no API key. There is no /agent/transactions — transaction history requires an API key.

See [Agent Endpoints (x402)](https://docs.octav.fi/api/endpoints/agent-x402).



## OpenAPI

````yaml /openapi.json get /agent/portfolio/proxy/polymarket
openapi: 3.0.0
info:
  title: Octav API
  description: >-
    Comprehensive blockchain data API for portfolio management, transactions,
    and DeFi analytics
  version: 1.0.0
  contact:
    name: Octav Support
    url: https://octav.fi
    email: info@octav.fi
servers:
  - url: https://api.octav.fi/v1
    description: Production API
security:
  - bearerAuth: []
tags:
  - name: Portfolio
    description: Portfolio and holdings endpoints
  - name: Virtual Users
    description: Virtual user management and portfolio endpoints (Pro only)
  - name: Nav
    description: Net Asset Value endpoints
  - name: Wallet
    description: Wallet information endpoints
  - name: Transactions
    description: Transaction history endpoints
  - name: Approvals
    description: Token approval endpoints
  - name: Tokens
    description: Token data endpoints
  - name: Airdrops
    description: Airdrop eligibility endpoints
  - name: Polymarket
    description: Polymarket prediction market positions
  - name: Snapshot Subscriptions
    description: >-
      Subscribe addresses to daily portfolio snapshots, renew them, and list
      what your key can read
  - name: Sync
    description: Data synchronization endpoints
  - name: Status
    description: Status check endpoints
  - name: Credits
    description: Credit balance endpoints
  - name: Chains
    description: Blockchain network and protocol endpoints
  - name: Contract Protocol
    description: Resolve a contract address to its DeFi protocol
  - name: Agent (x402)
    description: >-
      Pay-per-call endpoints for autonomous agents via the x402 protocol — no
      API key. A nine-endpoint subset; the API-key REST endpoints above are the
      default.
  - name: Beacon Validators
    description: >-
      Ethereum beacon chain validator endpoints — details, rewards, withdrawals,
      and deposits (mainnet only)
  - name: Address Book
    description: >-
      Manage the wallet addresses saved to your account — the list a bundle
      draws from
  - name: Bundles
    description: Group saved address book addresses into named bundles
paths:
  /agent/portfolio/proxy/polymarket:
    get:
      tags:
        - Agent (x402)
      summary: Agent Polymarket Positions (x402)
      description: >-
        Polymarket positions and collateral (USDC, pUSD) of a Polymarket wallet
        on Polygon, in the portfolio format. Pass the Polymarket (proxy) wallet
        itself: the address is read as-is. Same response as GET
        /portfolio/proxy/polymarket.


        Paid per call via the x402 payment protocol instead of an API key. An
        unpaid request returns 402 with a base64 `payment-required` header
        carrying the payment challenge (0.025 USDC on Base, eip155:8453); an
        x402-capable client settles it and retries.


        **The API-key REST API is the default way to use Octav.** Use these only
        when the caller explicitly wants pay-per-call, or is an autonomous agent
        holding a wallet but no API key. There is no /agent/transactions —
        transaction history requires an API key.


        See [Agent Endpoints
        (x402)](https://docs.octav.fi/api/endpoints/agent-x402).
      operationId: getAgentPolymarketPositions
      parameters:
        - name: addresses
          in: query
          required: true
          description: >-
            Polymarket (proxy) wallet address on Polygon. Only one address is
            accepted per call; a comma-separated list returns `400 Multiple
            addresses not supported yet`.
          schema:
            type: string
          example: '0x1234567890abcdef1234567890abcdef12345678'
        - name: aggregated
          in: query
          required: false
          description: >-
            Return the result without the `address` field. The endpoint takes
            one address, so there is nothing to combine and the positions are
            unchanged.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response — same shape as the API-key equivalent
          content:
            application/json:
              schema:
                type: object
        '402':
          description: >-
            Payment required — the x402 challenge, not an error. Read the
            `payment-required` header, settle the payment, retry.
          headers:
            payment-required:
              description: >-
                Base64-encoded JSON x402 payment challenge (x402Version,
                resource, accepts, extensions).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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