Skip to main content

Parameters

number
required
The slot number of the block to retrieve
object
Configuration object containing the following optional fields:

Response

object | null
Returns null if the block is not found. Otherwise, returns an object containing:

Code Examples

Basic Request

Request with Parsed Transaction Data

Using web3.js

Notes

  1. Block production time is an estimate based on genesis block time and slots elapsed.
  2. Not all blocks include rewards.
  3. The jsonParsed encoding attempts to parse transaction instruction data based on known program layouts.
  4. Some blocks might be skipped (no leader assigned or failed block production).
  5. Block data may be pruned from the node based on ledger configuration.

Best Practices

  1. Use transactionDetails: "signatures" if you only need transaction signatures.
  2. Set rewards: false if reward data is not needed.
  3. Consider using getBlockHeight first if you need the latest block.
  4. For real-time updates, consider using websocket subscription instead.

Common Errors