Docs

eth_getBlockByNumber - Hyperliquid RPC Method

Retrieve complete block data by block number on Hyperliquid. Perfect for derivatives traders, DeFi protocols, and teams building high-frequency trading applications building on the trading-focused EVM and HyperCore ecosystem built for onchain perpetuals and market data.

Returns information about a block by block number on Hyperliquid.

Why Hyperliquid? Build on the trading-focused EVM and HyperCore ecosystem built for onchain perpetuals and market data with HyperCore market structure, sub-second finality, and direct access to trading-focused data services.

Use Cases

The eth_getBlockByNumber method is essential for:

  • Block explorers - Display complete block information
  • Transaction indexers - Process all transactions in a block
  • Analytics platforms - Analyze blockchain data for perpetual futures trading, onchain order books, and institutional-grade derivatives
  • Timestamp verification - Get block timestamps for time-based logic

Code Examples

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid block number or parameter format
-32000Block not foundBlock does not exist