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

# getBlocksWithLimit

> 指定したスロットから始まる確認済みブロックのリストを返します。

## リクエストパラメータ

<ParamField body="start_slot" type="number">
  シーケンシャルなブロックリストの取得を開始するSolanaスロット番号。
</ParamField>

<ParamField body="limit" type="number">
  返すシーケンシャルブロックの最大数（リクエストごとに最大500,000ブロックまで）。
</ParamField>

<ParamField body="commitment" type="string">
  ブロックをクエリするための確定レベル - 確認済み（楽観的確認）または確定済み（完全確認）。

  * `confirmed`
  * `finalized`
</ParamField>


## OpenAPI

````yaml ja/openapi/rpc-http/getBlocksWithLimit.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    指定された範囲内で連続したSolanaブロックスロットを取得するためのブロックチェーン履歴APIで、データ量とクエリパフォーマンスを最適化するためのカスタマイズ可能な制限コントロールが含まれます。
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: メインネットRPCエンドポイント
  - url: https://devnet.helius-rpc.com
    description: デブネットRPCエンドポイント
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBlocksWithLimit
      description: >-
        特定のスロットから開始するSolanaブロックの連続したシーケンスを、カスタマイズ可能な制限を指定して取得します。このブロックチェーン履歴APIは、リクエストされた範囲内で確認済みのブロックスロット番号の配列を返し、歴史的なブロックを効率的にページングすることを可能にします。制御された制限パラメータは、大規模なブロックチェーンセクションをスキャンする際の応答サイズとパフォーマンスを管理するために役立ちます。ブロックチェーンエクスプローラー、歴史データ分析ツール、トランザクション履歴をスキャンする監査システム、インデックスサービス、データ分析プラットフォーム、および連続したブロックを効率的に処理する必要があるアプリケーションにとって不可欠です。リクエストごとに500,000ブロックまで取得することができます。
      operationId: getBlocksWithLimit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPCプロトコルのバージョン。
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意な識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 呼び出すRPCメソッドの名前。
                  enum:
                    - getBlocksWithLimit
                  example: getBlocksWithLimit
                  default: getBlocksWithLimit
                params:
                  type: array
                  description: メソッドのリクエストパラメータ。
                  default:
                    - 5
                    - 3
                  items:
                    type: object
                    properties:
                      start_slot:
                        type: integer
                        description: 連続したブロックリストの取得を開始するSolanaスロット番号。
                        example: 5
                      limit:
                        type: integer
                        description: 返す連続ブロックの最大数（リクエストごとに500,000ブロックまで）。
                        example: 3
                      commitment:
                        type: string
                        description: 確認レベル - 確認済み（楽観的確認）または最終化済み（完全確認）。
                        enum:
                          - confirmed
                          - finalized
                        example: finalized
      responses:
        '200':
          description: 確認済みブロックを正常に取得しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPCプロトコルのバージョン。
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: リクエストと一致する識別子。
                    example: '1'
                  result:
                    type: array
                    description: 要求されたスロットから開始する、昇順の連続したSolanaブロックスロット番号のリスト。
                    items:
                      type: integer
                    example:
                      - 5
                      - 6
                      - 7
        '400':
          description: 不正なリクエスト - 無効なリクエストパラメータまたは不正なリクエスト。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 無効なパラメータ
                id: '1'
        '401':
          description: 未承認 - 無効または欠落しているAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 未承認
                id: '1'
        '429':
          description: リクエストが多すぎる - レート制限を超えました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: リクエストが多すぎます
                id: '1'
        '500':
          description: 内部サーバーエラー - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 内部エラー
                id: '1'
        '503':
          description: サービス利用不可 - サービスが一時的に利用できません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: サービス利用不可
                id: '1'
        '504':
          description: ゲートウェイタイムアウト - リクエストがタイムアウトしました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: ゲートウェイタイムアウト
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPCプロトコルのバージョン。
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: エラーコード。
              example: -32602
            message:
              type: string
              description: エラーメッセージ。
            data:
              type: object
              description: エラーに関する追加データ。
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        あなたのHelius
        APIキー。無料で[dashoard](https://dashboard.helius.dev/api-keys)で取得できます。

````