getConfirmedBlock - Solana

getConfirmedBlock. Allows developers to retrieve detailed information about a specific confirmed block

getConfirmedBlock - solana [Value: 151CU]
Retrieves detailed information about a specific account on the Solana blockchain.
Use cases

Use cases

  • Retrieve detailed information about a specific confirmed block
  • Analyze transactions within a block for auditing purposes
  • Verify block confirmations and associated transaction details
Constraints

Constraints

  • Requires valid block number parameter
  • Network delays can affect data retrieval
  • High-frequency requests may lead to rate limiting
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://solana.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[94101948, {"encoding": "json","transactionDetails":"full","rewards":false}]}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": 94101948,
    "blockTime": 1625247600,
    "blockhash": "5mzZf8yd1Xe5GphbxxbBYKfyF2U2dHPuZbggyrB4GnNm",
    "parentSlot": 94101947,
    "previousBlockhash": "Esh6dbed4YGic9krv1FNZKoBfEZ7F1ox2JX7Wx3C1jti",
    "transactions": [
      {
        "meta": {
          "err": null,
          "fee": 5000,
          "innerInstructions": [],
          "loadedAddresses": {
            "readonly": [],
            "writable": []
          },
          "logMessages": [],
          "postBalances": [1000000000, 5000000],
          "postTokenBalances": [],
          "preBalances": [1000005000, 0],
          "preTokenBalances": []
        },
        "transaction": {
          "message": {
            "accountKeys": ["D8Vn4Xo...3Xx", "F5qT2...3yY"],
            "header": {
              "numRequiredSignatures": 1,
              "numReadonlySignedAccounts": 0,
              "numReadonlyUnsignedAccounts": 1
            },
            "instructions": [
              {
                "accounts": [0, 1],
                "data": "3Bxs2V...2c3",
                "programIdIndex": 2
              }
            ],
            "recentBlockhash": "5mzZf8yd1Xe5GphbxxbBYKfyF2U2dHPuZbggyrB4GnNm"
          },
          "signatures": [
            "4W3X9Qy...5Ds"
          ]
        }
      }
    ]
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
slot_numberstring
The slot number represented as a 64-bit unsigned integer (u64).
objectarray
The configuration object containing the following fields:
array
commitmentstring
The level of commitment required for the query
  • finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
  • confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
  • processed - The node will query its most recent block. Note that the block may not be complete
encodingobject
(Default: json) The encoding format for account data. Options include "base58" (slow), "base64", "base64+zstd", or "jsonParsed"
transactionDetailsstring
(Default: full) Specifies the level of transaction details in the response. Options include "full", "signatures", and "none".
rewardsboolean
(Default: true) Determines whether to include the rewards array in the response

Response

200
Object containing block details if the block is confirmed, otherwise null

Response params

object
idinteger
jsonrpcstring
resultstring
object
blockHeightinteger
The height of the block in the blockchain
blockTimeint64
The timestamp of the block. null indicates that the time is not available.
blockhashstring
The unique identifier (hash) of the block.
parentSlotinteger
The slot number of the parent block.
previousBlockhashstring
The hash of the previous block in the chain.
transactionsarray_of_objects
A list of transactions included in the block.
object
metaobject
Metadata about the transaction
object
errobject
Error information, null if no error.
feeuint64
Transaction fee in lamports.
innerInstructionsarray
List of inner instructions.
logMessagesarray
Log messages from the transaction execution.
postBalancesarray
Balances of accounts after the transaction.
postTokenBalancesarray
Token balances of accounts after the transaction
preBalancesarray
TBalances of accounts before the transaction.
preTokenBalancesarray
Token balances of accounts before the transaction
statusarray
loadedAddressesobject
Addresses loaded from address lookup tables for the transaction. This is undefined if maxSupportedTransactionVersion was not specified in the request parameters.
object
writablearray_of_strings
readonlyarray_of_strings
transactionobject
Details of the transaction
object
messagestring
Transaction message.
object
accountKeysarray_of_strings
Array of public keys involved.
headerobject
Transaction header
object
numRequiredSignaturesnumber
Number of required signatures.
numReadonlySignedAccountsnumber
Number of read-only signed accounts.
numReadonlyUnsignedAccountsnumber
Number of read-only unsigned accounts.
recentBlockhashnumber
Blockhash used for the transaction.
instructionsarray
Array of instruction objects.
object
accountsarray_of_integers
Indices of accounts involved.
datastring
Instruction data in specified format.
programIdIndexstring
Index of the program ID in accountKeys.
signaturesarray_of_strings
List of signatures for the transaction.
rewardsboolean
Indicates whether to include the rewards array
object
pubkeystring
The public key of the account that received the reward, encoded in base-58.
lamportsinteger
The number of lamports (i64) credited or debited to the account as a reward.
postBalanceinteger
The account's balance in lamports (u64) after the reward was applied.
rewardTypestring
The type of reward received. Possible values are "fee", "rent", "voting", and "staking".
commissioninteger
The commission taken by the vote account when the reward was credited. This is only present for voting and staking rewards.