getBlock
Solana node API
getBlock | Solana
See also Solana: optimize your getBlock performance. The Solana getBlock method returns complete information about a block for a given slot height.
POST
getBlock
Per-method rate limit: 400 RPS across all regions. Archive data: this method supports fetching historical data on Global Nodes. See Solana method limits.
getBlock method returns complete information about a block for a given slot height.
Block & slot confusionYou need to provide the slot number in the getBlock method. For a detailed explanation with examples, see Understanding the difference between blocks and slots on Solana.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
slot(u64, required) — the slot number to retrieve the block for.config(object, optional) — configuration object containing:commitment(string) —confirmedorfinalized. Note:processedis not supported by this method.encoding(string) — encoding for transaction data. Values:json— parsed JSON with transaction message and meta (default).jsonParsed— attempts to decode known program instructions into human-readable JSON. Falls back to standard JSON for unrecognized programs.base64— raw transaction bytes as base64.base58— raw transaction bytes as base58 (slow).
transactionDetails(string) — level of transaction detail:full— returns complete transaction objects (default).accounts— returns only account keys withsigner,writable, andsourceannotations plus a restrictedmeta(onlyfee,err,preBalances,postBalances,preTokenBalances,postTokenBalances,rewards).signatures— returns only thesignaturesarray (notransactionsfield). Lightest option.none— omits bothtransactionsandsignatures.
maxSupportedTransactionVersion(integer) — set to0to include versioned (v0) transactions in the response. Omitting this field causes an error if the block contains any v0 transactions.rewards(boolean) — include block rewards. Default:true.
Response
blockHeight(u64, nullable) — the actual block number produced in this slot.blockTime(i64, nullable) — estimated Unix timestamp of the block, as agreed upon by cluster validators.blockhash(string) — the hash of this block.parentSlot(u64) — the slot of the block’s parent.previousBlockhash(string) — the hash of the parent block.transactions— an array of transaction objects (whentransactionDetailsisfulloraccounts). Each object contains:transaction— the transaction data in the requested encoding.meta— transaction metadata including:err— error if the transaction failed, null on success.fee(u64) — fee charged for the transaction.preBalances/postBalances— arrays of lamport balances before and after.preTokenBalances/postTokenBalances— token balance changes.logMessages— array of log strings produced by the transaction.innerInstructions— inner instructions invoked via CPI.loadedAddresses— addresses loaded from address lookup tables (writableandreadonlyarrays).computeUnitsConsumed(u64) — compute units used.returnData— data returned viasol_set_return_data, if any.
version—"legacy"or0for versioned transactions.
signatures— an array of signature strings (only present whentransactionDetailsissignatures).rewards— an array of reward objects, each containing:pubkey,lamports,postBalance,rewardType(fee,rent,voting,staking), andcommission(for voting/staking rewards).
Use case
A practical use case forgetBlock is to retrieve detailed information about a specific block for block explorers, analytics pipelines, or indexing services. Use transactionDetails: "signatures" for lightweight block scanning, and jsonParsed encoding for human-readable instruction decoding without manual deserialization.Last modified on May 18, 2026