curl --request POST \
--url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "getBlock",
"params": [
239462061,
{
"encoding": "jsonParsed",
"maxSupportedTransactionVersion": 0
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}
curl --request POST \
--url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "getBlock",
"params": [
239462061,
{
"encoding": "jsonParsed",
"maxSupportedTransactionVersion": 0
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}
getBlock
method returns complete information about a block for a given slot height.
block
— the height of the slot to retrieve information for.commitment
— confirmed
or finalized
. processed
is not supported.transactionDetails
— level of transaction details.maxSupportedTransactionVersion
— for transaction versioningrewards
— block rewards that go to validators.blockHeight
— the actual block number produced in the slot.blockTime
— Unix timestamp of the block. Also note that this is the timestamp agreed upon by the cluster validators. Most of the time, it doesn’t matter that much but still important to know.blockhash
— the hash of the block.parentSlot
— the slot of the block’s parent.previousBlockhash
— the hash of the block’s parent.rewards
— an array of reward objects that were awarded when the block was processed.transactions
— an array of transaction objects that were processed in the block.getBlock
is to retrieve detailed information about a specific block. This can be useful for block explorers, wallets, or other applications that need to display or make use of this information.Block details
The response is of type object
.
Was this page helpful?