getBlock
POST
Returns identity and transaction information about a confirmed block in the ledger
param[0]
slotNumberintegerrequired
The slot number.param[1]
configurationObjectobjectrequired
commitmentstring
The commitment describes how finalized a block is at that point in time.- 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 still be skipped by the cluster.
encodingstring
Encoding format for each returned transaction. See Parsed Responses.jsonParsedattempts to use program-specific instruction parsers to return more human-readable and explicit data in the transaction.message.instructions list.- If
jsonParsedis requested but a parser cannot be found, the instruction falls back to regular JSON encoding (accounts, data, and programIdIndex fields).
transactionDetailsstring
Level of transaction detail to return.- If accounts are requested, transaction details only include signatures and an annotated list of accounts in each transaction.
- Transaction metadata is limited to only: fee, err, pre_balances, post_balances, pre_token_balances, and post_token_balances.
maxSupportedTransactionVersioninteger
Currently, the only valid value for this parameter is 0. Setting it to 0 allows you to fetch all transactions, including both Versioned and legacy transactions.This parameter determines the maximum transaction version that will be returned in the response. If you request a transaction with a higher version than this value, an error will be returned. If you omit this parameter, only legacy transactions will be returned—any versioned transaction will result in an error.rewardsboolean
Whether to populate the rewards array. If parameter not provided, the default includes rewards.Responses
idinteger
The request IDjsonrpcstring
The JSON-RPC versionblockHeightinteger
The number of blocks beneath this block.blockTimeinteger
Estimated production time, as Unix timestamp (seconds since the Unix epoch). null if not available.blockhashstring
The blockhash of the block, as base-58 encoded stringparentSlotinteger
The slot index of the parent block.previousBlockhashstring
The blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111"accountKeysarrayrequired
List of base-58 encoded public keys used by the transaction, including by the instructions and for signatures. The first message.header.numRequiredSignatures public keys must sign the transaction.Details the account types and signatures required by the transaction.
numRequiredSignaturesintegerrequired
The total number of signatures required to make the transaction valid. The signatures must match the first numRequiredSignatures of message.accountKeys.numReadonlySignedAccountsintegerrequired
The last numReadonlySignedAccounts of the signed keys are read-only accounts. Programs may process multiple transactions that load read-only accounts within a single PoH entry, but are not permitted to credit or debit lamports or modify account data. Transactions targeting the same read-write account are evaluated sequentially.numReadonlyUnsignedAccountsintegerrequired
The last numReadonlyUnsignedAccounts of the unsigned keys are read-only accounts.recentBlockhashstringrequired
A base-58 encoded hash of a recent block in the ledger used to prevent transaction duplication and to give transactions lifetimes.programIdIndexintegerrequired
Index into the message.accountKeys array indicating the program account that executes this instruction.accountsarrayrequired
List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.datastringrequired
The program input data encoded in a base-58 string.accountKeystringrequired
Base-58 encoded public key for an address lookup table account.writableIndexesarrayrequired
List of indices used to load addresses of writable accounts from a lookup table.readonlyIndexesarrayrequired
List of indices used to load addresses of readonly accounts from a lookup table.signaturesarrayrequired
A list of base-58 encoded signatures applied to the transaction. The list is always of length message.header.numRequiredSignatures and not empty. The signature at index i corresponds to the public key at index i in message.accountKeys. The first one is used as the transaction id.errobject
Error if transaction failed, null if transaction succeeded.feeinteger
fee this transaction was charged, as u64 integerpreBalancesarray
array of u64 account balances from before the transaction was processedpostBalancesarray
array of u64 account balances after the transaction was processedList of inner instructions or null if inner instruction recording was not enabled during this transaction
indexnumber
Index of the transaction instruction from which the inner instruction(s) originatedinstructionsarray
Ordered list of inner program instructions that were invoked during a single transaction instruction.programIdIndexnumber
Index into the message.accountKeys array indicating the program account that executes this instruction.accountsarray
List of ordered indices into the message.accountKeys array indicating which accounts to pass to the program.datastring
The program input data encoded in a base-58 string.List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transaction
accountIndexnumber
Index of the account in which the token balance is provided for.mintstring
Pubkey of the token's mint.ownerstring
Pubkey of token balance's owner.programIdstring
Pubkey of the Token program that owns the account.amountstring
Raw amount of tokens as a string, ignoring decimals.decimalsnumber
Number of decimals configured for token's mint.uiAmountnumber
DEPRECATED Token amount as a float, accounting for decimals.uiAmountStringstring
Token amount as a string, accounting for decimals.List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transaction
accountIndexnumber
Index of the account in which the token balance is provided for.mintstring
Pubkey of the token's mint.ownerstring
Pubkey of token balance's owner.programIdstring
Pubkey of the Token program that owns the account.amountstring
Raw amount of tokens as a string, ignoring decimals.decimalsnumber
Number of decimals configured for token's mint.uiAmountnumber
DEPRECATED Token amount as a float, accounting for decimals.uiAmountStringstring
Token amount as a string, accounting for decimals.logMessagesarray
array of string log messages or null if log message recording was not enabled during this transactiontransaction-level rewards
pubkeystring
The public key, as base-58 encoded string, of the account that received the rewardlamportsinteger
number of reward lamports credited or debited by the account, as a i64postBalanceinteger
account balance in lamports after the reward was appliedrewardTypestring
commissioninteger
vote account commission when the reward was credited, only present for voting and staking rewardsTransaction addresses loaded from address lookup tables. Undefined if maxSupportedTransactionVersion is not set in request params, or if jsonParsed encoding is set in request params.
writablearray
Ordered list of base-58 encoded addresses for writable loaded accountsreadonlyarray
Ordered list of base-58 encoded addresses for readonly loaded accountsthe most-recent return data generated by an instruction in the transaction, with the following fields:
programIdstring
the program that generated the return data, as base-58 encoded Pubkeydatastring
the return data itself, as base-64 encoded binary datacomputeUnitsConsumedinteger
number of compute units consumed by the transactionversiononeOf
Transaction version. Undefined if maxSupportedTransactionVersion is not set in request params.signaturesarray
present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the blockcodestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Bad Request"}
cURL
curl -X POST 'https://solana-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "getBlock","params": [378967388,{"commitment": "finalized","encoding": "json","transactionDetails": "full","maxSupportedTransactionVersion": 0,"rewards": false}]}'