Skip to main content

/blocks/head REST API Endpoint

Returns the most recently finalized block.

Updated on
Sep 02, 2024

Path Parameters

Query Parameters

finalized
boolean

A boolean representing whether or not to get the finalized head. If it is not set the value defaults to true. When set to false it will attempt to get the newest known block, which may not be finalized.

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.

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 unique identifier of the block

parentHash
string

The hash of the previous block in the chain

stateRoot
string

The root of the state trie after the block's execution

extrinsicRoot
string | null

(Optional) The root of the Merkle tree containing all extrinsics in the block, or null when not present

authorId
string

The identifier of the block author or the validator who created this block

logs
array

An array of log items associated with the block. Each log entry contains:

type
string

The type of log

index
string

An index or identifier for the log

value
string | array

The log's content or value

onInitialize
object

The events triggered during the block's initialization phase. It contains:

events
array

An array of event objects triggered on initialization. Each event contains:

method
string

The method or event name

data
array

An array of data associated with the event.

extrinsics
array

An array of extrinsics included in the block. Each extrinsic contains:

method
object

The pallet and method associated with the extrinsic

pallet
string

The pallet (module) name

method
string

The method being called in the extrinsic

signature
object | null

The signature object which contains the following fields:

signature
string

The cryptographic signature.

signer
string | object

The account that signed the extrinsic (SS58 string or a MultiAddress object such as { Id: "…" })

Id
string

Account id when the signer is encoded as a MultiAddress Id variant

nonce
string | null

The nonce of the transaction, used to ensure the uniqueness of each transaction from a given account

args
object

The arguments passed to the extrinsic method

tip
string | null

Any tip attached to the transaction to prioritize it

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

The reference time used to calculate the weight

proofSize
string

The size of the proof associated with the extrinsic

class
string

The class of the transaction

partialFee
string

The partial fee associated with the transaction

kind
string

The kind of extrinsic

era
object

The era object which contains the following fields:

mortalEra
string | object

Mortality for the extrinsic (compact hex string or { period, phase } object)

period
string

Period of the mortal era

phase
string

Phase of the mortal era

immortalEra
string

(Optional) Present when the extrinsic uses an immortal era (e.g. 0x00)

events
array

Events triggered by this extrinsic

method
string | object

The event method name

data
array

The data associated with the event

success
boolean

Indicates whether the extrinsic was successfully executed

paysFee
boolean

Indicates whether the fee for the extrinsic was paid

onFinalize
object

The onFinalize object which contains the following fields:

events
array

An array of event objects triggered on finalization.

method
object

The pallet and method that triggered the event

pallet
string

The pallet name

method
string

The method name

data
array

The data associated with the event

finalized
boolean

A boolean indicating whether the block has been finalized

decodedXcmMsgs
object | null

(Optional) The decodedXcmMsgs object which contains the following fields:, or null when not requested

horizontalMessages
array

An array of horizontalMessages

originParaId
string

The ID of the originating parachain

destinationParaId
string

The ID of the destination parachain

data
object

The data associated with the message

downwardMessages
array

The messages sent from the relay chain to a parachain.

sentAt
string

The block number at which the message was sent

msg
string

The message content

data
object

The data associated with the message.

upwardMessages
array

Messages sent from a parachain to the relay chain

originParaId
string

The ID of the originating parachain

data
object

The data associated with the message.

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