New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
Returns identity and transaction information about a confirmed block in the ledger.
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getBlock",
"params": [
430
]
}
'{
"jsonrpc": "2.0",
"id": "<string>",
"result": {
"blockhash": "DUCT8VSgk2BXkMhQfxKVYfikEZCQf4dZ4ioPdGdaVxMN",
"previousBlockhash": "HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs",
"parentSlot": 429,
"transactions": [
{
"meta": {},
"transaction": {
"message": {
"accountKeys": [
"<string>"
],
"header": {
"numReadonlySignedAccounts": 123,
"numReadonlyUnsignedAccounts": 123,
"numRequiredSignatures": 123
},
"instructions": [
{
"accounts": [
123
],
"data": "<string>",
"programIdIndex": 123,
"stackHeight": 123
}
],
"recentBlockhash": "<string>"
},
"signatures": [
"<string>"
]
}
}
],
"blockTime": null,
"blockHeight": null,
"rewards": [
{
"pubkey": "<string>",
"lamports": 123,
"rewardType": "<string>"
}
]
}
}The JSON-RPC protocol version.
2.0 A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getBlock Parameters for the request.
Slot number as a u64 integer.
430
Successfully retrieved block details.
2.0 Show child attributes
The blockhash of this block (base-58 encoded string).
"DUCT8VSgk2BXkMhQfxKVYfikEZCQf4dZ4ioPdGdaVxMN"
The blockhash of the block's parent.
"HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs"
The slot index of this block's parent.
429
Array of transaction details.
Show child attributes
Metadata associated with the transaction.
Transaction details.
Show child attributes
Show child attributes
Array of account public keys used in this transaction.
Show child attributes
Number of readonly signed accounts.
Number of readonly unsigned accounts.
Number of required signatures.
Array of program instructions.
Show child attributes
Array of account indexes.
Program input data encoded in base58.
Index of the program ID in the accountKeys array.
Stack height.
Recent blockhash used in this transaction.
Array of signatures for this transaction (base-58 encoded).
Estimated production time as Unix timestamp.
null
Number of blocks beneath this block.
null
Was this page helpful?
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getBlock",
"params": [
430
]
}
'{
"jsonrpc": "2.0",
"id": "<string>",
"result": {
"blockhash": "DUCT8VSgk2BXkMhQfxKVYfikEZCQf4dZ4ioPdGdaVxMN",
"previousBlockhash": "HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs",
"parentSlot": 429,
"transactions": [
{
"meta": {},
"transaction": {
"message": {
"accountKeys": [
"<string>"
],
"header": {
"numReadonlySignedAccounts": 123,
"numReadonlyUnsignedAccounts": 123,
"numRequiredSignatures": 123
},
"instructions": [
{
"accounts": [
123
],
"data": "<string>",
"programIdIndex": 123,
"stackHeight": 123
}
],
"recentBlockhash": "<string>"
},
"signatures": [
"<string>"
]
}
}
],
"blockTime": null,
"blockHeight": null,
"rewards": [
{
"pubkey": "<string>",
"lamports": 123,
"rewardType": "<string>"
}
]
}
}