Skip to main content

/blocks/{blockId} REST API Endpoint

Returns a single block. BlockId can either be a block hash or a block height.

Updated on
Sep 02, 2024

Path Parameters

blockId
string
REQUIRED

The block identifier, as the block height or block hash.

Query Parameters

eventDocs
boolean

When set to true, every event will have an extra docs property with a string of the events documentation.

extrinsicDocs
boolean

When set to true, every extrinsic will have an extra docs property with a string of the extrinsics documentation.

noFees
boolean

When set to true, the fee won't be calculated for the extrinsics.

finalizedKey
boolean

When set to false, this will override the chain-config, and omit the finalized key in the response. This can increase performance slightly by avoiding an additional RPC call to the node.

decodedXcmMsgs
boolean

When set to true, this will show the decoded XCM messages within the extrinsics of the requested block.

paraId
string

When it is set, this will return only the decoded XCM messages for the specified origin Parachain Id (originParaId). To activate this functionality, ensure that the decodedXcmMsgs parameter is set to true.

Returns

number
string

The block number.

hash
string

The hash of the block.

parentHash
string

The hash of the parent block.

stateRoot
string

The root of the state trie at the end of the block.

extrinsicRoot
string

The root of the extrinsics trie at the end of the block.

authorId
string

The identifier of the block author.

logs
array

An array of objects representing the logs associated with the block.

type
string

The type of log.

index
string

The index of the log.

value
array

The value(s) of the log.

onInitialize
object

The onInitialize object which contains the following fields:

events
array

An array of objects representing the events

method
string

The method that triggered the event

data
array

The data associated with the event.

extrinsics
array

An array of objects representing the extrinsics included in the block.

method
object

An object containing information about the pallet and method.

pallet
string

The name of the pallet.

method
string

The name of the method.

signature
object

The signature object which contains the following fields:

signature
string

The signature itself.

signer
string

The account that signed the extrinsic.

nonce
string

The nonce of the extrinsic.

args
object

The arguments passed to the method.

tip
string

The tip given for the transaction.

hash
string

The hash of the extrinsic.

info
object

The info object which contains the following fields:

weight
object

The weight object which contains the following fields:

refTime
string

Reference time for the weight.

proofSize
string

Size of the proof for the weight.

class
string

The class of the extrinsic

partialFee
string

The partial fee paid for the transaction.

kind
string

The kind of the extrinsic.

era
object

The era object which contains the following fields:

mortalEra
array

An array representing the mortal era.

events
array

An array of objects representing the events triggered by the extrinsic

method
string

The method that triggered the event.

data
string

The data associated with the event.

success
boolean

A boolean indicating whether the extrinsic was successful.

paysFee
boolean

A boolean indicating whether the extrinsic pays a fee

onFinalize
object

The onFinalize object which contains the following fields:

events
array

An array of objects representing the events.

method
string

The method that triggered the event.

data
array

The data associated with the event.

finalized
boolean

A boolean indicating whether the block is finalized.

decodedXcmMsgs
object

(Optional) The decodedXcmMsgs object which contains the following fields:

horizontalMessages
array

n array of objects representing messages sent horizontally between parachains.

originParaId
string

The origin parachain ID.

destinationParaId
string

The destination parachain ID.

data
object

The data of the message.

downwardMessages
array

An array of objects representing messages sent downward from the relay chain to parachains.

sentAt
string

The block number at which the message was sent.

msg
string

The message content.

data
object

The data of the message.

upwardMessages
array

An array of objects representing messages sent upward from parachains to the relay chain.

originParaId
string

The origin parachain ID.

data
object

The data of the message.

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free