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

# GetBlocks

## getBlocks RPC Method

Returns a list of confirmed blocks between two slots.

<div className="grid grid-cols-2 gap-1 mt-2">
  <div className="col-span-1">
    #### Parameters

    `u64` **required**\
    Start slot, as `u64` integer

    `u64` **optional**\
    End slot, as `u64` integer

    * Must be no more than 500,000 blocks higher than the `start_slot`

    `object` **optional**\
    Configuration object containing the following fields:

    **commitment** `string` **optional**\
    Default: `finalized`

    * "processed" is not supported
  </div>

  <div className="col-span-1">
    #### Code Sample

    ```bash theme={"system"}
    curl https://rpc.testnet.soo.network/rpc \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getBlocks",
      "params": [
        369000,
        369624,
        {
          "commitment": "finalized"
        }
      ]
    }'
    ```

    #### Response

    ```json theme={"system"}
    {
      "jsonrpc": "2.0",
      "result": [369000, 369100, 369200, 369300, 369400, 369624],
      "id": 1
    }
    ```
  </div>
</div>

#### Result Details

The result field will be:

* An array of `u64` integers listing confirmed blocks
* Includes blocks between `start_slot` and `end_slot` (or latest confirmed block if `end_slot` is not provided)
* Inclusive range
* Maximum allowed range is 500,000 slots
