---
title: "Latency | 0xArchive"
description: "Stream against Hyperliquid's official WebSocket on the same trades, measured every minute, plus an on-demand latency test to our endpoints."
canonical_url: "https://0xarchive.io/latency"
markdown_url: "https://0xarchive.io/latency.md"
route: "/latency"
robots: "noindex, follow"
generated_from: "prerendered_html"
---

# Latency

Measured every minute. Testable on demand.

## Current measurements

The [latency summary JSON](https://api.0xarchive.io/latency-race/summary.json) carries current comparison data and observation times. The browser chart loads from that source; this static page does not assert a live lead. [Run the on-demand connection test](https://0xarchive.io/latency#connection-test) in the browser; its result is not part of this static document.

Stream is 0xArchive's live WebSocket for Hyperliquid data. See how it compares with Hyperliquid's official WebSocket on the same trades, then test the round trip from your own device or servers to our endpoints.

[Live comparison](https://0xarchive.io/latency#stream-vs-hyperliquid) [Connection test](https://0xarchive.io/latency#connection-test) [Methodology](https://0xarchive.io/latency#latency-race-method)

## Stream vs. Hyperliquid's official WebSocket

Two measuring machines, one in Tokyo and one in US East, receive the same Hyperliquid trades from Stream and from Hyperliquid's official WebSocket at once, match every trade across both, and record which feed delivered it first. Results refresh every minute.

Loading the latest measurements

## Comparison method

Each machine subscribes to BTC, ETH, SOL and HYPE trades on both feeds at once: Stream at `wss://stream.0xarchive.io/ws` and Hyperliquid's official WebSocket at `wss://api.hyperliquid.xyz/ws`. Other Hyperliquid markets are not part of this comparison.

Each trade is matched across the two feeds by its coin and trade id. The lead is the time the trade arrived on Hyperliquid's feed minus the time it arrived on Stream, both read from the same clock, so no clock synchronization is involved. A positive lead means Stream was first.

Payloads are compared too. A matched trade counts as identical when its price, size, trade time and hash are the same on both feeds.

Stream runs alongside our own Hyperliquid node in Tokyo. Both measuring machines run on AWS, in Tokyo and US East, and neither serves either feed. Each records its results every minute.

The hero uses the lower seven-day median lead from Tokyo and US East, rounded down. It is shown only when both measurement windows are fresh, sufficiently populated and favour Stream; it is not an average across locations.

Only trades are compared, because Hyperliquid's official WebSocket has no order-level (L4) market data. Stream also streams L4 order events.

Results depend on where you are. These numbers describe the network paths from Tokyo and US East; your own lead depends on the path from your servers to each feed. The [connection test](https://0xarchive.io/latency#connection-test) measures yours.

The raw numbers are public as [JSON](https://api.0xarchive.io/latency-race/summary.json).

## What the test measures

Your browser, VPN, Wi-Fi and device load affect results. This is echo latency, not feed freshness, market-event latency, one-way latency or an SLA measurement. Any region shown is reported by the responding service, not your location.

**Test method and limitations**

Each service gets one WebSocket connection, one discarded warm-up, then 10 serial application-level ping/pong samples. Each sample has a 2-second timeout with 250 ms between samples. The test is capped at 30 seconds per service. There is no automatic reconnect.

Median and p95 describe successful round trips only. The nearest-rank p95 at 10 samples is the sample maximum. Ten samples are a small sample, not a reliable long-term tail-latency estimate. Timeouts are application timeouts, not packet loss.

Connection setup includes DNS, TCP, TLS and the WebSocket upgrade where needed. These phases are not isolated; browser caches and connection reuse can affect the timing.

Stopping, leaving this page or hiding the tab interrupts the test. A 60-second cooldown follows every run, including cancelled runs. Measurements stay in page memory only and are not saved, exported or sent to analytics.

## Where these run

Stream runs in Tokyo, Japan, on the same machine as our Hyperliquid node, so market data reaches it without crossing a network. WebSocket runs in Vint Hill, Virginia, alongside the archive and the REST API.

For latency-sensitive work, co-locate in Tokyo, Japan, where Stream runs. Crossing the Pacific in either direction costs a round trip that no client-side tuning recovers.

The connection test shows only what the responding endpoints report. Additional regions will appear when they are available and verified.

## FAQ

### What exactly does the published comparison measure?

The page shows two different tests. The feed comparison matches Hyperliquid trades arriving on Stream and the official feed by coin and trade ID, then compares arrival times and payload fields. The on-demand connection test measures application-level WebSocket ping/pong round trips, or a site-to-server probe when you enter your server address. Neither is an end-to-end trading outcome.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

### Which data source, observation window and vantage point does each result describe?

Two AWS measuring machines, in Tokyo and US East, receive both feeds without serving either one. Select a vantage and window to see its matched-trade count, arrival lead and identical-payload share. The hero takes the lower seven-day median lead, rounded down, only when both windows are fresh, sufficiently populated and favor Stream; it is not an average across locations.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

### How is network round-trip testing different from matched-event arrival timing?

Round-trip timing includes a request and reply over a network path. Matched-event timing compares arrival timestamps for the same identifiable event on two feeds. They have different denominators and clock/path effects, so a lower HTTP round trip does not establish earlier market-event arrival.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

### Is a result a measurement or a contractual SLA?

A displayed measurement is not a contractual SLA. Use the published sample and method to evaluate that path; production terms need a separate route-bound agreement. Service health and stored-data freshness are also different measurements.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

### Which actual Stream connection/docs should I use after evaluating it?

Connect to Stream at wss://stream.0xarchive.io/ws from server code and send your API key in the Authorization header. Stream carries Hyperliquid trades and L4 order events. Use the WebSocket channel documentation for the subscription payload; keep keys out of browser code and URLs.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

### Can I use ten connection-test samples as a tail-latency SLA?

No. The echo test discards one warm-up and takes 10 serial application ping/pong samples, with a 2-second timeout each. Median and p95 use successful round trips only; at 10 samples nearest-rank p95 is the maximum. Timeouts are application timeouts, not measured packet loss, and the result is not a long-term tail-latency estimate.

[Comparison method](https://0xarchive.io/latency#latency-race-method)

## Connect to Stream

Stream carries Hyperliquid trades along with order-level (L4) events. Connect from server code with any WebSocket client, sending your API key in the Authorization header.

`const ws = new WebSocket("wss://stream.0xarchive.io/ws", { headers: { Authorization: "Bearer YOUR_API_KEY" }, });`

Replace YOUR_API_KEY with a key from your account. Keep keys out of browser code and URLs; a browser app connects through your own backend. No key yet? [Create an account to get a key](https://0xarchive.io/signup).

[Read the channel docs](https://docs.0xarchive.io/websocket/channels)
