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

# candleSnapshot | Hyperliquid info

> Retrieves historical candlestick (OHLCV) data for a specific asset within a time range. Only the most recent 5000 candles are available.

> [!NOTE]
>
> You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See [Hyperliquid methods](https://docs.chainstack.com/docs/hyperliquid-methods.md) for the full availability breakdown.

Retrieves historical candlestick (OHLCV) data for a specific asset within a time range. Only the most recent 5000 candles are available.

## Parameters

* `type` (string, required) — Must be `"candleSnapshot"`
* `req` (object, required) — Request parameters:
  * `coin` (string, required) — Asset identifier ("BTC", "ETH" for perpetuals; "@107" for spot)
  * `interval` (string, required) — Candle interval (see supported intervals below)
  * `startTime` (integer, required) — Start time in milliseconds (epoch timestamp)
  * `endTime` (integer, required) — End time in milliseconds (epoch timestamp)

## Returns

Returns an array of candlestick objects with OHLCV data:

* `t` — Open time timestamp (milliseconds)
* `T` — Close time timestamp (milliseconds)
* `o` — Open price (string)
* `h` — High price (string)
* `l` — Low price (string)
* `c` — Close price (string)
* `v` — Volume traded (string)
* `n` — Number of trades (integer)
* `i` — Interval (string)
* `s` — Symbol (string)

> [!WARNING]
>
> Only the most recent 5000 candles are available. Older data beyond this limit is not accessible.

## Supported intervals

`"1m"`, `"3m"`, `"5m"`, `"15m"`, `"30m"`, `"1h"`, `"2h"`, `"4h"`, `"8h"`, `"12h"`, `"1d"`, `"3d"`, `"1w"`, `"1M"`

## Example request

```shell Shell theme={"system"}
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": "candleSnapshot",
    "req": {
      "coin": "BTC",
      "interval": "1h",
      "startTime": 1754300000000,
      "endTime": 1754400000000
    }
  }' \
  https://api.hyperliquid.xyz/info
```

```python Python (hyperliquid-python-sdk) theme={"system"}
from hyperliquid.info import Info
from hyperliquid.utils import constants

info = Info(constants.MAINNET_API_URL, skip_ws=True)

candles = info.candles_snapshot(
    name="BTC",
    interval="1h",
    startTime=1754300000000,
    endTime=1754400000000,
)
print(candles)
```

```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
import * as hl from "@nktkas/hyperliquid";

const transport = new hl.HttpTransport();
const client = new hl.InfoClient({ transport });

const candles = await client.candleSnapshot({
  coin: "BTC",
  interval: "1h",
  startTime: 1754300000000,
  endTime: 1754400000000,
});
console.log(candles);
```

## Use cases

* **Technical analysis** — Analyze price patterns and calculate technical indicators
* **Charting applications** — Display candlestick charts with OHLCV data
* **Trading algorithms** — Backtest strategies using historical price data
* **Market research** — Study price movements and volatility patterns


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_candle_snapshot.json post /info
openapi: 3.0.0
info:
  title: Hyperliquid Node API - Candle Snapshot
  version: 1.0.0
servers:
  - url: https://api.hyperliquid.xyz
security: []
paths:
  /info:
    post:
      summary: Candle snapshot
      description: >-
        Retrieve historical candlestick (OHLCV) data for a specific asset within
        a time range. Only the most recent 5000 candles are available.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - req
              properties:
                type:
                  type: string
                  enum:
                    - candleSnapshot
                  default: candleSnapshot
                  description: >-
                    The request type. Must be 'candleSnapshot' to retrieve
                    candle data.
                req:
                  type: object
                  required:
                    - coin
                    - interval
                    - startTime
                    - endTime
                  default:
                    coin: BTC
                    interval: 1h
                    startTime: 1754300000000
                    endTime: 1754400000000
                  properties:
                    coin:
                      type: string
                      default: BTC
                      description: >-
                        Asset identifier (simple names like 'BTC', 'ETH' for
                        perpetuals; spot format like '@107' for spot trades)
                    interval:
                      type: string
                      enum:
                        - 1m
                        - 3m
                        - 5m
                        - 15m
                        - 30m
                        - 1h
                        - 2h
                        - 4h
                        - 8h
                        - 12h
                        - 1d
                        - 3d
                        - 1w
                        - 1M
                      default: 1h
                      description: Candle interval/timeframe
                    startTime:
                      type: integer
                      format: int64
                      default: 1754300000000
                      description: Start time in milliseconds (epoch timestamp)
                    endTime:
                      type: integer
                      format: int64
                      default: 1754400000000
                      description: End time in milliseconds (epoch timestamp)
                  description: >-
                    Request parameters object containing coin, interval, and
                    time range
            example:
              type: candleSnapshot
              req:
                coin: BTC
                interval: 1h
                startTime: 1754300000000
                endTime: 1754400000000
      responses:
        '200':
          description: Successful response with candlestick data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    T:
                      type: integer
                      format: int64
                      description: Close time timestamp in milliseconds
                    c:
                      type: string
                      description: Close price as a string for precision
                    h:
                      type: string
                      description: High price as a string for precision
                    i:
                      type: string
                      description: Interval/timeframe of the candle
                    l:
                      type: string
                      description: Low price as a string for precision
                    'n':
                      type: integer
                      description: Number of trades during this candle period
                    o:
                      type: string
                      description: Open price as a string for precision
                    s:
                      type: string
                      description: Symbol/asset identifier
                    t:
                      type: integer
                      format: int64
                      description: Open time timestamp in milliseconds
                    v:
                      type: string
                      description: Volume traded during this candle period
                  required:
                    - T
                    - c
                    - h
                    - i
                    - l
                    - 'n'
                    - o
                    - s
                    - t
                    - v
              example:
                - T: 1681924499999
                  c: '29258.0'
                  h: '29309.0'
                  i: 15m
                  l: '29250.0'
                  'n': 189
                  o: '29295.0'
                  s: BTC
                  t: 1681923600000
                  v: '0.98639'

````