Get blocks
Returns all blocks from the database that satisfy the query parameters. It will return a paginated response, ordered descending by block number.
Request
- Base URL: https://bridge-hub.polkadot.crystal.api.submerge.io/v1
- URL: https://bridge-hub.polkadot.crystal.api.submerge.io/v1/blocks
- Auth: none declared
Query parameters
Opaque cursor for block pagination - returned in the endpoint response. This parameter is mutually exclusive with all other parameters, and will return bad request if any other parameter is set.
Number of blocks per page to be returned.
Block status.
- finalized: Blocks that have been finalized on chain.
- proposed: Blocks that have been authored but not yet finalized.
- pruned: Blocks that have been removed or are no longer accessible.
Filter results by block status. If not specified, all blocks are returned.
Filter blocks by minimum block number.
Filter blocks by maximum block number.
Filter blocks by minimum block timestamp. In milliseconds.
Filter blocks by maximum block timestamp. In milliseconds.
Filter blocks by minimum runtime spec version.
Filter blocks by maximum runtime spec version.
Filter results by block author. Either of the following:
- Author's Substrate SS58 address string (e.g. 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY).
- Author's Substrate account id encoded as a hexadecimal string (e.g. 0x008d8404893c7b4b80f397605cc96e61fec3c89676c8c2794a2a7d281d678b1a).
- Author's address encoded as a hexadecimal string with optional 0x prefix (e.g. 0x008d8404893c7b4b80f397605cc96e61fec3c89676c8c2794a2a7d281d678b1a).
Response
List of matching blocks, with a cursor for the next page.
Example response
{
"data": [
{
"author": {
"type": "accountId",
"value": "0x269a84431cd8dfc5762beadfa54a8f21597c12d4f31e51f9f6f985f65ba0c626"
},
"eventCount": 56,
"extrinsicCount": 2,
"extrinsicRoot": "0x7893dd573a5033a6d785bf4038c237cbd8e1f3730d177d4f9b21c8d2c7b34454",
"hash": "0xc82fe0d5752d42ae3d325f14206859f86cec7447f244d5b4bccfc2a00bd58df8",
"number": 27419831,
"parentHash": "0x1615581259dd1ac45fea1b23406367ca79c9f6dfa3b3b1115517c6e86250c42b",
"specVersion": 1006001,
"stateRoot": "0x8c8b0b599733c41bad79a617d8f2f0213a5d965d287cee16c9efd65f23001603",
"status": "finalized",
"timestamp": 1755773684012,
"weight": {
"mandatory": {
"proofSize": "204955",
"refTime": "701777135384"
},
"normal": {
"proofSize": "0",
"refTime": "0"
},
"operational": {
"proofSize": "0",
"refTime": "0"
}
}
}
],
"pagination": {
"count": 57,
"nextCursor": "eyJjdXJzb3JfcG9zaXRpb24iOnsiYmxvY2tfbnVtYmVyIjozMzY0MzMzLCJibG9ja19oYXNoX2hleCI6IjB4ZjdlMjkyYWQ3ZDNkYzE4MzUzOWYwOGM4NDgwMmNiMDc2ZTc5NjNkYjA2NTA3MjAwNTY1M2NjNWU4YzdkMTE3MyIsImluZGV4IjowfSwicXVlcnkiOnsiaW5jbHVkZV9hcmdzIjpmYWxzZX19",
"pageSize": 1
}
}Changes
No recorded changes to this operation across all 1 revision of this API.