Skip to main content

/blocks REST API Endpoint

Given a range query parameter return an array of all the blocks within that range.

Updated on
Sep 2, 2024

/blocks REST API Endpoint

Path Parameters

Query Parameters

range
string
REQUIRED
A range of integers. There is a max limit of 500 blocks per request.
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.

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.
Request
1
curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/blocks?range=1-2&eventDocs=false&extrinsicDocs=false&noFees=false' \
2
--header 'Accept: application/json'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free