Skip to main content
POST
/
9de47db917d4f69168e3fed02217d15b
getBlock
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": {}
}
Per-method rate limit: 400 RPS across all regions. Archive data: this method supports fetching historical data on Global Nodes. See Solana method limits.
See also Solana: optimize your getBlock performance. The Solana 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.
This method provides detailed information about the block, including its parent block, transactions, and the state of the ledger after processing the block. It is useful for retrieving the state of the blockchain at a specific block height.
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

  1. slot (u64, required) — the slot number to retrieve the block for.
  2. config (object, optional) — configuration object containing:
    • commitment (string) — confirmed or finalized. Note: processed is 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 with signer, writable, and source annotations plus a restricted meta (only fee, err, preBalances, postBalances, preTokenBalances, postTokenBalances, rewards).
      • signatures — returns only the signatures array (no transactions field). Lightest option.
      • none — omits both transactions and signatures.
    • maxSupportedTransactionVersion (integer) — set to 0 to 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 (when transactionDetails is full or accounts). 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 (writable and readonly arrays).
      • computeUnitsConsumed (u64) — compute units used.
      • returnData — data returned via sol_set_return_data, if any.
    • version"legacy" or 0 for versioned transactions.
  • signatures — an array of signature strings (only present when transactionDetails is signatures).
  • rewards — an array of reward objects, each containing: pubkey, lamports, postBalance, rewardType (fee, rent, voting, staking), and commission (for voting/staking rewards).

Use case

A practical use case for getBlock 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.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:getBlock
params
(integer | object)[]

The slot of the block

Response

200 - application/json

Block details

jsonrpc
string
id
integer
result
object
Last modified on April 17, 2026