Docs

eth_getBlockByNumber - Sonic RPC Method

Retrieve complete block data by block number on Sonic. Perfect for DeFi developers, high-frequency trading builders, and teams requiring sub-second finality building on the world's fastest EVM chain with 720ms finality, $1.2B+ TVL, and 1,534% growth since launch.

Returns information about a block by block number on Sonic.

Why Sonic? Build on the world's fastest EVM chain with 720ms finality, $1.2B+ TVL, and 1,534% growth since launch with 720ms transaction finality, 10K TPS, 90% fee sharing via FeeM, Fantom heritage with Andre Cronje leadership.

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 ultra-fast DeFi, high-frequency trading dApps, and performance-critical applications
  • 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