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

# Surf Polymarket OHLCV Candlesticks

> Surf Polymarket OHLCV Candlesticks

> **Request example pending verification.** The request example for this endpoint has not yet been verified in production. Static examples describe the request format; replace sample values with your own. Check the estimated price with a free quote request (`X-AISA-Cost-Mode: quote`) before running it.

## Request contract

* **Method and path:** POST /apis/v1/surf/prediction-market/polymarket/price-ohlcv
* **Availability:** enabled
* **Request URL template:** `https://api.aisa.one/apis/v1/surf/prediction-market/polymarket/price-ohlcv`

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

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "post_surf_apis_v1_surf_prediction_market_polymark_03680a",
  "method": "POST",
  "path": "/apis/v1/surf/prediction-market/polymarket/price-ohlcv",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "additionalProperties": false,
          "properties": {
            "condition_id": {
              "description": "Polymarket condition ID. Example: 0x6fefc0438c7598b23531457c8c60541990d0786bd4bd9dfc3eabc8d95c291092.",
              "minLength": 1,
              "type": "string"
            },
            "end_time": {
              "description": "End time (Unix seconds). 0 means current time. Cache aligns to 5-minute buckets, so two requests within the same bucket return the same cached result.",
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "interval": {
              "default": 60,
              "description": "Candle interval in minutes: 1=1min, 60=1hour, 1440=1day. Defaults to 60.",
              "maximum": 1440,
              "minimum": 1,
              "type": "integer"
            },
            "start_time": {
              "description": "Start time (Unix seconds). 0 means no lower bound. Cache aligns to 5-minute buckets, so two requests within the same bucket return the same cached result.",
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "condition_id"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Observed response structure

The response observations below come from successful probes or sampled requests. They are partial: fields and types may vary, and no field is guaranteed to be present. Reviewed response definitions take precedence. No real response values are published.

* **HTTP status / last observed:** 200 / 2026-11-14

```json theme={null}
{
  "additionalProperties": true,
  "properties": {
    "data": {
      "additionalProperties": true,
      "properties": {
        "candles": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "close": {
                "type": "number"
              },
              "end_period_ts": {
                "type": "integer"
              },
              "high": {
                "type": "number"
              },
              "low": {
                "type": "number"
              },
              "open": {
                "type": "number"
              },
              "timestamp": {
                "type": "integer"
              },
              "trades_count": {
                "type": "integer"
              },
              "volume": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "condition_id": {
          "type": "string"
        },
        "interval": {
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

## Cost and request rules

Usage-based pricing. A price estimate is not currently available. Your account price may differ; use a request quote where supported.

## Response time

* Typically returns within 10 seconds.


## OpenAPI

````yaml openapi-public/surf.json POST /apis/v1/surf/prediction-market/polymarket/price-ohlcv
openapi: 3.1.0
info:
  description: ''
  title: Surf
  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:
    surf:
      description: ''
      title: Surf
      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: d96005d64c9f96c9ed25e4a0ac8b1d46dd87c835987c88e74a39e1f863f70a2e
        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/surf/dex/token/price
    - /apis/v1/surf/exchange/candles
    - /apis/v1/surf/exchange/coverage
    - /apis/v1/surf/exchange/depth
    - /apis/v1/surf/exchange/funding-history
    - /apis/v1/surf/exchange/klines
    - /apis/v1/surf/exchange/long-short-ratio
    - /apis/v1/surf/exchange/markets
    - /apis/v1/surf/exchange/perp
    - /apis/v1/surf/exchange/price
    - /apis/v1/surf/fund/detail
    - /apis/v1/surf/fund/portfolio
    - /apis/v1/surf/fund/ranking
    - /apis/v1/surf/heatscore/detail
    - /apis/v1/surf/heatscore/projects
    - /apis/v1/surf/heatscore/token-of-the-day
    - /apis/v1/surf/heatscore/token-of-week
    - /apis/v1/surf/hyperliquid/account
    - /apis/v1/surf/hyperliquid/candles
    - /apis/v1/surf/hyperliquid/fills
    - /apis/v1/surf/hyperliquid/leaderboard
    - /apis/v1/surf/hyperliquid/orders
    - /apis/v1/surf/hyperliquid/performance
    - /apis/v1/surf/hyperliquid/positions
    - /apis/v1/surf/hyperliquid/trades
    - /apis/v1/surf/hyperliquid/trades/aggregate
    - /apis/v1/surf/hyperliquid/trades/context
    - /apis/v1/surf/market/etf
    - /apis/v1/surf/market/exchange-flow/exchanges
    - /apis/v1/surf/market/fear-greed
    - /apis/v1/surf/market/futures
    - /apis/v1/surf/market/liquidation/chart
    - /apis/v1/surf/market/liquidation/exchange-list
    - /apis/v1/surf/market/liquidation/order
    - /apis/v1/surf/market/listing
    - /apis/v1/surf/market/options
    - /apis/v1/surf/market/price
    - /apis/v1/surf/market/price-indicator
    - /apis/v1/surf/market/public-sale
    - /apis/v1/surf/market/ranking
    - /apis/v1/surf/market/tge
    - /apis/v1/surf/news/detail
    - /apis/v1/surf/news/feed
    - /apis/v1/surf/onchain/bridge/ranking
    - /apis/v1/surf/onchain/dex/activity
    - /apis/v1/surf/onchain/gas-price
    - /apis/v1/surf/onchain/query
    - /apis/v1/surf/onchain/schema
    - /apis/v1/surf/onchain/sql
    - /apis/v1/surf/onchain/sql/preflight
    - /apis/v1/surf/onchain/tx
    - /apis/v1/surf/onchain/yield/ranking
    - /apis/v1/surf/prediction-market/analytics
    - /apis/v1/surf/prediction-market/correlations
    - /apis/v1/surf/prediction-market/kalshi/events
    - /apis/v1/surf/prediction-market/kalshi/markets
    - /apis/v1/surf/prediction-market/kalshi/open-interest
    - /apis/v1/surf/prediction-market/kalshi/orderbooks
    - /apis/v1/surf/prediction-market/kalshi/prices
    - /apis/v1/surf/prediction-market/kalshi/trades
    - /apis/v1/surf/prediction-market/kalshi/volumes
    - /apis/v1/surf/prediction-market/matching/daily
    - /apis/v1/surf/prediction-market/matching/pairs
    - /apis/v1/surf/prediction-market/polymarket/events
    - /apis/v1/surf/prediction-market/polymarket/leaderboard
    - /apis/v1/surf/prediction-market/polymarket/markets
    - /apis/v1/surf/prediction-market/polymarket/open-interest
    - /apis/v1/surf/prediction-market/polymarket/orderbooks
    - /apis/v1/surf/prediction-market/polymarket/positions
    - /apis/v1/surf/prediction-market/polymarket/price-ohlcv
    - /apis/v1/surf/prediction-market/polymarket/prices
    - /apis/v1/surf/prediction-market/polymarket/smart-money
    - /apis/v1/surf/prediction-market/polymarket/trades
    - /apis/v1/surf/prediction-market/polymarket/volume-split
    - /apis/v1/surf/prediction-market/polymarket/volumes
    - /apis/v1/surf/project/ai-news
    - /apis/v1/surf/project/defi/metrics
    - /apis/v1/surf/project/defi/ranking
    - /apis/v1/surf/project/detail
    - /apis/v1/surf/search/airdrop
    - /apis/v1/surf/search/airdrop/activities
    - /apis/v1/surf/search/events
    - /apis/v1/surf/search/fund
    - /apis/v1/surf/search/fundraising
    - /apis/v1/surf/search/news
    - /apis/v1/surf/search/prediction-market
    - /apis/v1/surf/search/project
    - /apis/v1/surf/search/token
    - /apis/v1/surf/search/wallet
    - /apis/v1/surf/search/web
    - /apis/v1/surf/token/dex-trades
    - /apis/v1/surf/token/holders
    - /apis/v1/surf/token/tokenomics
    - /apis/v1/surf/token/transfer-counterparties
    - /apis/v1/surf/token/transfer-stats
    - /apis/v1/surf/token/transfers
    - /apis/v1/surf/wallet/detail
    - /apis/v1/surf/wallet/history
    - /apis/v1/surf/wallet/labels/batch
    - /apis/v1/surf/wallet/net-worth
    - /apis/v1/surf/wallet/protocols
    - /apis/v1/surf/wallet/transfers
    - /apis/v1/surf/web/fetch
  x-aisa-document:
    composer_version: '31'
    facts_hash: d96005d64c9f96c9ed25e4a0ac8b1d46dd87c835987c88e74a39e1f863f70a2e
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    public_projection:
      version: '4'
      source_document_hash: sha256:847874094b3b7b2971889d77245e2c1c7f830017b46b94acde2adf294ccdbbeb
    document_hash: sha256:77a49b364391839a68dfe3c5381ec6ff3b9ab5f577d20abdd956097fcfb3f970
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: surf
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/surf/prediction-market/polymarket/price-ohlcv:
    post:
      tags:
        - Surf
      summary: Surf Polymarket OHLCV Candlesticks
      description: >-
        Surf Polymarket OHLCV Candlesticks


        > **Request example pending verification.** The request example for this
        endpoint has not yet been verified in production. Static examples
        describe the request format; replace sample values with your own. Check
        the estimated price with a free quote request (`X-AISA-Cost-Mode:
        quote`) before running it.
      operationId: post_surf_apis_v1_surf_prediction_market_polymark_03680a
      requestBody:
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              additionalProperties: false
              properties:
                condition_id:
                  description: >-
                    Polymarket condition ID. Example:
                    0x6fefc0438c7598b23531457c8c60541990d0786bd4bd9dfc3eabc8d95c291092.
                  minLength: 1
                  type: string
                end_time:
                  description: >-
                    End time (Unix seconds). 0 means current time. Cache aligns
                    to 5-minute buckets, so two requests within the same bucket
                    return the same cached result.
                  maximum: 9007199254740991
                  minimum: 0
                  type: integer
                interval:
                  default: 60
                  description: >-
                    Candle interval in minutes: 1=1min, 60=1hour, 1440=1day.
                    Defaults to 60.
                  maximum: 1440
                  minimum: 1
                  type: integer
                start_time:
                  description: >-
                    Start time (Unix seconds). 0 means no lower bound. Cache
                    aligns to 5-minute buckets, so two requests within the same
                    bucket return the same cached result.
                  maximum: 9007199254740991
                  minimum: 0
                  type: integer
              required:
                - condition_id
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/OwnedResponse_42b79b0b61d7696ad1b056fa8d84e8f1d0a75fc93411106b62c5a77ed66c87da
          description: Normalized successful response
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    OwnedResponse_42b79b0b61d7696ad1b056fa8d84e8f1d0a75fc93411106b62c5a77ed66c87da:
      $schema: https://json-schema.org/draft/2020-12/schema
      additionalProperties: false
      properties:
        data:
          additionalProperties: false
          properties:
            candles:
              items:
                $ref: >-
                  #/components/schemas/OwnedDefinition_29c36c19b3ec229427634ede0b02b1cbdf0a8ca65af79bfb0ab9e909a4050d3a
              type:
                - array
                - 'null'
            condition_id:
              type: string
            interval:
              format: int64
              type: integer
          required:
            - condition_id
            - interval
            - candles
          type: object
      required:
        - data
      type: object
    OwnedDefinition_29c36c19b3ec229427634ede0b02b1cbdf0a8ca65af79bfb0ab9e909a4050d3a:
      additionalProperties: false
      properties:
        close:
          description: Closing price
          format: double
          type: number
        end_period_ts:
          description: Period end Unix timestamp (seconds)
          format: int64
          type: integer
        high:
          description: Highest price in period
          format: double
          type: number
        low:
          description: Lowest price in period
          format: double
          type: number
        open:
          description: Opening price
          format: double
          type: number
        timestamp:
          description: Period start Unix timestamp (seconds)
          format: int64
          type: integer
        trades_count:
          description: Number of trades
          format: int64
          type: integer
        volume:
          description: Total shares traded
          format: double
          type: number
      required:
        - timestamp
        - end_period_ts
        - open
        - high
        - low
        - close
        - volume
        - trades_count
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

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