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 Code | Message | Description |
|---|---|---|
| -32602 | Invalid params | Invalid block number or parameter format |
| -32000 | Block not found | Block does not exist |
Related Methods
eth_blockNumber- Get latest block numbereth_getBlockByHash- Get block by hasheth_getTransactionByHash- Get transaction details
eth_blockNumber
Get the current block height on Hyperliquid. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.
eth_getBlockByHash
Retrieve complete block data by block hash on Hyperliquid. Essential 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.