curl --request POST \
--url 'https://api.avax.network/ext/bc/P#platform.getBlockByHeight' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "platform.getBlockByHeight",
"params": {},
"id": 1
}
'{
"jsonrpc": "2.0",
"result": {
"block": "<string>",
"encoding": "<string>"
},
"id": 1
}GetBlockByHeight returns the block at the given height.
curl --request POST \
--url 'https://api.avax.network/ext/bc/P#platform.getBlockByHeight' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "platform.getBlockByHeight",
"params": {},
"id": 1
}
'{
"jsonrpc": "2.0",
"result": {
"block": "<string>",
"encoding": "<string>"
},
"id": 1
}JSON-RPC request
Was this page helpful?