Hyperliquid Oracle vs Mark Price: Building a Liquidation Monitor
How a liquidation monitor should combine oracle price, mark price, margin state and live positions without generating misleading alerts.
How a liquidation monitor should combine oracle price, mark price, margin state and live positions without generating misleading alerts.
Use the correct price for each decision
Last trade, mid, mark and oracle prices answer different questions. Preserve each field and its timestamp rather than collapsing them into one generic price.
Recalculate account risk
Track position size, entry, leverage mode, account value, maintenance margin and collateral. A price threshold alone cannot describe liquidation risk across cross-margin or portfolio accounts.
Stream and reconcile
Consume active asset context, user state and liquidation events over WebSocket, then periodically compare with authoritative snapshots. Pause automated action after gaps or mode changes.
Design actionable alerts
Report distance to liquidation, collateral assumptions, stale-data age and the specific position driving risk. Use warning and critical thresholds with hysteresis to prevent notification storms.
Build liquidation infrastructure
TierZero offers a Hyperliquid liquidation bot, risk dashboards and maintenance. The official subscription API provides the required feeds; contact us for implementation.
Need this in production?
Send your current stack, target chain, data providers and operational requirements through the TierZero contact page.
Building this for production?
We turn this architecture into tested, non-custodial software with monitoring, documentation and deployment support.
Related technical guides
Hyperliquid Market Making: A Practical Guide
How market-making bots earn on Hyperliquid perps — quoting around fair value, skewing by inventory, capturing funding, and the risk controls that keep the book safe.
Read articleHyperliquid Market Making: HFT Bot Strategies for Perps
A deep-dive into building market-making bots on Hyperliquid perps, covering spread capture, inventory management, and how to compete against professional MMs on the order book. Includes real config patterns for tick-size quoting and delta hedging.
Read articleHyperliquid Market Making: Capturing Maker Rebates at Scale
A practical breakdown of how to build a hyperliquid maker rebate bot that optimizes quote placement around tier thresholds, inventory limits, and CLOB dynamics.
Read article