> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getBlock | Solana

> See also Solana: optimize your getBlock performance. The Solana getBlock method returns complete information about a block for a given slot height.

<Note>
  **Per-method rate limit:** 400 RPS across all regions. **Archive data:** this method supports fetching historical data on [Global Nodes](/docs/global-elastic-node). See [Solana method limits](/docs/limits#solana-method-limits).
</Note>

See also [Solana: optimize your getBlock performance](/docs/solana-optimize-your-getblock-performance).

The Solana `getBlock` method returns complete information about a block for a given **slot height**.

<Note>
  **Block & slot confusion**

  You need to provide the slot number in the [getBlock](/reference/solana-getblock) method. For a detailed explanation with examples, see [Understanding the difference between blocks and slots on Solana](/docs/understanding-the-difference-between-blocks-and-slots-on-solana).
</Note>

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.

## 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.


## OpenAPI

````yaml openapi/solana_node_api/getBlock.json POST /9de47db917d4f69168e3fed02217d15b
openapi: 3.0.0
info:
  title: getBlock example
  version: 1.0.0
  description: This is an API example for Solana's getBlock.
servers:
  - url: https://nd-326-444-187.p2pify.com
security: []
paths:
  /9de47db917d4f69168e3fed02217d15b:
    post:
      tags:
        - query
      summary: getBlock
      operationId: getBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: getBlock
                params:
                  type: array
                  items:
                    oneOf:
                      - type: integer
                        description: The slot of the block
                        default: 239462061
                      - type: object
                        properties:
                          encoding:
                            type: string
                            default: jsonParsed
                          maxSupportedTransactionVersion:
                            type: integer
                            default: 0
                  default:
                    - 239462061
                    - encoding: jsonParsed
                      maxSupportedTransactionVersion: 0
      responses:
        '200':
          description: Block details
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````