Parameters
number
required
Start slot (inclusive)
number
required
End slot (inclusive)
object
Configuration object containing the following optional fields:
Response
array
Array of block slots in ascending order
Code Examples
Basic Request
Request with Commitment
Using web3.js
Notes
- Returns confirmed blocks between the specified slots
- Results are returned in ascending order
- The range is inclusive of both start and end slots
- 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 slot range reasonable to avoid timeouts
- Consider using
getBlocksWithLimitfor pagination - Cache results when appropriate to reduce RPC load
- Handle skipped slots in your application logic
Common Errors
Use Cases
-
Block Range Analysis
-
Block History Tracking
-
Block Gap Detection