get_candles
Fetch OHLCV candles for a Hyperliquid coin to analyze price trends, support/resistance, volatility, or backtest strategies. Choose recent counts or a fixed time window by interval.
Instructions
Get OHLCV candles for one coin. Returns [{t, o, h, l, c, v}], oldest first, t in unix ms. Two modes: the last count candles at interval (default 100 x 1h; the newest one may still be forming, so one extra can come back), or a fixed window when start_time is given (end_time defaults to now; count is then ignored). interval is one of Hyperliquid's: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M. Use for trend, levels, volatility and backtests. For the price right now use get_market; for depth use get_order_book. Read-only; needs no key. Window mode returns {coin, interval, start, end, count, candles[]}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"coin": "<coin>"
},
"name": "get_candles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Coin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL). | |
| count | No | How many recent candles (default 100; ignored with start_time). | |
| end_time | No | Window end (default now). Unix time in milliseconds. | |
| interval | No | Candle size: 1m, 5m, 15m, 1h, 4h, 1d, ... (default 1h). | |
| start_time | No | Window start; switches to window mode. Unix time in milliseconds. |