QuickNode icon

QuickNode

Interact with blockchain networks via QuickNode RPC endpoints

Blockchain → Get Block

AI-generated

Overview

This node operation fetches detailed information about a specific blockchain block by its number. It supports querying the block by a hexadecimal block number or special keywords like "latest", "earliest", or "pending". Users can choose whether to include full transaction objects within the block data or just transaction hashes. This is useful for blockchain analysis, monitoring block contents, or integrating blockchain data into workflows.

Use Case Examples

  1. Retrieve the latest block details including all transactions to monitor recent blockchain activity.
  2. Fetch a specific block by its number without transaction details to get a summary of the block's metadata.

Properties

Name Meaning
Block Number The block number to retrieve, specified as a hexadecimal string or special keywords "latest", "earliest", or "pending".
Include Transactions Boolean flag indicating whether to include full transaction objects in the block data (true) or only transaction hashes (false).

Output

JSON

  • resource - The resource type, here always 'blockchain'.
  • operation - The operation performed, here 'getBlock'.
  • result - Raw result data returned from the blockchain RPC call.
  • timestamp - The block timestamp as an integer.
  • block - The block data object containing block details.
  • blockNumber - The block number as an integer.
  • transactionCount - Number of transactions in the block.

Dependencies

  • QuickNode RPC endpoint URL credential for API access

Troubleshooting

  • Ensure the block number parameter is correctly formatted as a hex string or one of the accepted keywords ('latest', 'earliest', 'pending').
  • If including transactions, large blocks may result in longer response times or timeouts.
  • API errors from QuickNode will be surfaced with error messages; verify API credentials and endpoint URL are correct.

Links

Discussion