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

# getBlocksWithLimit | Solana

> The Solana getBlocksWithLimit method returns a list of confirmed blocks starting from a specified slot for a maximum limit. On Solana.

> [!NOTE]
>
> **Range limit:** maximum 500,000 blocks per request. **Archive data:** this method supports fetching historical data on [Global Nodes](https://docs.chainstack.com/docs/global-elastic-node.md). See [Solana method limits](https://docs.chainstack.com/docs/limits.md#solana-method-limits).

# Solana `getBlocksWithLimit` method

The Solana `getBlocksWithLimit` method returns a list of confirmed blocks starting from a specified slot for a maximum limit.

This method provides a list of block heights that have been confirmed by the network. It is useful for retrieving a specific number of blocks for analysis or display.

## Parameters

* `startSlot` — the start slot of the range.
* `limit` — the maximum number of blocks to return.

## Response

* `value` — an array of confirmed block heights starting from the `startSlot` up to the specified `limit`.

## Use case

A practical use case for `getBlocksWithLimit` is to retrieve a specific number of confirmed blocks for analysis or display. This can be useful for block explorers, wallets, or other applications that need to display or make use of this information.


## OpenAPI

````yaml openapi/solana_node_api/getBlocksWithLimit.json POST /mt_c524ad9781ae5dccd9ac6f5b0370e
openapi: 3.0.0
info:
  title: getBlocksWithLimit example
  version: 1.0.0
  description: This is an API example for Solana's getBlocksWithLimit.
servers:
  - url: https://solana-mainnet.core.chainstack.com
security: []
paths:
  /mt_c524ad9781ae5dccd9ac6f5b0370e:
    post:
      tags:
        - query
      summary: getBlocksWithLimit
      operationId: getBlocksWithLimit
      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: getBlocksWithLimit
                params:
                  type: array
                  items:
                    type: integer
                    description: >-
                      The start slot of the blocks and the maximum number of
                      blocks
                    default: 166974442
                  default:
                    - 166974442
                    - 100
      responses:
        '200':
          description: Blocks details
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: integer

````