Skip to main content

chain_getBlock

Retrieves complete block information from Asset Hub, including the block header, extrinsics, and justifications.

Why Asset Hub? Build on Polkadot's system parachain managing $4.5B+ in DOT tokens, native USDC/USDT, and NFTs with 50-90% lower fees than Relay Chain, fee payment in any supported asset, 1.5M+ accounts migrated, and trustless Ethereum bridge access.

Use Cases#

The chain_getBlock method is essential for:

  • Block explorers - Display complete block information
  • Chain analysis - Analyze block production patterns
  • Transaction verification - Confirm extrinsic inclusion for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Data indexing - Build historical blockchain databases

Parameters#

ParameterTypeRequiredDescription
blockHashStringNoHex-encoded block hash. If omitted, returns latest block

Request#

{
"jsonrpc": "2.0",
"method": "chain_getBlock",
"params": ["0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3"],
"id": 1
}

Returns#

FieldTypeDescription
blockObjectComplete block data
block.headerObjectBlock header information
block.header.parentHashStringHash of the parent block
block.header.numberStringBlock number (hex-encoded)
block.header.stateRootStringRoot of the state trie
block.header.extrinsicsRootStringRoot of the extrinsics trie
block.extrinsicsArrayArray of extrinsics in the block
justificationsArrayBlock justifications (if available)

Code Examples#

# Get latest block
curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "chain_getBlock",
"params": [],
"id": 1
}'

# Get specific block
curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "chain_getBlock",
"params": ["0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3"],
"id": 1
}'