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

# Candles

> Candles for one market in ascending order, from start_time up to but not including end_time.



## OpenAPI

````yaml /data-api/openapi.json get /v1/markets/{coin}/candles
openapi: 3.1.0
info:
  title: Hyperdash Data API
  version: v1
  description: >-
    Hyperliquid data from Hyperdash's own nodes and stored datasets; requests
    never call Hyperliquid's public API. Every response reports the credits it
    cost.
servers:
  - url: https://data.hyperdash.com
security: []
tags:
  - name: Accounts
  - name: Async jobs
  - name: Builders
  - name: Cohorts
  - name: HIP-3 dexes
  - name: Leaderboards
  - name: Lending
  - name: Liquidations
  - name: Markets
  - name: 'Markets: analytics'
  - name: 'Markets: funding'
  - name: 'Markets: liquidation and stop levels'
  - name: 'Markets: open interest and positioning'
  - name: 'Markets: order book'
  - name: 'Markets: prices and candles'
  - name: 'Markets: queue priority'
  - name: 'Markets: trades and flow'
  - name: 'Markets: TWAPs'
  - name: Network
  - name: Outcomes
  - name: Positions
  - name: Referrals
  - name: Snapshots
  - name: Spot
  - name: Staking
  - name: Traders
  - name: Vaults
paths:
  /v1/markets/{coin}/candles:
    get:
      tags:
        - 'Markets: prices and candles'
      summary: Candles
      description: >-
        Candles for one market in ascending order, from `start_time` up to but
        not including `end_time`.


        **How it works**

        - Trades follow Hyperliquid's candles. Spot borrow liquidations by the
        backstop (off-book at 0.99 times mark) and internal vault netting are
        not trades.

        - Trades with a liquidated party count in `v` and `n`, but set prices
        only in a bar that has nothing else (`liq_only`).

        - Open and close are the first and last trade. Bars from Hyperdash's
        node archive (the live window, and intervals other than `1m` within the
        archive) use execution order.

        - Bars from the durable 1m store (`1m` older than about 30 minutes, and
        coarser intervals older than the archive) order trades inside one
        millisecond by taker order and sweep position. This matches the
        execution order on all but about 0.05% of bar edges.


        **Limits**

        - `1m`: a range of at most 7 days.

        - `1s`, `15s`, `30s`: about the last 23 hours only, a range of at most 1
        day, and only buckets that had trades.

        - Coarser intervals: a range of at most 7 days for bars shorter than
        `1h`, 30 days for bars shorter than `1d`, and 365 days for `1d` and
        coarser.

        - A page holds at most 5,000 bars.

        - Without `start_time`, `1m` reads the 24 hours before `end_time`. Every
        other interval reads `limit` bars (at most 1,000) back from `end_time`,
        within the interval's range cap and your plan's history: `interval=1h`
        alone returns about 30 days.


        **Notes**

        - `meta.forming` flags an unfinished last bar.

        - For HIP-4 outcome markets, set `coin` to `#<outcome id><side>`, for
        example `#232960`.

        - For taker buy and sell volume and liquidations per bar, use `GET
        /v1/markets/{coin}/trade-bars`. For one open, high, low and close over a
        window for many markets at once, use `GET /v1/markets/window-prices`.


        **Credits:** 10 per request + 1 per row + 2 per node read. Range
        multiplier: ×1 to 1,440 bars, ×2 above.


        **Scope:** `markets:read`
      operationId: getCandles
      parameters:
        - name: coin
          in: path
          required: true
          description: >-
            Market, for example `BTC`, `xyz:TSLA` or `#232960`, which is an
            outcome side. URL-encode `#` as `%23`.
          schema:
            type: string
        - name: interval
          in: query
          required: false
          description: >-
            `1m` is the exact archive, at most 7 days per call. `1s`, `15s` and
            `30s` cover about the last 23 hours, at most 1 day per call. `3m`,
            `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `3d`, `1w`
            and `1M` have a range of at most 7, 30 or 365 days, depending on bar
            size.
          schema:
            type: string
            default: 1m
            enum:
              - 1s
              - 15s
              - 30s
              - 1m
              - 3m
              - 5m
              - 15m
              - 30m
              - 1h
              - 2h
              - 4h
              - 8h
              - 12h
              - 1d
              - 3d
              - 1w
              - 1M
        - name: limit
          in: query
          required: false
          description: Rows per page.
          schema:
            type: integer
            minimum: 1
            maximum: 5000
            default: 1000
        - name: start_time
          in: query
          required: false
          description: >-
            Start time in epoch milliseconds, inclusive. Defaults to 24 hours
            before `end_time`.
          schema:
            type: integer
        - name: end_time
          in: query
          required: false
          description: End time in epoch milliseconds. Defaults to now.
          schema:
            type: integer
        - name: cursor
          in: query
          required: false
          description: Opaque cursor from `next_cursor`. It replaces the range.
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-Credits-Charged:
              schema:
                type: integer
            X-Credit-Price-Version:
              schema:
                type: integer
            X-Request-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        t:
                          type: integer
                          description: Minute start, in epoch milliseconds.
                        o:
                          type: string
                          description: Open. Decimal string.
                        h:
                          type: string
                          description: High. Decimal string.
                        l:
                          type: string
                          description: Low. Decimal string.
                        c:
                          type: string
                          description: Close. Decimal string.
                        v:
                          type: string
                          description: Base volume. Decimal string.
                        q:
                          type:
                            - string
                            - 'null'
                          description: Quote volume, in USD. Decimal string.
                        'n':
                          type: integer
                          description: Trades.
                        liq_only:
                          type:
                            - boolean
                            - 'null'
                          description: >-
                            `true` when the prices of the bar come only from
                            liquidation fills, `false` when they come from
                            regular trades or `null` when unknown. Unknown
                            applies to `1m` bars older than the live window and
                            to bars before 2025-07-28.
                    description: Result rows.
                  has_more:
                    type: boolean
                    description: '`true` when another page follows.'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor for the next page, passed as `cursor`. `null` on
                      the last page.
                  meta:
                    type: object
                    description: >-
                      Response metadata. Its keys depend on the endpoint and are
                      described above.
        '400':
          description: 'Invalid parameter (also: a request body that is not valid JSON)'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Invalid, expired or revoked key
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Scope, plan, history or credit limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Price version changed, or a cursor's snapshot expired
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: >-
            Rate limited (Retry-After; free): request rate, concurrent requests
            (a request counts one slot per 1,000 rows it can return), or this
            server busy with your workspace's requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Upstream data source failed (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Backend at capacity or temporarily unavailable (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '504':
          description: Upstream data source timed out (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
      x-codeSamples:
        - lang: curl
          source: >-
            curl -H "Authorization: Bearer $HYPERDASH_API_KEY"
            'https://data.hyperdash.com/v1/markets/BTC/candles?limit=60'
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        hint:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your API key, sent as `Bearer hdk_sk_live_v1_…`.

````

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