Skip to main content

getLastBlock Query

Get the most recent block on the blockchain.

Updated on
Oct 16, 2024

getLastBlock Query

Parameters

This method does not accept any parameters

Returns

data
object
The data object which contains the following fields:
chain
object
The object that holds information about the blockchain network
latestBlock
object
The object containing details of the latest block in the blockchain
id
string
The unique identifier (hash) of the latest block
height
string
The block height of the latest block
Request
1
curl --location 'https://docs-demo.fuel-mainnet.quiknode.pro/v1/graphql' \
2
--header 'Accept: application/json' \
3
--header 'Content-Type: application/json' \
4
--data '{
5
"query": "{ chain { latestBlock { id height } } }"
6
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free