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

# Chart-ready candle series with market cap

> Candle series for the token's top-volume pair, optionally enriched with per-row `market_cap_sol` (= `close × current_supply_atomic / 10^decimals`). Use this when rendering a market-cap-aware chart without round-tripping a supply lookup yourself.

`historicalSupply=true` is accepted but currently ignored — historical supply tracking from `tokens_supply_history` ships in Phase 5. When `marketCap=false` (the default), `market_cap_sol` is `null` on every row.



## OpenAPI

````yaml /api-reference/openapi.json get /chart/{token}
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:
  /chart/{token}:
    get:
      tags:
        - Price
      summary: Chart-ready candle series with market cap
      description: >-
        Candle series for the token's top-volume pair, optionally enriched with
        per-row `market_cap_sol` (= `close × current_supply_atomic /
        10^decimals`). Use this when rendering a market-cap-aware chart without
        round-tripping a supply lookup yourself.


        `historicalSupply=true` is accepted but currently ignored — historical
        supply tracking from `tokens_supply_history` ships in Phase 5. When
        `marketCap=false` (the default), `market_cap_sol` is `null` on every
        row.
      operationId: getChart
      parameters:
        - name: token
          in: path
          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: marketCap
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: When true, populate `market_cap_sol` on every row.
        - name: historicalSupply
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Reserved for Phase 5. Accepted but ignored today.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 200
            minimum: 1
            maximum: 1000
      responses:
        '200':
          description: Chart series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartResponse'
        '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:
    ChartResponse:
      type: object
      description: Chart-ready candle series with optional per-row market cap.
      properties:
        pair_address:
          type: string
        results:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/PriceHistoryPoint'
              - type: object
                properties:
                  market_cap_sol:
                    type:
                      - number
                      - 'null'
                    description: >-
                      `close × supply_atomic / 10^decimals`. Null when
                      `marketCap=false` (default).
        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.

````