Parameters
Start slot (inclusive)
Maximum number of blocks to return
Configuration object containing the following optional fields:
Response
Array of block slots in ascending order
Code Examples
Basic Request
Request with Commitment
Using web3.js
Notes
- Returns confirmed blocks starting from the specified slot
- Results are returned in ascending order
- The limit controls the maximum number of blocks to return
- Some slots may be skipped (no block produced)
- The response is immediate as it reads from the current state
Best Practices
- Use appropriate commitment level based on your needs:
processedfor latest blocksconfirmedfor high probability finalityfinalizedfor guaranteed finality
- Keep the limit reasonable to avoid timeouts
- Use this method for pagination instead of
getBlocks - Cache results when appropriate to reduce RPC load
- Handle skipped slots in your application logic
Common Errors
Use Cases
-
Block Pagination
-
Recent Block History
-
Block Streaming