Appearance
Hyperliquid Data Source
Hyperliquid is the source of truth for the tradable asset universe and the main asset-level market context.
The backend stores all supported Hyperliquid assets, including perps and spot-style markets. Generic HIP-3 category exposure is intentionally out of scope for the product picker.
What We Store
| Channel | Table | Origin | Cadence / granularity | Purpose |
|---|---|---|---|---|
| OHLCV | hyperliquid_candles | Source | candle WebSocket at 1m | Real OHLCV rows for chart/context reads |
| OHLCV rollups | hyperliquid_candles | Derived | 1h from 1m candles | Larger windows without extra source subscriptions |
| RSI | hyperliquid_technical_indicators | Derived | 5m from OHLCV | Wilder RSI 14 trading signal |
| Bollinger Bands | hyperliquid_technical_indicators | Derived | 5m from OHLCV | 20-period SMA plus/minus 2 standard deviations |
| Moving Averages | hyperliquid_technical_indicators | Derived | 5m from OHLCV | SMA 20 and EMA 20 |
| MACD | hyperliquid_technical_indicators | Derived | 5m from OHLCV | 12/26 EMA line, 9 EMA signal, histogram |
| Funding Rates | hyperliquid_funding_pressure | Source | 5m HTTP polls | Current and predicted perp funding context |
Channel Definitions
Use the common market-data definitions for user-facing Hyperliquid channels:
- OHLCV stores the exchange candle open, high, low, close, and base volume for the 1-minute bucket. One-hour rows are local rollups from closed 1-minute rows.
- RSI is Wilder RSI 14. The first average gain/loss is a simple 14-period average, then subsequent rows use Wilder smoothing.
- Bollinger Bands use a 20-period SMA as the middle band and 2 standard deviations for upper/lower bands.
- Moving Averages expose SMA 20 and EMA 20. EMA uses the standard multiplier
2 / (period + 1)and seeds from the first period SMA. - MACD uses the standard 12-period EMA minus 26-period EMA line, a 9-period EMA signal, and line minus signal histogram.
- Funding Rates are perp-only. They come from Hyperliquid perp asset context and predicted funding data; spot markets do not have funding rows.
Price Policy
Use one active price path:
text
1m candle WebSocket subscriptions
-> real OHLCV rows
-> hyperliquid_candles
-> local 1h rollups
-> 5m technical indicators
-> hyperliquid_technical_indicatorsThis avoids the REST candleSnapshot rate-limit problem for the full asset universe. Larger chart intervals and technical indicators should be derived locally from 1-minute candles instead of subscribing to every interval.
How We Fetch Data
Configured endpoints:
| Config | Default |
|---|---|
HYPERLIQUID_WS_URL | wss://api.hyperliquid.xyz/ws |
HYPERLIQUID_INFO_URL | https://api.hyperliquid.xyz/info |
For OHLCV, we subscribe to 1-minute candle streams per active supported symbol:
json
{
"method": "subscribe",
"subscription": {
"type": "candle",
"coin": "BTC",
"interval": "1m"
}
}We parse channel: "candle" messages and store 1-minute rows in hyperliquid_candles. Larger intervals and technical indicators are derived locally from those rows.
Registry and feature inputs use HTTP POST to HYPERLIQUID_INFO_URL:
| Request body | Used for |
|---|---|
{ "type": "meta" } | Perp universe and symbols |
{ "type": "spotMeta" } | Spot-style universe, display names, search terms |
{ "type": "metaAndAssetCtxs" } | Perp contexts, active status, open interest inputs |
{ "type": "predictedFundings" } | Predicted funding rows |
The client still has a candleSnapshot helper for probes/backfills, but the runtime price ingestor should not use it for the full universe because it becomes request-heavy.
Current hot retention:
| Data | Retention |
|---|---|
| 1m OHLCV source candles | 24 hours |
| 1h OHLC rollups | 7 days |
| 5m technical indicators | 7 days |
| 5m funding rates | 7 days |
Asset Registry
hyperliquid_assets stores the supported-market registry:
- Exchange symbol.
- Display name and search terms.
- Asset kind: perp, spot, or unknown.
- Category/subcategory metadata for the picker.
- Coverage flags for mid prices, OHLCV/candles, liquidity profile, funding pressure/rates, volatility profile, positioning pressure, and trading.
Runtime ingestion refreshes the registry from Hyperliquid metadata and stream-discovered symbols. Product selection should read this registry instead of inferring support from observation rows.
The compiler and workflow UI must respect these coverage flags when resolving data streams. For example, spot-style @... markets can support OHLCV and OHLC-derived technical indicators while not supporting funding rates, liquidity profile, or positioning pressure. Unsupported channel/asset pairs should be filtered from asset pickers and skipped from compiled read plans with a warning.
Trading Context
Trading prompts can request Hyperliquid context per enabled asset:
- OHLCV candles for chart structure.
- RSI, Bollinger Bands, Moving Averages, and MACD derived from OHLCV.
- Funding rates for crowded perp positioning context.
In the strategy builder, Hyperliquid Data Stream Blocks are created by channel first, then configured with one associated Hyperliquid asset inside the block. The block should only connect to the matching Asset Block.
Local Commands
bash
cd backend
npm run hyperliquid:assets
npm run hyperliquid:ohlcv -- --duration-ms=70000
npm run hyperliquid:features
npm run hyperliquid:maintain