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

# Perp OHLCV candles

> OHLCV candles for a perp market. Reads from `perp_ohlcv_<timeframe>` rollup tables.




## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/perp/markets/{market_id}/candles
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    Also hosts write utilities (`/utils/sol/*`): token launch, transfer, burn,

    consolidate, fees claim/config, and agent initialize — previously on

    `router.raze.bot`. Mixer/distribute removed 2026-07-25.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/perp/markets/{market_id}/candles:
    get:
      summary: Perp OHLCV candles
      description: >
        OHLCV candles for a perp market. Reads from `perp_ohlcv_<timeframe>`
        rollup tables.
      operationId: getPerpMarketCandles
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
          example: jup:SOL-PERP
          description: Venue-prefixed market id (e.g. `jup:SOL-PERP`).
        - name: timeframe
          in: query
          schema:
            type: string
            enum:
              - 1s
              - 1m
              - 5m
              - 15m
              - 1h
              - 4h
              - 1d
            default: 1m
        - name: from
          in: query
          schema:
            type: integer
            format: int64
          description: Start timestamp (Unix ms).
        - name: to
          in: query
          schema:
            type: integer
            format: int64
          description: End timestamp (Unix ms).
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 2000
            default: 500
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpCandlesResponse'
components:
  schemas:
    PerpCandlesResponse:
      type: object
      properties:
        market_id:
          type: string
        timeframe:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/PerpCandle'
        count:
          type: integer
    PerpCandle:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
          description: Bucket start, Unix ms.
        open:
          type: number
        high:
          type: number
        low:
          type: number
        close:
          type: number
        volume_usd:
          type: number
        trade_count:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````