avm.getBlockByHeight RPC Method
Parameters
blockHeight
string
The block height
encoding
string
The encoding format to use. It can be either hex or json. Defaults is set to hex
Returns
block
string
The block data retrieved by height
encoding
string
Indicates that the block data is encoded in hexadecimal format
Request
1curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro/ext/bc/C/rpc/ext/bc/X \2--header 'Content-Type: application/json' \3--data-raw '{4"jsonrpc":"2.0",5"id" : 1,6"method" :"avm.getBlockByHeight",7"params" :{}8}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free