Your trading bot misses critical fills because you're polling the REST API every second. Your market maker shows stale quotes because the WebSocket connection dropped without you noticing. Your analytics dashboard can't backfill historical data beyond 24 hours from the gRPC stream. Your DeFi integration fails because you're mixing up HyperCore and HyperEVM calls. Each of these failures stems from the same root cause: using the wrong Hyperliquid infrastructure component for your use case.
Hyperliquid exposes four distinct services - a REST API, a gRPC stream, a WebSocket feed, and HyperEVM RPC - each optimized for different data access patterns. This guide maps when to use each component and how they integrate into production trading systems.
Understanding Hyperliquid's Dual Architecture
Hyperliquid operates as two tightly integrated systems:
HyperCore is the native Layer 1 blockchain purpose-built for perpetual futures trading. It processes up to 200,000 orders per second with 0.2 second finality, maintaining a fully on-chain orderbook. Every limit order lives on-chain with cryptographic proof, unlike traditional exchanges where orders sit in centralized databases. Trading is gas-free - you only pay exchange fees when trades execute.
HyperEVM provides Ethereum Virtual Machine compatibility, allowing developers to deploy Solidity smart contracts and build decentralized applications. Unlike typical Layer 2 rollups that settle to Ethereum, HyperEVM shares the same consensus mechanism and global state as HyperCore under the HyperBFT protocol.
This dual architecture creates unique infrastructure requirements. Traditional EVM tooling handles HyperEVM interactions, but accessing HyperCore's trading data requires Hyperliquid-specific APIs. Production applications typically need access to both layers.
The Four Infrastructure Components
Hyperliquid exposes four distinct services, each optimized for specific data access patterns:
| Component | Protocol | Primary Use |
|---|---|---|
| Info Endpoint | REST (HTTP POST) | Market data snapshots, historical queries |
| gRPC Service | Protocol Buffers over TCP | Real-time blockchain events, streaming fills |
| Orderbook Service | WebSocket (WSS) | Live orderbook depth, trade updates |
| HyperEVM RPC | JSON-RPC (HTTPS) | Smart contract interactions, EVM queries |
With Dwellir's developer plans, rate limits across all components are significantly more generous than the public endpoints. Your specific limits scale with your plan tier, so you can build without worrying about hitting public throttling thresholds.
Understanding when to use each component is the difference between an elegant data pipeline and a fragile mess of workarounds.
Info Endpoint: REST API for Market Data
The Info Endpoint serves as Hyperliquid's primary REST API for querying exchange data. Dwellir's managed Info Endpoint is accessible at https://api-hyperliquid-mainnet-info.n.dwellir.com/info with API key authentication, providing significantly higher rate limits than the public endpoint at https://api.hyperliquid.xyz/info. Despite using POST for all requests, this is a read-only API where the POST body specifies which data you're requesting.
What the Info Endpoint Provides
The Info Endpoint delivers market reference data and historical snapshots:
- Market metadata: Asset specifications, trading pairs, funding rates
- Account information: Positions, balances, margin requirements
- Orderbook snapshots: Current depth at a point in time (distinct from the WebSocket feed)
- Historical data: Past trades, funding history, candle data for backtesting
- User activity: Order history, fills, liquidations for specific accounts
Request Structure
All Info Endpoint queries use the same pattern - POST to /info with a JSON body specifying the request type:
JavaScript:
const ENDPOINT = 'https://api-hyperliquid-mainnet-info.n.dwellir.com/info';
const API_KEY = 'your-api-key-here';
async function getClearinghouseState(userAddress) {
const response = await fetch(ENDPOINT, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key': API_KEY
},
body: JSON.stringify({
type: 'clearinghouseState',
user: userAddress
})
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
return await response.json();
}
Python:
import requests
ENDPOINT = 'https://api-hyperliquid-mainnet-info.n.dwellir.com/info'
API_KEY = 'your-api-key-here'
def get_clearinghouse_state(user_address: str) -> dict:
"""Get user's perpetual account state"""
response = requests.post(
ENDPOINT,
json={
'type': 'clearinghouseState',
'user': user_address
},
headers={
'Content-Type': 'application/json',
'X-Api-Key': API_KEY
},
timeout=10
)
response.raise_for_status()
return response.json()
Dwellir Info Endpoint Advantages
Dwellir's managed Info Endpoint requires API key authentication via the X-Api-Key header, which unlocks rate limits that scale with your developer plan. Growth tier plans provide up to 10x higher limits than the public endpoint, and Enterprise plans offer custom limits tailored to your workload. Dwellir also recommends caching metadata responses (like meta) for up to 1 hour and polling account state every 5-10 seconds to make the most of your allocation.
When to Use the Info Endpoint
Use the REST API when you need:
- Initial state: Load current positions, balances, and open orders on startup
- Reference data: Asset specifications, trading rules, funding schedules
- Historical analysis: Backtesting data, past performance metrics
- Periodic reconciliation: Hourly balance checks, daily P&L snapshots
- One-time queries: Investigating specific trades, debugging order states
Don't use it for: Real-time streaming updates (REST polling adds unnecessary latency), continuous high-frequency monitoring (use gRPC or WebSocket instead), or live orderbook tracking (use WebSocket instead).
gRPC Service: High-Performance Blockchain Streaming
While the REST API provides snapshots, the gRPC service streams HyperCore blockchain events in real-time using Protocol Buffers over TCP. This is where Hyperliquid's infrastructure gets interesting - and where most third-party providers fall short.
Why gRPC Matters for Hyperliquid
HyperCore generates blockchain events at extreme frequency - liquidations, funding updates, oracle price changes, and user fills occur dozens of times per second. Polling the REST API would miss events and consume excessive bandwidth. The gRPC service streams these events with 70% bandwidth reduction through zstd compression and 10x lower latency than REST queries.
The Six gRPC Methods
Hyperliquid's gRPC service exposes six methods split between streaming and point-in-time queries:
Streaming Methods (continuous updates):
StreamBlocks: Every new block with all contained transactionsStreamFills: All user fills as they execute across the networkStreamOrderbookSnapshots: Periodic orderbook depth snapshots
Point-in-Time Methods (single request-response):
GetBlock: Retrieve a specific block by heightGetFills: Query fills for a specific user or time rangeGetOrderBookSnapshot: Current orderbook state at request time
Data Retention and Historical Access
The gRPC service maintains a 24-hour rolling window. For events older than 24 hours, query the Info Endpoint's historical data or maintain your own archive.
For production systems, this means:
- Stream live events via gRPC for real-time processing
- Store critical events to your own database
- Query Info Endpoint for historical data beyond 24 hours
- Implement replay logic to backfill gaps from outages
When to Use gRPC
Use the gRPC service when you need:
- Real-time event processing: Monitoring for specific wallet activity
- High-frequency data: Tracking all fills, liquidations, or funding updates
- Low latency: Sub-50ms response times for time-sensitive applications
- Bandwidth efficiency: Processing thousands of events per minute
- Complete blockchain view: Every transaction as it happens
Don't use it for: Initial state snapshots (use Info Endpoint), historical data beyond 24 hours (use Info Endpoint), or orderbook depth visualization (use WebSocket).
Managed gRPC with Dwellir
Hyperliquid's public gRPC endpoint works for testing, but production applications face shared infrastructure constraints. Connection stability varies, compression isn't guaranteed, and there's no SLA when something breaks.
Dwellir provides managed Hyperliquid gRPC endpoints with dedicated clusters and SLA-backed uptime guarantees. Key advantages:
- Dedicated gRPC infrastructure isolated from public endpoint congestion
- Up to 5,000 RPS capacity versus public endpoint limits
- Production-ready code examples in Go, Python, and Node.js
For teams building trading bots, market makers, or analytics platforms that depend on real-time blockchain events, managed gRPC infrastructure eliminates the operational overhead of maintaining reliable connections to high-frequency data streams.
Orderbook Service: WebSocket for Market Depth
The Orderbook WebSocket delivers real-time orderbook updates and trade feeds. This is distinct from both the Info Endpoint's static snapshots and the gRPC service's blockchain events - the WebSocket provides millisecond-latency updates of market depth.
Three Subscription Types
The WebSocket offers three subscription modes, each with different use cases:
Trades - Every trade as it executes:
{
"method": "subscribe",
"subscription": {
"type": "trades",
"coin": "BTC"
}
}
Returns individual trade events with price, size, and side. Use this for volume analysis, recent trade tracking, or detecting large market orders.
L2 Book - Aggregated depth levels:
{
"method": "subscribe",
"subscription": {
"type": "l2Book",
"coin": "BTC",
"nLevels": 20
}
}
Returns aggregated orderbook depth with total size at each price level. Public endpoints limit this to 20 levels per side. Use this for visualizing market depth, calculating slippage, or detecting support/resistance.
L4 Book - Individual order visibility:
{
"method": "subscribe",
"subscription": {
"type": "l4Book",
"coin": "BTC"
}
}
Returns every individual order with user addresses and order IDs. Requires authenticated endpoints. Use this for detecting whale orders, tracking specific traders, or front-running analysis.
Public vs Private Endpoints
The public WebSocket (wss://api.hyperliquid.xyz/ws) provides limited functionality:
- Maximum 20 levels for L2 orderbook subscriptions
- No access to L4 individual order data
- Shared infrastructure with variable latency
- No SLA or uptime guarantees
Private endpoints from infrastructure providers unlock deeper data:
- Up to 100 levels of L2 orderbook depth (5x more visibility)
- L4 subscriptions showing individual orders
- Dedicated infrastructure with consistent latency
- SLA-backed uptime guarantees
Dwellir Orderbook Performance
Benchmarking against the public WebSocket feed, Dwellir's managed orderbook service delivers measurable improvements:
- 51ms median latency reduction (24.1% improvement)
- 100 levels of depth versus 20 on public endpoints
- Sub-150ms p95 latency for time-sensitive applications
- Authenticated access to L4 individual order feeds
For market makers and high-frequency trading strategies, this latency difference and depth visibility directly impacts trade execution quality.
When to Use WebSocket
Use the orderbook WebSocket when you need:
- Live depth visualization: Displaying current market depth to users
- Slippage calculation: Estimating execution price for large orders
- Spread monitoring: Tracking bid-ask spread for market making
- Trade flow analysis: Detecting unusual buying or selling pressure
- Order placement decisions: Checking liquidity before submitting orders
Don't use it for: Historical orderbook reconstruction (not available), low-frequency polling (REST is simpler), or blockchain event monitoring (use gRPC).
HyperEVM RPC: Ethereum-Compatible Smart Contracts
The fourth infrastructure component is HyperEVM RPC, providing standard JSON-RPC access to Hyperliquid's EVM-compatible execution layer. While the Info Endpoint, gRPC, and WebSocket handle HyperCore trading data, HyperEVM RPC handles smart contract deployment, token operations, and DeFi protocol interactions using familiar Ethereum tooling.
What HyperEVM Provides
HyperEVM runs on chain ID 998 with sub-second block times, using HYPE as the native gas token. Dwellir's managed HyperEVM RPC supports 45 JSON-RPC methods across several categories:
- Standard Ethereum methods:
eth_call,eth_getBalance,eth_sendRawTransaction,eth_getLogs, and all core account/block/transaction queries - Debug methods:
debug_traceBlock,debug_traceTransaction,debug_traceCallfor deep execution analysis - Trace methods:
trace_block,trace_call,trace_filter,trace_replayTransactionfor detailed transaction tracing - Network methods:
eth_chainId,eth_syncing,net_versionfor node status
This means you can use all standard EVM tooling - Ethers.js, Web3.py, Hardhat, Foundry - without modification.
HyperEVM Connection Example
JavaScript (Ethers.js):
const { ethers } = require('ethers');
// Connect to HyperEVM via Dwellir
const provider = new ethers.JsonRpcProvider(
'https://api-hyperliquid-mainnet-evm.n.dwellir.com/YOUR_API_KEY'
);
// Query account balance
const balance = await provider.getBalance('0x...');
console.log(`Balance: ${ethers.formatEther(balance)} HYPE`);
// Read contract state
const contract = new ethers.Contract(contractAddress, abi, provider);
const result = await contract.someReadMethod();
Python (Web3.py):
from web3 import Web3
# Connect to HyperEVM via Dwellir
w3 = Web3(Web3.HTTPProvider(
'https://api-hyperliquid-mainnet-evm.n.dwellir.com/YOUR_API_KEY'
))
# Check connection
print(f"Chain ID: {w3.eth.chain_id}") # 998
print(f"Latest block: {w3.eth.block_number}")
# Query token balance
balance = w3.eth.get_balance('0x...')
print(f"Balance: {w3.from_wei(balance, 'ether')} HYPE")
When HyperCore Meets HyperEVM
HyperEVM shares the same consensus mechanism and global state as HyperCore through the HyperBFT protocol. This means DeFi applications on HyperEVM can interact with HyperCore's native trading primitives - accessing perpetual markets, spot orderbooks, and vault operations from within smart contracts. Bridge operations between the two layers enable composable strategies that combine on-chain trading with programmable smart contract logic.
When to Use HyperEVM RPC
Use HyperEVM RPC when you need:
- Smart contract deployment: Deploying Solidity contracts to Hyperliquid's EVM layer
- Token operations: ERC-20 transfers, approvals, and balance queries
- DeFi interactions: Interacting with lending, DEX, and yield protocols on HyperEVM
- Transaction tracing: Debugging contract execution with
debug_trace*andtrace_*methods - Cross-layer strategies: Building applications that bridge HyperCore trading with EVM-based logic
Don't use it for: HyperCore trading data (use Info Endpoint or gRPC), orderbook depth (use WebSocket), or real-time fill monitoring (use gRPC).
How the Components Work Together
Production applications rarely use just one infrastructure component. The most natural pairings are the Info Endpoint with WebSocket (for market data and live depth) or the Info Endpoint with gRPC (for market data and real-time blockchain events). Some applications use all four services for maximum coverage.
Common Integration Patterns
Info Endpoint + WebSocket is the natural pairing for applications that need market context plus live depth. The Info Endpoint provides the baseline - positions, balances, metadata, historical data - while the WebSocket delivers real-time orderbook updates and trade feeds. This combination covers most trading bot and market maker needs.
Info Endpoint + gRPC works best for applications that need market context plus real-time blockchain events. The Info Endpoint handles startup state and periodic reconciliation, while gRPC streams fills, liquidations, and funding updates as they happen. Analytics platforms and copy trading bots typically use this pairing.
HyperEVM RPC layers on top of either pattern when your application also involves smart contracts, token operations, or DeFi protocol interactions on Hyperliquid's EVM layer.
Trading Bot Architecture
A typical automated trading bot combines the Info Endpoint with either WebSocket or gRPC depending on what it needs to react to:
-
Startup: Info Endpoint
- Query current account balance and positions
- Load open orders to avoid duplicates
- Fetch market metadata and trading rules
-
Real-time data: Info Endpoint + WebSocket
- Subscribe to L2 orderbook for target assets via WebSocket
- Calculate optimal entry prices based on live depth
- Use Info Endpoint for periodic position reconciliation
-
Or: Info Endpoint + gRPC (for event-driven bots)
- Stream fills for target wallets via gRPC
- Monitor liquidation events for opportunity detection
- Use Info Endpoint for balance verification and historical queries
-
Optional: HyperEVM RPC
- Interact with DeFi protocols for hedging or yield
- Execute smart contract-based trading logic
Market Making System
Professional market makers typically pair the Info Endpoint with WebSocket for depth-driven quote placement:
┌─────────────────────────────────────────┐
│ Order Placement Logic │
└─────────────────────────────────────────┘
↓
┌─────────────┴─────────────┐
↓ ↓
┌─────────────┐ ┌─────────────┐
│ WebSocket │ │Info Endpoint│
│ (L2 Book) │ │ (Positions) │
└─────────────┘ └─────────────┘
↓ ↓
└─────────────┬─────────────┘
↓
┌────────────────┐
│ Risk Engine │
└────────────────┘
↓
┌────────────────┐
│ HyperEVM RPC │
│ (DeFi Hedge) │
└────────────────┘
- WebSocket L2 orderbook: Real-time market depth for quote placement
- Info Endpoint: Position reconciliation, balance checks, and historical fill queries
- Risk engine: Combines both data sources to enforce risk limits
- HyperEVM RPC: Optional DeFi interactions for hedging or collateral management
Analytics Platform
Data analytics systems pair the Info Endpoint with gRPC for comprehensive data coverage:
-
Initial backfill: Info Endpoint
- Historical trades for past 30 days
- Funding rate history
- User activity since account creation
-
Live ingestion: gRPC
- Stream all fills to database
- Capture liquidations for risk analysis
- Monitor funding updates for trend detection
-
Scheduled reconciliation: Info Endpoint
- Daily snapshots of all positions network-wide
- Weekly funding rate summaries
- Monthly volume aggregations
-
Optional: HyperEVM RPC
- Track DeFi protocol TVL and activity
- Monitor smart contract events via
eth_getLogs
Copy Trading Implementation
The Hyperliquid Copy Trading Bot tutorial demonstrates Info Endpoint + gRPC integration:
- Info Endpoint: Query target wallet's current positions on startup
- gRPC StreamFills: Monitor target wallet for new trades in real-time
- Info Endpoint (periodic): Verify copy accuracy every 5 minutes and reconcile state
This architecture ensures you have complete initial state (Info Endpoint), never miss a trade (gRPC), and maintain audit trails (Info Endpoint periodic queries).
Choosing Your Infrastructure Stack
Different applications have different infrastructure requirements. Here's how to map your use case to the optimal component mix:
| Application Type | Info Endpoint | gRPC | WebSocket | HyperEVM RPC | Rationale |
|---|---|---|---|---|---|
| Portfolio Tracker | Primary | No | Optional | Optional | Hourly balance updates sufficient, EVM for token balances |
| Trading Bot | Primary + Reconciliation | Optional | Primary | No | Info for state, WebSocket for live depth and execution |
| Market Maker | Primary | Optional | Primary | Optional | Info for positions, WebSocket for live depth |
| Analytics Dashboard | Primary | Primary | Optional | Optional | Info for historical, gRPC for live events |
| Liquidation Bot | Primary | Primary | Optional | No | Info for state, gRPC liquidation events as trigger |
| Copy Trading | Primary | Primary | Optional | No | Info for state, gRPC for real-time fill monitoring |
| DeFi Application | Primary | Optional | Optional | Primary | Info for trading data, EVM for smart contract logic |
| Backtesting Tool | Primary | No | No | No | Historical data only, no real-time component |
Infrastructure Provider Considerations
When selecting infrastructure beyond Hyperliquid's public endpoints, evaluate providers across these dimensions:
gRPC availability: Most providers focus on HyperEVM RPC. Dwellir provides managed HyperCore gRPC with SLA guarantees, dedicated clusters, and production-grade compression.
Orderbook depth: Public endpoints limit L2 subscriptions to 20 levels. Private endpoints from providers like Dwellir extend this to 100 levels, providing 5x more market depth visibility.
Rate limits and throughput: Trading bots making 1,000 RPS accumulate 2.6 billion monthly requests. Ensure your provider supports sufficient throughput.
Latency and geographic distribution: Co-location options near Hyperliquid validators reduce latency to sub-millisecond levels for competitive strategies.
Cost transparency: Some providers charge per request, others use compute unit multipliers that vary by method. At Hyperliquid's scale, pricing model significantly impacts monthly costs.
Dwellir's Complete Hyperliquid Stack
Building on Hyperliquid requires reliable infrastructure across all four components. Dwellir provides a complete managed stack:
Info Endpoint: Authenticated REST API access to HyperCore market data with rate limits that scale with your developer plan - significantly higher than the public endpoint. API key authentication and single-endpoint architecture simplifies integration. Start for free.
HyperEVM RPC: Full JSON-RPC access with 45 supported methods including debug and trace capabilities. Standard Ethereum tooling works out of the box with up to 5,000 RPS capacity and 99.9%+ uptime SLA. Start for free.
HyperCore gRPC: Managed gRPC endpoints with SLA-backed clusters. Stream blockchain events with guaranteed compression, failover, and production support. Contact the Dwellir team for access.
Orderbook WebSocket: Dedicated WebSocket infrastructure with 100-level L2 depth (5x public limit) and measurable latency improvements. Includes L4 individual order visibility for authenticated connections.
Dedicated Nodes: Reserve isolated infrastructure with unlimited capacity for institutional trading operations. Available in Singapore, Japan, and Stockholm for optimal latency.
Co-location: Deploy your trading software directly adjacent to Hyperliquid nodes for sub-millisecond response times. Critical for high-frequency strategies and competitive liquidations.
Custom Infrastructure Development
Beyond standard endpoint offerings, Dwellir develops custom infrastructure solutions for Hyperliquid applications requiring specialized endpoints, custom data processing, or infrastructure optimizations. The Dwellir team works directly with developers building advanced applications to design infrastructure that matches specific technical needs - from custom gRPC streaming filters to specialized orderbook aggregations. Contact the team to discuss custom infrastructure requirements.
Getting Started with Hyperliquid Infrastructure
For developers ready to move beyond public endpoints:
-
Start with HyperEVM RPC and Info Endpoint: Register for free to access JSON-RPC endpoints and authenticated Info Endpoint access with generous rate limits based on your plan
-
Add gRPC streaming: Contact the Dwellir team to enable managed HyperCore gRPC access for real-time blockchain events
-
Enable orderbook depth: Submit a support ticket through the Dwellir dashboard to activate 100-level L2 orderbook subscriptions
-
Scale with dedicated infrastructure: For production workloads requiring dedicated nodes or co-location, view Hyperliquid pricing or contact the team directly
Production Code Examples
Production-ready code examples demonstrating integration patterns:
- Hyperliquid gRPC examples (Go, Python, Node.js)
- Orderbook WebSocket progressive examples
- Complete copy trading bot implementation
- Real-time liquidation tracker
Additional Resources
- Hyperliquid RPC Providers 2025 - Compare infrastructure providers
- How to Get a Hyperliquid RPC Node - Setup guide
- Hyperliquid Endpoint Options Beyond Public RPC - Infrastructure tier comparison
- Dwellir Hyperliquid Documentation - Complete API reference
Summary: Building on Hyperliquid's Infrastructure
Hyperliquid's four infrastructure components serve distinct purposes. The Info Endpoint provides market data snapshots, historical queries, and account state. The gRPC service streams real-time blockchain events with minimal bandwidth. The WebSocket delivers live orderbook depth for market visualization. HyperEVM RPC enables smart contract interactions and DeFi development.
The most natural integration patterns pair the Info Endpoint with WebSocket (for depth-driven applications) or the Info Endpoint with gRPC (for event-driven applications). HyperEVM RPC layers on when your application involves smart contracts or cross-layer strategies.
The challenge isn't understanding each component - it's operating reliable infrastructure at production scale. Dwellir's managed Hyperliquid stack covers all four components with SLA-backed infrastructure, generous rate limits that scale with your plan, and production-grade gRPC streaming.
Ready to build on Hyperliquid? Register for free to start with HyperEVM RPC and Info Endpoint access, or contact the Dwellir team to discuss gRPC and custom infrastructure requirements.
