← Back to overview

TimescaleDB Charts

Live queries from PostgreSQL + TimescaleDB (port 5434) · 5.3M trades (2.75M HL + 2.5M Binance) · May 25, 2025

BTC Price & Volume — Hyperliquid (5-min bars)

Candlestick + Volume — 430K fills aggregated to 113 bars
22:00 UTC spike: BTC ran from $107K to $109.2K on 31,900 BTC volume

Cross-Exchange Price Spread — ETH (HL vs Binance, 1-min)

Basis points spread (HL price - Binance price) / Binance price × 10,000
Spread (bps) Zero line
Persistent -3.8 bps HL discount. Spikes to -17 bps during high volatility.

Smart Money — Top 5 Wallets Cumulative PnL

Real-time PnL accumulation from closedPnl field (HL-exclusive data)
Each line is a wallet. 0x225864 made $3.1M in one day on 2 coins.

Volume Heatmap — Top 10 Coins by Hour (Hyperliquid)

Notional volume ($M) per coin per hour UTC — color intensity = volume
How these charts are generated
-- BTC 5-min OHLCV (TimescaleDB time_bucket)
SELECT time_bucket('5 minutes', time) AS t,
       first(price, time) AS open, max(price) AS high,
       min(price) AS low, last(price, time) AS close,
       sum(quantity) AS volume
FROM trades WHERE exchange = 'hyperliquid' AND symbol = 'BTC'
GROUP BY t ORDER BY t;

-- Cross-exchange spread
WITH hl AS (...), bn AS (...)
SELECT round(((hl.px - bn.px) / bn.px * 10000)::numeric, 2) AS spread_bps
FROM hl JOIN bn ON hl.t = bn.t;

-- Cumulative wallet PnL
SELECT sum(sum(closed_pnl)) OVER (PARTITION BY wallet ORDER BY time_bucket(...)) AS cum_pnl
FROM trades WHERE wallet IN (top_5_wallets);