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

# Historical price series for a token

> OHLCV candles for the token's top-volume pair. The pair is resolved automatically — pass `?token={mint}` and the handler picks the busiest pool. For explicit pair-level access use [GET /api/v1/candles](/api-reference/openapi/get/api/v1/candles).

Default resolution is `1m`. See [Timeframes & resolution](/concepts/timeframes-resolution) for the resolution → MV mapping.



## OpenAPI

````yaml /api-reference/openapi.json get /price/history
openapi: 3.1.0
info:
  title: Dexploit API
  version: 1.0.0
  description: Real-time and historical Solana DEX swap and OHLCV data.
servers:
  - url: https://api.dexploit.dev
    description: Production
security:
  - ApiKeyHeader: []
  - BearerAuth: []
  - ApiKeyQuery: []
paths:
  /price/history:
    get:
      tags:
        - Price
      summary: Historical price series for a token
      description: >-
        OHLCV candles for the token's top-volume pair. The pair is resolved
        automatically — pass `?token={mint}` and the handler picks the busiest
        pool. For explicit pair-level access use [GET
        /api/v1/candles](/api-reference/openapi/get/api/v1/candles).


        Default resolution is `1m`. See [Timeframes &
        resolution](/concepts/timeframes-resolution) for the resolution → MV
        mapping.
      operationId: getPriceHistory
      parameters:
        - name: token
          in: query
          required: true
          schema:
            type: string
          description: Token mint (base58).
        - name: resolution
          in: query
          required: false
          schema:
            type: string
            enum:
              - 1m
              - 5m
              - 1h
              - 1d
            default: 1m
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 200
            minimum: 1
            maximum: 1000
      responses:
        '200':
          description: Candle series for the token's top pair
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceHistorySeries'
        '400':
          description: Invalid token or unsupported resolution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: No pair found for token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    PriceHistorySeries:
      type: object
      description: Candle series for a token's top-volume pair.
      properties:
        pair_address:
          type: string
          description: The pair the series was sourced from.
        results:
          type: array
          items:
            $ref: '#/components/schemas/PriceHistoryPoint'
        computed_at:
          type: integer
          format: int64
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_PARAM
            message:
              type: string
              example: >-
                use pair_address; see /api/v1/pairs?token_address=X to discover
                pools
    PriceHistoryPoint:
      type: object
      description: Single OHLCV row. `volume_sol` is **lamports** (divide by 1e9 for SOL).
      properties:
        ts_ms:
          type: integer
          format: int64
          description: Bar start, Unix epoch milliseconds.
        open:
          type: number
        high:
          type: number
        low:
          type: number
        close:
          type: number
        volume_sol:
          type: integer
          format: int64
          description: '**Lamports**, despite the name. Divide by 1e9 for SOL.'
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Preferred for swaps-api endpoints (`/swaps/*`, `/stats/*`, `/trending`,
        `/pool-events`).
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Required by the OHLCV endpoints (`/api/v1/*`) and accepted by every
        other endpoint. Send `Authorization: Bearer ohlcv_live_sk_<your_key>`.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        Browser-friendly alternative to the Bearer header — accepted by every
        endpoint and required for WebSocket from the browser.

````