GetOrderBookSnapshot - Get Order Book Data
Retrieve a full order book snapshot with individual order visibility from Hyperliquid L1 Gateway via gRPC. Premium endpoint available on dedicated nodes.
Retrieve a full order book snapshot at a specific point in time from the Hyperliquid L1 Gateway. Returns every individual open order across all markets with complete metadata including order IDs, timestamps, trigger conditions, and child orders.
Dedicated Node Required
This is a premium endpoint available only with dedicated nodes. It is not available on shared infrastructure. Contact support to provision a dedicated node.
Full Code Examples
Clone our gRPC Code Examples Repository for complete, runnable implementations in Go, Python, and Node.js.
When to Use This Method
GetOrderBookSnapshot is essential for:
- Market Microstructure Analysis - Access every individual order with full metadata
- Queue Position Tracking - See exact order placement timestamps and sizes
- Whale Watching - Monitor large orders with their original sizes and trigger conditions
- Trading Strategies - Analyze order distribution, TP/SL clustering, and trigger order density
- Risk Management - Assess market impact with individual order granularity
Method Signature
rpc GetOrderBookSnapshot(Timestamp) returns (OrderBookSnapshot) {}Response Examples
Simple Limit Order (Bid)
{
"coin": "0G",
"side": "B",
"limitPx": "0.59341",
"sz": "52.0",
"oid": 333003526755,
"timestamp": 1772276628506,
"triggerCondition": "N/A",
"isTrigger": false,
"triggerPx": "0.0",
"children": [],
"isPositionTpsl": false,
"reduceOnly": false,
"orderType": "Limit",
"origSz": "52.0",
"tif": "Alo",
"cloid": "0x00000000000000000000000000000318"
}Order with TP/SL Children
A parent limit order can have up to 2 child orders (stop-loss and/or take-profit) attached:
{
"coin": "AAVE",
"side": "B",
"limitPx": "104.6",
"sz": "1.94",
"oid": 332954766819,
"timestamp": 1772272640873,
"triggerCondition": "N/A",
"isTrigger": false,
"triggerPx": "0.0",
"children": [
{
"coin": "AAVE",
"side": "A",
"limitPx": "94.3",
"sz": "1.94",
"oid": 332954766820,
"timestamp": 1772272640873,
"triggerCondition": "Price below 102.5",
"isTrigger": true,
"triggerPx": "102.5",
"children": [],
"isPositionTpsl": false,
"reduceOnly": true,
"orderType": "Stop Market",
"origSz": "1.94",
"tif": null,
"cloid": null
},
{
"coin": "AAVE",
"side": "A",
"limitPx": "102.0",
"sz": "1.94",
"oid": 332954766821,
"timestamp": 1772272640873,
"triggerCondition": "Price above 110.87",
"isTrigger": true,
"triggerPx": "110.87",
"children": [],
"isPositionTpsl": false,
"reduceOnly": true,
"orderType": "Take Profit Market",
"origSz": "1.94",
"tif": null,
"cloid": null
}
],
"isPositionTpsl": false,
"reduceOnly": false,
"orderType": "Limit",
"origSz": "1.94",
"tif": "Gtc",
"cloid": null
}Triggered Order
An order where the trigger condition has already been met and the order is now active:
{
"coin": "ARB",
"side": "A",
"limitPx": "0.1099",
"sz": "601.7",
"oid": 331886608601,
"timestamp": 1772189655929,
"triggerCondition": "Triggered",
"isTrigger": false,
"triggerPx": "0.0",
"children": [],
"isPositionTpsl": false,
"reduceOnly": true,
"orderType": "Take Profit Limit",
"origSz": "601.7",
"tif": "Gtc",
"cloid": null
}Important Notes
- Individual orders, not aggregated levels. Each entry is an individual order with full metadata (order ID, timestamp, trigger info, children, etc.).
- Bids are sorted by price descending (highest price first). Asks are sorted by price ascending (lowest price first).
- Children are never nested. Child orders always have an empty
childrenarray. - Trigger orders (
isTrigger: true) havetif: nulland meaningfultriggerCondition/triggerPxvalues. - Once triggered, the order becomes
isTrigger: false,triggerCondition: "Triggered",triggerPx: "0.0", and receives atifvalue (typically"Gtc").
Best Practices
- Message Size Configuration: Set gRPC max receive message length to at least 500 MB
- Timeout: Use a generous timeout (60-120 seconds) for the RPC call due to the large response
- Data Validation: Always validate JSON structure before processing
- Error Recovery: Implement retry logic with exponential backoff
- Resource Management: Close gRPC connections properly to avoid resource leaks
- Streaming Alternative: For continuous updates, consider using
StreamOrderbookSnapshotsinstead
Current Limitations
- Data Retention: Historical order book data is limited to a 24-hour rolling window
- Rate Limits: Be mindful of request frequency to avoid overwhelming the service
- Availability: This endpoint requires a dedicated node and is not available on shared infrastructure
Resources
- GitHub: gRPC Code Examples - Complete working examples
- Copy Trading Bot - Production-ready trading bot example
- Pricing - Dedicated node pricing details
Need help? Contact our support team or check the Hyperliquid gRPC documentation.
GetFills - Get Fill Data
Retrieve fills at a specific position from Hyperliquid L1 Gateway via gRPC. Get order execution data for analysis and reconciliation.
StreamBlocks - Real-time Block Streaming
Stream continuous block data from Hyperliquid L1 Gateway via gRPC. Complete reference for all 47 action types.