Skip to main content
Watch Hyperliquid transactions before they are in a block. The mempool channel streams each signed action our Hyperliquid node receives from its peers, such as orders, cancels, modifies, TWAPs, leverage changes and transfers, as soon as it arrives. It covers every Hyperliquid product: perps, HIP-3, HIP-4 and Spot.
Pending is not executed. A transaction on this channel is not yet in a block, and it can still be rejected, expire or never land. For fills and order outcomes, use the trade and L4 order channels for the product; see WebSocket channels.
The channel is live only. It has no replay, no history, no REST route and no export, and it is never stored: a message you miss while not subscribed cannot be fetched later.

Endpoint and plans

Connect to wss://stream.0xarchive.io/ws, the only endpoint that serves mempool. It takes the same API key and the same protocol as wss://api.0xarchive.io/ws: send the key in the opening handshake as Authorization: Bearer $OXARCHIVE_API_KEY, as WebSocket connection describes. A mempool subscribe on wss://api.0xarchive.io/ws returns an error with error_code endpoint_unsupported:
Most other channels are served only on wss://api.0xarchive.io/ws, so a client that also needs them keeps a second connection there. Subscribing to one of them on the stream endpoint returns endpoint_unsupported naming the endpoint to use. The mempool channel is included with the Pro, Scale and Enterprise plans. It is the one channel that is not on every plan: every other channel and route is on every plan, Free included. On Free and Build, a mempool subscribe returns:

Subscribe

Subscribe without a symbol to receive every pending transaction our Hyperliquid node receives:
Or add symbol to receive only the actions that reference one market:
symbol is optional on this channel and on no other. Spell it as on the other channels: BTC for perps, xyz:XYZ100 for HIP-3, HYPE-USDC for Spot (HYPE/USDC is accepted too), and the outcome side coin, such as #49720, for HIP-4. An unknown symbol returns error_code invalid_symbol. A symbol subscription receives every action whose asset ids include that market. An action that references several markets, such as an order batch on BTC and ETH, is sent whole to the subscribers of each. If you hold the unfiltered stream and a symbol subscription on one connection, a matching action arrives on both. The server confirms each subscription. The unfiltered stream is confirmed with null in coin and symbol:
A symbol subscription is confirmed with the canonical spelling in both fields, such as HYPE-USDC for a subscribe sent as HYPE/USDC:
To stop, send unsubscribe with the same fields. Without symbol, it stops the unfiltered stream; with symbol, it stops that symbol’s subscription. The server answers unsubscribed with the same coin and symbol.

Run a first subscription

This Node.js script subscribes to mempool for BTC, prints ten pending actions, then unsubscribes and closes. It needs a key on the Pro, Scale or Enterprise plan and the ws package (npm install ws).
The messages on this page work with any WebSocket client.

Data messages

Each data message carries one batch of transactions, sent as soon as the node receives it from a peer. coin and symbol are the subscription’s symbol, or null on the unfiltered stream, and data holds one item per signed action:
Each item has these fields, in this order: action and signature are passed through byte for byte. The signer’s address is not included; you can recover it from the signed fields (action, nonce, vault_address, expires_after_ms) and signature with Hyperliquid’s signing scheme. action.type names the action. Common types are order, cancel, cancelByCloid, modify, batchModify, scheduleCancel, twapOrder, twapCancel, updateLeverage, updateIsolatedMargin, noop, evmRawTx, and transfers such as usdSend, spotSend, usdClassTransfer and sendAsset. Hyperliquid adds types over time, so pass over a type you do not recognize instead of failing on it. The same signed action can occasionally arrive twice. Deduplicate on signature when you count or store actions.

Volume and limits

The unfiltered stream carries every pending transaction our Hyperliquid node receives, several megabytes per second before compression. Use a client that negotiates permessage-deflate compression, as most WebSocket libraries do by default, and subscribe with a symbol where the job allows it.
  • Unfiltered capacity: unfiltered subscriptions are limited across the service. When they are full, a subscribe without symbol returns error_code rate_limited with The unfiltered mempool stream is at capacity. Subscribe with a symbol, or try again later. Symbol subscriptions are not limited this way.
  • Slow consumers: as on any channel, a connection that reads too slowly is closed after an error with error_code slow_consumer. Read each message off the socket promptly and do heavy work elsewhere.
  • Plan limits: the unfiltered stream and each symbol count as one subscription toward your plan’s limit per connection, and a connection accepts at most 10 subscribe or unsubscribe operations per second. See WebSocket limits.
  • Credits: each data message is billed like any other WebSocket message; see Credits. The unfiltered stream sends many messages, so check its usage in the dashboard after a short run.

Errors

Errors arrive as error messages with a stable error_code. The connection stays open after each of these except slow_consumer. The channel has no replay: a replay command for mempool returns an error. Errors lists every code.

Next step

Size subscriptions and consumers for the stream with WebSocket limits.
Last modified on October 8, 2026