๐Ÿ”Œ API & Developers

Hyperliquid WebSocket Trades and Candles: Snapshot, Dedupe Key, and Finality

โš ๏ธ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission โ€” at no extra cost to you. I only review tools I actually use.
For Hyperliquid public WebSocket feeds, the practical handling is:

What the WebSocket documentation specifies

As of Nov. 15, 2026, the public Hyperliquid WebSocket subscriptions page documents the following relevant behavior:

{
  "method": "subscribe",
  "subscription": {
    "type": "trades",
    "coin": "<coin_symbol>"
  }
}

The documented data format is WsTrade[].

{
  "method": "subscribe",
  "subscription": {
    "type": "candle",
    "coin": "<coin_symbol>",
    "interval": "<candle_interval>"
  }
}

Supported intervals listed on the page include 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, and 1M. The documented data format is Candle[].

The documentation does not show an isSnapshot field for public trades, nor a candle finality flag in the supplied subscriptions page.

Community-reported behavior in issue 326

GitHub issue 326, opened on Sep. 29, 2026, asks for clarification on WsTrade.time, public trades snapshots, and candle finality. A comment on Nov. 5, 2026 reports observed behavior, not an official specification: Treat these points as community-reported observations unless Hyperliquid publishes an updated official specification.

Reference client handling

The following examples are reference pseudocode based on the documented subscription shapes and the official WsTrade recommendation. They are not tested output.

๐Ÿ’ก Hyperliquid

Like what you're reading? Try it yourself โ€” this link supports ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime

Deduplicate public trades

seen_trades = set()

def handle_trades(trades):
    for trade in trades:
        # Official WsTrade docs recommend (block_time, coin, tid) for global uniqueness.
        key = (trade["block_time"], trade["coin"], trade["tid"])

        if key in seen_trades:
            continue

        seen_trades.add(key)
        process_trade(trade)

Use the same seen_trades set across reconnects if you want to avoid replaying trades that were already processed before the disconnect.

If your feed exposes time rather than block_time, the community report used (time, coin, tid) as a reported workaround; verify the field semantics before relying on it.

Treat candles as mutable interval state

current_candles = {}

def handle_candle(candle):
    open_time = candle["t"]
    current_candles[open_time] = candle
    update_ui_or_store(candle)

Because the supplied sources do not document a finality flag, do not mark a candle as final merely because a push arrived or because the interval boundary has passed. If your system requires finalized candles, use a separate finalization rule or data source that you can verify.

Sources

Affiliate disclosure

This article includes a Hyperliquid referral link. If you sign up through it, we may receive a commission.

Continue with Hyperliquid

Browse the Hyperliquid guide hub for the complete user journey.

๐Ÿงฎ Free Hyperliquid calculators

Fee Calculator โ†’
Hyperliquid vs centralized exchange fee comparison
PnL & Liquidation โ†’
Perp PnL + liquidation price
Position Size โ†’
Risk-aware position sizing for HL perps
Hyperliquid

Ready to get started? Use the link below โ€” it helps support ChartedTrader at no cost to you.

Create a Hyperliquid account โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime
๐Ÿ“ˆ

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Every tool reviewed here is something I've used with real capital. Questions? Reach out.

๐Ÿ“š Related Articles

๐Ÿ”Œ
API & Developers

Hyperliquid WebSocket Subscriptions: Message Formats, Types, and Examples

How to subscribe to Hyperliquid WebSocket feeds, with subscription message formats, supported types, snapshots, unsubscribe messages, and user-address pitfalls.

November 9, 2026 โฑ 5 min read
๐Ÿ”Œ
API & Developers

Hyperliquid candleSnapshot Timestamps and Completion: Community-Reported Observations

Community-reported Hyperliquid candleSnapshot behavior: t/T are Unix milliseconds, T is inclusive, no completion flag, and older requests can return an empty 200 response.

November 15, 2026 โฑ 3 min read
๐Ÿ”Œ
API & Developers

Hyperliquid API Websocket Guide for Developers (2026)

Connect to Hyperliquid WebSocket endpoints, subscribe to basic feeds, send post requests, and keep the connection alive with ping/pong and reconnect handling.

July 29, 2026 โฑ 8 min read