To monitor a Hyperliquid HIP-3 builder-deployed perpetual market, the tutorial published on November 19, 2026, starts by finding and validating the target market through perpDexs and metaAndAssetCtxs. It then subscribes to full level-2 order-book snapshots through StreamL2Book and calculates the bid–ask spread and the difference between the mark price and oracle price.
The example reports one of six states: WAITING, OK, ALERT, STALE, DISCONNECTED or UNKNOWN. Its handling includes context polling every 10 seconds, 5-second and 25-second expiry checks, and reconnect attempts with exponential backoff capped at 30 seconds. An authentication failure stops the monitor rather than triggering a reconnect.
This is a monitoring example, not a trading system. An OK state does not establish that the underlying oracle data is current or that execution is safe. The tutorial also notes that the receiving system’s clock should be synchronized and that gRPC streaming incurs charges.