Skip to main content
Copy-paste patterns for the most common use cases. All examples use TypeScript with the ws package.

Whale alert bot

Detect large orders and send alerts.

Fill tracker with PnL

Track every fill on a wallet and compute running PnL.

Cancel storm detector

Detect when market makers are aggressively pulling orders. A burst of cancels often precedes a price move.

Copy trader

Replicate trades from a target wallet. Logs the signal; add your execution logic.

Multi-asset dashboard

Stream orders and fills for multiple assets simultaneously.

L4 order book poller

Poll the L4 order book (individual orders with wallet addresses) via REST.

Rejection monitor

Track order rejections across all assets. Useful for identifying accounts under margin stress.

REST + stream combination

Use REST for initial state, stream for updates.

Pattern: Watch for liquidations

Stream every liquidation happening across HyperLiquid in real-time. Useful for liquidation bots, market stress monitors, and building a public liquidation feed.
Every liquidation generates at least 2 fill events — one for the liquidated user and one for the liquidator(s). Both carry the same data.liquidation object and share the same tid and hash so you can correlate them.

Pattern: Builder DEX attribution feed

If you operate a HIP-3 builder DEX, subscribe to fills attributed to your builder address to track your flow in real-time without polling userFills per wallet.
You can pass multiple builder addresses if you operate several DEXes.

Pattern: All fills firehose for market analytics

Subscribe to every fill on every market. Useful for VWAP calculations, open interest tracking, and market-wide analytics.

Pattern: Batch portfolio query for multi-wallet platforms

Fetch portfolio performance for thousands of wallets in a single request. Designed for copy trading leaderboards, portfolio trackers, and multi-user dashboards.
Paired with /v2/batch/clearinghouse-states you can build a complete leaderboard snapshot of thousands of traders in well under a second.