Skip to main content
Glama

Hyperliquid OHLCV

hl_ohlcv
Read-onlyIdempotent

Historical OHLCV candles for a Hyperliquid market, aggregated from HL's own executed fills, by view. candles (default): one symbol's bars. Pass symbol as the HL asset (BTC, ETH, HYPE); market picks perps or HL spot and dex picks a builder-deployed HIP-3 perp DEX (default HL, the core venue). Buckets are left-aligned UTC and the window is half-open [start, end). Returns candles as {ts (epoch ms, UTC), open, high, low, close, volume, volume_usd, n_trades} ascending by ts, plus source naming the rollup that answered. export: the same, with limit defaulting to the maximum, 5000 (the REST export streams it as NDJSON). latest: the newest 1-minute bar of EVERY symbol that traded in the last hour in one call (takes only market, dex and interval; dex omitted = every DEX, each row naming its own; a bar may still be forming). Same data as GET /v1/hyperliquid/ohlcv, /ohlcv/export and /ohlcv/latest.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "hl_ohlcv"
  }
}

Input Schema

NameRequiredDescriptionDefault
dexNoPerp DEX. Default HL, the core venue; the others are builder-deployed HIP-3 DEXs. On `latest`, omitted = every DEX.
endNoISO-8601 UTC or epoch ms (exclusive). Default: now.
viewNo`candles` (default): one symbol's bars; `export`: the same with `limit` defaulting to 5000; `latest`: the newest 1-minute bar of every symbol.candles
limitNoMax candles (default 500 on `candles`, 5000 on `export`; hard max 5000).
startNoISO-8601 UTC or epoch ms (inclusive). Default: end - limit*interval.
marketNoPerpetual or HL spot. Default perp.perp
symbolNoHL asset: perp ticker (BTC), spot token (HYPE) or raw spot index (@107). Required by `candles` and `export`.
intervalNoCandle width. Default 1h; `latest` takes 1m only, its default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / properties / dex / default
      Removed value: -"HL"
    • changedInput schema / properties / dex / description
      Previous value: -"Perp DEX. Default HL, the core venue; the others are builder-deployed HIP-3 DEXs."New value: +"Perp DEX. Default HL, the core venue; the others are builder-deployed HIP-3 DEXs. On `latest`, omitted = every DEX."
    • removedInput schema / properties / interval / default
      Removed value: -"1h"
    • changedInput schema / properties / interval / description
      Previous value: -"Candle width. Default 1h."New value: +"Candle width. Default 1h; `latest` takes 1m only, its default."
    • removedInput schema / properties / limit / default
      Removed value: -500
    • changedInput schema / properties / limit / description
      Previous value: -"Max candles (default 500, hard max 5000)."New value: +"Max candles (default 500 on `candles`, 5000 on `export`; hard max 5000)."
    • changedInput schema / properties / symbol / description
      Previous value: -"HL asset: perp ticker (BTC), spot token (HYPE) or raw spot index (@107). Required."New value: +"HL asset: perp ticker (BTC), spot token (HYPE) or raw spot index (@107). Required by `candles` and `export`."
    • addedInput schema / properties / view
      Added value: +{
      +  "default": "candles",
      +  "description": "`candles` (default): one symbol's bars; `export`: the same with `limit` defaulting to 5000; `latest`: the newest 1-minute bar of every symbol.",
      +  "enum": [
      +    "candles",
      +    "latest",
      +    "export"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "symbol"
      -]New value: +[]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial operational context beyond them: UTC left-aligned buckets, half-open [start, end) window, ascending-by-ts ordering, the exact returned fields, the `source` rollup name, NDJSON streaming for export, and the caveat that a `latest` bar may still be forming. This is rich behavioral disclosure for a read-only tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the default `candles` behavior and organized by view, with no wasted sentences. It is quite dense and repeats some parameter defaults already present in the schema, which keeps it from a perfect score, but every sentence carries operational meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all 8 parameters, the three view modes, parameter applicability, defaults, ordering, window semantics, and return fields, and even maps to the equivalent REST endpoints. With no output schema, the description fully compensates by naming the returned candle fields and `source`.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter semantics the schema does not: `symbol` is required by `candles` and `export`, `latest` takes only `market`/`dex`/`interval`, and omitted `dex` on `latest` means every DEX with each row naming its own. These are meaningful relationships beyond per-field schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ("Historical OHLCV candles for a Hyperliquid market") and immediately decomposes the tool into three named views (`candles`, `export`, `latest`) with distinct behaviors. An agent can distinguish this from siblings like hl_market or hl_twaps without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states which view to use and the conditions that select each: `candles` (default) for one symbol's bars, `export` for the same data with a 5000 default limit and NDJSON streaming, `latest` for the newest 1-minute bar of every symbol. It also names the parameter restrictions for `latest` (only `market`, `dex`, `interval`) and the `dex` omitted behavior, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.