Market Candles

GET/gateway/v1/hyperliquid/candles

Returns market OHLCV candles for charting and trade-review overlays, ordered by open_time ascending. Each row also carries trades, closed, and nullable quote volume (null before quote-volume coverage). symbol, from, and to are required; from/to accept Unix seconds, ISO datetimes, or UTC dates, and candle open_time is bounded to the half-open [from,to) window. The requested window may contain at most 5000 candles, so use a larger interval for long histories. The response is market data and does not require a wallet address.

Query Parameters

symbolstringrequired

Hyperliquid market id (for example BTC, kPEPE, xyz:GOLD, the canonical PURR/USDC spot pair, or an @index spot market).

Example: SOL
intervalenum<string>

Candle granularity.

Available options:1m3m5m15m30m1h2h4h8h12h1d3d1w1M
Example: 4h
fromstringrequired

Window start (Unix seconds, an ISO datetime, or a bare UTC date).

Example: 2026-05-16
tostringrequired

Window end (Unix seconds, an ISO datetime, or a bare UTC date; a bare date means the end of that day).

Example: 2026-05-19
Market Candles
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/hyperliquid/candles?symbol=SOL&interval=4h&from=2026-05-16&to=2026-05-19', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseHyperliquidCandle.json",
  "data": [
    {
      "close": 123,
      "close_time": 123,
      "closed": true,
      "high": 123,
      "interval": "<string>",
      "low": 123,
      "open": 123,
      "open_time": 123,
      "quote": 123,
      "symbol": "<string>",
      "trades": 123,
      "volume": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}