Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsHyperliquidHyperliquid HyperCoregRPC Streaming API

GetBlock - Get Block Data

Retrieve a single block from Hyperliquid L1 Gateway via gRPC. Get blockchain data at a specific position.

Hyperliquid RPC endpoint: endpoint URLs, plans and pricing.

Retrieve a single block at a specific position from the Hyperliquid L1 Gateway.

Full Code Examples

Clone our gRPC Code Examples Repository for complete, runnable implementations in Go, Python, and Node.js.

When to Use This Method

GetBlock is essential for:

  • Point-in-Time Analysis - Get blockchain state at a specific block or timestamp
  • Backtesting - Retrieve historical block data for strategy analysis
  • Auditing - Verify transactions and state changes at specific points
  • Debugging - Investigate specific blocks during development

Method signature

gRPC API version
protobuf
rpc GetBlock(GetRequest) returns (Record) {}

V3 accepts an inclusive position.block_number or Unix-millisecond position.timestamp; explicit zero is invalid. A positioned call returns the selected block record. An empty GetRequest waits for the next block written after the call begins, so set a deadline. Blocks do not accept filters.

protobuf
position: {
  block_number: 1058646974
}

The V3 Record contains optional sequential block_number and Unix-millisecond timestamp cursors plus raw replica_cmds bytes in data. The sequential cursor is distinct from abci_block.round. A pruned position returns NOT_FOUND; an above-head block returns OUT_OF_RANGE; malformed cursors and filters return INVALID_ARGUMENT.

cURL request
grpcurl \
  -import-path content/docs/hyperliquid/grpc \
  -proto v3.proto \
  -H "x-api-key: ${DWELLIR_API_KEY}" \
  -d '{"position":{"block_number":"1058646974"}}' \
  "${HYPERLIQUID_GRPC_ENDPOINT}" \
  hyperliquid_l1_gateway.v3.HyperliquidL1Gateway/GetBlock

Common Use Cases

For V3, select the block with GetRequest.position.block_number, then decode the returned Record.data. Use the decoded replica_cmds payload to analyze signed actions, compare blocks, or locate a transaction hash. See StreamBlocks for the complete decoded shape.

Best Practices

  1. Position Selection: Use the exact sequential block cursor for precise queries; timestamp lookups may return different blocks across requests near block boundaries
  2. Data Validation: Always validate JSON structure before processing
  3. Error Recovery: Implement retry logic with exponential backoff
  4. Resource Management: Close gRPC connections properly to avoid resource leaks
  5. Caching: Cache block data when analyzing the same blocks multiple times

Current Limitations

  • Replay History: Available replay history varies by feed and endpoint. A cursor outside retained history returns NOT_FOUND
  • Rate Limits: Be mindful of request frequency to avoid overwhelming the service

Resources

  • GitHub: gRPC Code Examples - Complete working examples
  • StreamBlocks Documentation - Full block specification and action types reference

Need help? Contact our support team or check the Hyperliquid gRPC documentation.

StreamTwapStatuses - Real-time TWAP Status Streaming

Stream TWAP order lifecycle events from Hyperliquid L1 Gateway via gRPC. Track TWAP status changes and execution progress per block in real time.

GetFills - Get Fill Data

Retrieve fills at a specific position from Hyperliquid L1 Gateway via gRPC. Get order execution data for analysis and reconciliation.

On this page

When to Use This MethodCommon Use Cases1. Historical Block Analysis2. Block Comparison3. Transaction VerificationBest PracticesCurrent LimitationsResources