Learn/Data API

Hyperliquid Data API Explained

The Hyperliquid Data API explained

November 4, 2025

By Hyperdash

The Hyperliquid Data API is designed to serve builders, quant traders, and protocol analysts who need high-performance access to on-chain and off-chain real-time data. Whether you're building custom execution strategies, monitoring positions, or powering a research dashboard, having direct access to WebSocket and REST endpoints unlocks high-frequency, granular insight into Hyperliquid markets.

For developers seeking canonical reference formats and schemas, the Hyperliquid Data API is fully documented in the official API reference. Teams pairing analytics with live order execution also leverage a dedicated Hyperliquid RPC node to ensure end-to-end latency and throughput consistency.

Published

November 4, 2025

Author

Hyperdash

Reading time

5 min read

Category

Data API

What is Hyperliquid Data API?

The Hyperliquid Data API is the network's primary read-only interface for accessing market data APIs. It allows clients to query state, stream price feeds, monitor positions, and analyze order flow via two mechanisms:

  • REST endpoints
  • WebSocket subscriptions

Where the signed exchange endpoint and a Hyperliquid RPC node provide write and transaction submission access, the Data API enables non-mutative reads for trades, books, liquidations, and more.

In Hyperliquid's architecture, which includes HyperCore and HyperEVM, the Data API guarantees consistent access to all relevant state and market updates across analytics and UI clients.

Write operations, such as placing orders or using CoreWriter to initiate on-chain actions, are outside the Data API's scope: orders are signed and sent to the exchange endpoint, and CoreWriter calls are HyperEVM transactions that require an RPC connection.

By design, the Data API's outputs align with on-chain state, which is crucial for accurate Hyperliquid analytics and trustworthy application behavior.

Core Features of the Hyperliquid Data API

The Hyperliquid Data API is purpose-built for streaming real-time data feed outputs:

Persistent WebSocket connection to stream:

  • Live trades
  • Order book updates with top-of-book (bbo) and up to 20 price levels per side (l2Book)
  • Liquidation feed with event-level detail for a subscribed wallet (userEvents)
  • Funding updates from the funding rate API

High-availability REST endpoints for:

  • OHLCV candles
  • Open interest
  • L2 snapshots and user portfolios
  • Deterministic schemas for JSON responses
  • Info requests that backfill data missed during a WebSocket reconnect

Key Endpoints and Supported Methods

Hyperliquid Data API offers REST HTTP data endpoints access via POST requests to https://api.hyperliquid.xyz/info, and WebSocket streams via wss://api.hyperliquid.xyz/ws.

REST examples:

Market-level:

  • allMids, l2Book, candleSnapshot
  • fundingHistory, metaAndAssetCtxs (includes open interest)

User-level:

  • userFills, portfolio, subAccounts, userTwapSliceFills

WebSocket subscriptions:

  • trades by coin
  • l2Book for order book updates
  • userEvents for a wallet's fills, funding and liquidations
  • activeAssetCtx for streaming funding and open interest updates
JSON REST API request and response

Understanding REST and WebSocket Access

Builders use REST endpoints for reference data, snapshots, and backfillable history, while persistent WebSocket connections are ideal for streaming live real-time data with low latency.

Design guidelines:

  • Use ping/pong heartbeats to detect stale WS connections
  • Handle reconnect logic and resubscription flows
  • Rebuild state from the snapshot the server sends on resubscribe
  • Design for burst throughput and backpressure management

Teams building on HyperEVM often use both REST and WebSocket together for redundancy and snapshot validation.

REST vs WebSocket data flow

How Hyperdash Enables Access to Hyperliquid Data

The Hyperdash Data API is a managed data service that improves API integration for Hyperliquid data. With Hyperdash, builders don't need to run their own Hyperliquid nodes or worry about connection nuances. It serves live and historical data from Hyperdash's own nodes, so requests never count against Hyperliquid's public rate limits.

Capabilities include:

  • Fill, trade and candle history by time range, from 90 days on the Hobby and Starter plans to full history on Enterprise, beyond the most recent records the public API returns
  • WebSocket streams that carry a cursor, so a client that reconnects resumes where it left off
  • Channels the public API does not have, including liquidations across every market and liquidation and stop-order levels
  • A hosted MCP server for AI agents

Requests use a bearer key and query parameters instead of the public API's JSON body, and every endpoint is listed in the API reference.

Integrating the Hyperliquid Data API into Your Workflow

Typical client architectures follow this pattern:

  1. Use REST endpoints to fetch initial metadata and snapshots
  2. Open a WebSocket connection for live trades and deltas
  3. Stream updates into an in-memory store or message queue
  4. Validate sequencing; trigger backfills on gaps
  5. Archive to time-series DB for analysis or replay

You can also deploy a local order book server that listens to WS streams and persists order book updates at full precision. For low-latency submission and analytics alignment, consider integrating with a reliable Hyperliquid RPC node provider.

Best Practices for Builders and Analysts

To maximize performance, consider these operational patterns:

  • Optimize for throughput and latency with batch processing and async I/O
  • Compress deltas and limit retained state where possible
  • Use circuit breakers for WebSocket disconnects and retries
  • Monitor dropped messages, lag, and backpressure via metrics
  • Secure endpoints with TLS (HTTPS/WSS); rotate API wallet keys regularly
  • Use a separate API wallet per subaccount to avoid nonce collisions

Building Smarter with the Hyperliquid Data API

The combination of rich data and real-time access opens up powerful use cases on Hyperliquid. For builders, the Hyperliquid Data API enables:

  • Funding basis models using the funding rate API and trade flows
  • Execution bots that react to order book updates and queue depths
  • Liquidation-aware dashboards that overlay real-time data feed insights
  • Data-science pipelines that build predictive features for signals

Why Hyperdash and Hyperliquid RPC Strengthen Your Data Pipeline

The Hyperliquid Data API delivers depth and control with efficient REST endpoints, event-level WebSocket streams, and stable schemas that power real-time DeFi systems. Pair it with Hyperdash for managed access and a dedicated Hyperliquid RPC node to ship analytics, trading bots, and research pipelines with consistent latency, high uptime, and clear observability.

FAQs

What is the Hyperliquid Data API?

The Hyperliquid Data API is a high-throughput market data API that offers REST and WebSocket access to trades, order book updates, the funding rate API, and the liquidation feed.

How does Hyperdash enable access to Hyperliquid data?

Hyperdash serves live and historical Hyperliquid data from its own nodes over REST and WebSocket streams that resume from a cursor after a disconnect, which simplifies API integration and keeps requests off Hyperliquid's public rate limits.

Do I need a Hyperliquid RPC node alongside the Data API?

In most production setups, yes. Use the Data API for reads and market data, and the exchange endpoint or a Hyperliquid RPC node for writes, transaction submission, and state-changing operations.

Trade Smarter