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

# Get market candlesticks by condition_id

> Retrieve OHLCV candlestick data for a market by its condition_id



## OpenAPI

````yaml https://api.struct.to/openapi.json get /polymarket/market/candlestick
openapi: 3.1.0
info:
  title: Polymarket API
  description: >-
    RESTful API for querying Polymarket prediction markets data including
    events, markets, traders, holders, and real-time metrics
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.struct.to/v1
security: []
paths:
  /polymarket/market/candlestick:
    get:
      tags:
        - Market
      summary: Get market candlesticks by condition_id
      description: Retrieve OHLCV candlestick data for a market by its condition_id
      operationId: get_market_candlestick
      parameters:
        - name: condition_id
          in: query
          description: Market condition ID (required)
          required: true
          schema:
            type: string
        - name: resolution
          in: query
          description: 'Candle interval: 1S, 5S, 10S, 30S, 1, 5, 15, 30, 60, 240, D, 1D'
          required: true
          schema:
            $ref: '#/components/schemas/CandlestickResolution'
        - name: count_back
          in: query
          description: 'Number of candles (max: 2500)'
          required: false
          schema:
            type: integer
            format: int32
        - name: from
          in: query
          description: Start timestamp (Unix seconds)
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: End timestamp (Unix seconds)
          required: false
          schema:
            type: integer
            format: int64
        - name: pagination_key
          in: query
          description: Cursor-based pagination key from previous response
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OHLCV candlestick data
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PredictionCandlestickBar'
components:
  schemas:
    CandlestickResolution:
      type: string
      enum:
        - 1S
        - 5S
        - 10S
        - 30S
        - '1'
        - '5'
        - '15'
        - '30'
        - '60'
        - '240'
        - D
        - 1D
    PredictionCandlestickBar:
      type: object
      required:
        - t
      properties:
        l:
          type:
            - number
            - 'null'
          format: double
          description: Low price.
        h:
          type:
            - number
            - 'null'
          format: double
          description: High price.
        o:
          type:
            - number
            - 'null'
          format: double
          description: Open price.
        c:
          type:
            - number
            - 'null'
          format: double
          description: Close price.
        v:
          type:
            - number
            - 'null'
          format: double
          description: Total volume in USD.
        t:
          type: integer
          format: int64
          description: Unix timestamp in seconds.
          minimum: 0
        tc:
          type:
            - integer
            - 'null'
          format: int32
          description: Total transaction count.
        m:
          type:
            - number
            - 'null'
          format: double
          description: Market metadata for this point.

````