Skip to main content

Demo feed & the Depth Comparison

The in-app Hyperliquid Edge Feed — Depth Comparison shows the AlphaQuick relay side-by-side with the public Hyperliquid feed, so you can see the depth and latency difference live before subscribing.

How the browser connects​

A browser WebSocket cannot send an Authorization header, so the comparison does not use an API key. Instead the app mints a short-lived ticket:

1. Browser ─▶ POST /api/relay/demo-ticket (app mints a ticket)
2. Browser ─▶ wss://feed.alphaquick.io/ws?ticket=…&symbol=BTC&channel=tob100
3. Relay ─▶ verifies the ticket, streams a snapshot then live deltas

The ticket is:

  • short-lived — it expires in about 60 seconds;
  • single-use — the relay rejects a replayed ticket;
  • tightly scoped — majors only, depth channels only;
  • never a long-lived credential — the browser only ever holds a 60-second token.

Continuous, seamless streaming​

Once connected, the depth updates continuously in real time — every book change is pushed as a delta. The ~60-second lease is not an update limit: shortly before it expires the client transparently mints a fresh ticket and opens a new connection before the old one closes (make-before-break), so the stream never visibly drops.

Public API vs Edge Feed​

The two panels connect very differently:

  • Public API panel — your browser connects directly to Hyperliquid, from your IP. It is subject to the exchange's per-IP connection limits.
  • Edge Feed panel — your browser connects to the AlphaQuick relay, which serves everyone from one upstream connection. Adding viewers never multiplies exchange connections.

That contrast is the point: direct-to-exchange is one connection per viewer and is capped per IP; the relay fans a single upstream out to unlimited clients.

Why the depth difference matters​

Hyperliquid's public l2Book returns only the top of the book. The Edge Feed can stream much deeper snapshots — tob50, tob100, tob200, or the full book channel (see the WebSocket API) — and it pushes an update on every change instead of on a throttled interval. Deeper, fresher depth matters when you:

  • Estimate execution cost — size resting below the top levels is hidden in a shallow book, so a deeper view gives a truer slippage and volume-weighted price.
  • Read real support and resistance — liquidity a few levels away often defines where price actually reacts, yet it never appears in a top-of-book view.
  • React in time — the relay forwards each change immediately, so the book reflects the current state rather than a snapshot that may already be stale.

Building on it​

The demo feed is a preview, not a production API — it is rate-limited and capped. For a bot or server, subscribe and use an API key instead.