Build block explorer interfaces showing block details, transaction counts, and multi-chain block data.
Display latest completed blocks across all chains with transaction counts for explorer homepages.
query HomeBlockListInit($heightCount: Int, $completedHeights: Boolean, $first: Int) {
completedBlockHeights(heightCount: $heightCount, completedHeights: $completedHeights, first: $first) {
edges {
node {
chainId
creationTime
height
transactions {
totalCount
}
coinbase
}
}
}
}
Variables
{
"heightCount": 3,
"completedHeights": true,
"first": 5
}
Response
{
"data": {
"completedBlockHeights": {
"edges": [
{
"node": {
"chainId": 0,
"creationTime": "2025-09-25T18:59:18.000Z",
"height": 6211154,
"transactions": {
"totalCount": 45
},
"coinbase": "k:miner-account-key"
}
},
{
"node": {
"chainId": 1,
"creationTime": "2025-09-25T18:59:16.000Z",
"height": 6211153,
"transactions": {
"totalCount": 23
},
"coinbase": "k:another-miner-key"
}
},
{
"node": {
"chainId": 2,
"creationTime": "2025-09-25T18:59:14.000Z",
"height": 6211152,
"transactions": {
"totalCount": 67
},
"coinbase": "k:third-miner-key"
}
},
{
"node": {
"chainId": 3,
"creationTime": "2025-09-25T18:59:12.000Z",
"height": 6211151,
"transactions": {
"totalCount": 12
},
"coinbase": "k:fourth-miner-key"
}
},
{
"node": {
"chainId": 4,
"creationTime": "2025-09-25T18:59:10.000Z",
"height": 6211150,
"transactions": {
"totalCount": 89
},
"coinbase": "k:fifth-miner-key"
}
}
]
}
}
}
Use Cases
- Block explorer homepage feeds
- Chain-specific block browsers
- Mining statistics dashboards
- Network topology visualization
Notes completedHeights: true ensures only fully validated blocks. Use heightCount to control how many recent heights to display across chains.
Retrieve blocks with sophisticated filtering by depth, chains, and pagination for detailed block explorer interfaces.
query Blocks(
$minimumDepth: Int!,
$first: Int,
$last: Int,
$after: String,
$before: String,
$chainIds: [String!]
) {
blocksFromDepth(
minimumDepth: $minimumDepth,
first: $first,
last: $last,
after: $after,
before: $before,
chainIds: $chainIds
) {
edges {
node {
chainId
creationTime
transactions {
totalCount
edges {
node {
cmd {
meta {
gasPrice
}
}
}
}
}
height
coinbase
hash
canonical
}
cursor
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"minimumDepth": 6,
"first": 10,
"chainIds": ["0", "1", "2"]
}
Response
{
"data": {
"blocksFromDepth": {
"edges": [
{
"node": {
"chainId": 14,
"creationTime": "2025-09-25T23:29:37.241Z",
"transactions": {
"totalCount": 0,
"edges": []
},
"height": 6211678,
"coinbase": "{\"gas\":0,\"logs\":\"...\",\"events\":[...]}",
"hash": "2Y30bznAbJiPfcitK6WAiOe1O_CA7o_2W3_XTjGnAYg",
"canonical": true
},
"cursor": "NjIxMTY3ODoxMTU3MzE0NzM="
},
{
"node": {
"chainId": 19,
"creationTime": "2025-09-25T23:29:23.357Z",
"transactions": {
"totalCount": 8,
"edges": [
{
"node": {
"cmd": {
"meta": {
"gasPrice": "0.0000001"
}
}
}
}
]
},
"height": 6211678,
"coinbase": "{\"gas\":0,\"logs\":\"...\",\"events\":[...]}",
"hash": "lwDPu0SM05ixwgMvqmMVekiiqzWqsEm-3pnA8MoQfHc",
"canonical": true
},
"cursor": "NjIxMTY3ODoxMTU3MzE0Njk="
},
{
"node": {
"chainId": 0,
"creationTime": "2025-09-25T23:29:23.647Z",
"transactions": {
"totalCount": 7,
"edges": [
{
"node": {
"cmd": {
"meta": {
"gasPrice": "0.0000001"
}
}
}
},
{
"node": {
"cmd": {
"meta": {
"gasPrice": "0.000001"
}
}
}
}
]
},
"height": 6211678,
"coinbase": "{\"gas\":0,\"logs\":\"...\",\"events\":[...]}",
"hash": "8f0WRzLFV-4MYbEHstJP5_7zXpWDN8ZpS4pL2p8qaTs",
"canonical": true
},
"cursor": "NjIxMTY3ODoxMTU3MzE0NjY="
}
],
"pageInfo": {
"endCursor": "NjIxMTY3NzoxMTU3MzE0NDk=",
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "NjIxMTY3ODoxMTU3MzE0NzM="
},
"totalCount": 115713029
}
}
}
Use Cases
- Advanced block explorer interfaces
- Chain-specific block browsing
- Paginated block lists with depth filtering
- Block analysis with transaction preview
Notes minimumDepth ensures block finality. Use chainIds to filter specific chains. Pagination via pageInfo cursors handles large result sets efficiently.