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

# getBlock

> 台帳内の確認されたブロックに関する識別およびトランザクション情報を返します。

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

<ParamField body="slot" type="number" required>
  スロット番号は整数として指定します。
</ParamField>

<ParamField body="commitment" type="string" default="finalized">
  リクエストのコミットメントレベル。

  * `finalized`
</ParamField>

<ParamField body="encoding" type="string" default="json">
  返される各トランザクションのエンコーディング形式。

  * `json`
  * `jsonParsed`
  * `base58`
  * `base64`
</ParamField>

<ParamField body="transactionDetails" type="string" default="full">
  返すトランザクションの詳細レベル。アカウントが要求された場合、トランザクションの詳細には各トランザクション内の署名と注釈付きアカウントリストのみが含まれます。トランザクションメタデータに含まれるのは、fee、err、pre\_balances、post\_balances、pre\_token\_balances、およびpost\_token\_balancesのみです。

  * `full`
  * `accounts`
  * `signatures`
  * `none`
</ParamField>

<ParamField body="maxSupportedTransactionVersion" type="number">
  応答で返される最大トランザクションバージョン。要求されたブロックがより高いバージョンのトランザクションを含む場合、エラーが返されます。省略された場合、レガシートランザクションのみが返されます。
</ParamField>

<ParamField body="rewards" type="boolean" default="true">
  報酬配列を埋めるかどうか。
</ParamField>


## OpenAPI

````yaml ja/openapi/rpc-http/getBlock.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: Devnet RPCエンドポイント
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBlock
      description: >
        指定されたスロット番号の詳細なSolanaブロック情報を取得。トランザクション、署名、アカウント変更、報酬、タイミング情報を含む完全なブロックデータにアクセス。トランザクションの詳細レベルとエンコーディング形式を設定して特定のアプリケーションのニーズに最適化。
      operationId: getBlock
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: JSON-RPCプロトコルバージョン。
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意の識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getBlock
                  description: 呼び出すRPCメソッド名。
                  default: getBlock
                params:
                  type: array
                  description: リクエストのパラメータ。
                  default:
                    - 430
                  items:
                    oneOf:
                      - type: integer
                        description: スロット番号を`u64`整数として。
                        example: 430
                      - type: object
                        description: リクエストの追加設定オプション。
                        properties:
                          commitment:
                            type: string
                            description: リクエストのコミットメントレベル。
                            enum:
                              - finalized
                            default: finalized
                          encoding:
                            type: string
                            description: 返される各トランザクションのエンコーディング形式。
                            enum:
                              - json
                              - jsonParsed
                              - base58
                              - base64
                            default: json
                          transactionDetails:
                            type: string
                            description: >-
                              返されるトランザクションの詳細レベル。アカウントが要求された場合、トランザクションの詳細には各トランザクションの署名と注釈付きアカウントリストのみが含まれます。トランザクションメタデータには、手数料、エラー、事前バランス、事後バランス、事前トークンバランス、事後トークンバランスのみが含まれます。
                            enum:
                              - full
                              - accounts
                              - signatures
                              - none
                            default: full
                          maxSupportedTransactionVersion:
                            type: integer
                            description: >-
                              レスポンスで返される最大トランザクションバージョン。要求されたブロックに高いバージョンのトランザクションが含まれている場合、エラーが返されます。省略された場合、レガシートランザクションのみが返されます。
                          rewards:
                            type: boolean
                            description: 報酬配列を埋めるかどうか。
                            default: true
      responses:
        '200':
          description: ブロックの詳細を正常に取得しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: object
                    properties:
                      blockhash:
                        type: string
                        description: このブロックのブロックハッシュ（base-58エンコード文字列）。
                        example: DUCT8VSgk2BXkMhQfxKVYfikEZCQf4dZ4ioPdGdaVxMN
                      previousBlockhash:
                        type: string
                        description: ブロックの親のブロックハッシュ。
                        example: HA2fJgGqmQezCXJRVNZAWPbRMXCPjUyo7VjRF47JGdYs
                      parentSlot:
                        type: integer
                        description: このブロックの親のスロットインデックス。
                        example: 429
                      transactions:
                        type: array
                        description: トランザクションの詳細の配列。
                        items:
                          type: object
                          properties:
                            meta:
                              type: object
                              nullable: true
                              description: トランザクションに関連するメタデータ。
                            transaction:
                              type: object
                              description: トランザクションの詳細。
                              properties:
                                message:
                                  type: object
                                  properties:
                                    accountKeys:
                                      type: array
                                      description: このトランザクションで使用されるアカウント公開鍵の配列。
                                      items:
                                        type: string
                                    header:
                                      type: object
                                      properties:
                                        numReadonlySignedAccounts:
                                          type: integer
                                          description: 読み取り専用の署名付きアカウントの数。
                                        numReadonlyUnsignedAccounts:
                                          type: integer
                                          description: 読み取り専用の未署名アカウントの数。
                                        numRequiredSignatures:
                                          type: integer
                                          description: 必要な署名数。
                                    instructions:
                                      type: array
                                      description: プログラム命令の配列。
                                      items:
                                        type: object
                                        properties:
                                          accounts:
                                            type: array
                                            description: アカウントインデックスの配列。
                                            items:
                                              type: integer
                                          data:
                                            type: string
                                            description: base58でエンコードされたプログラム入力データ。
                                          programIdIndex:
                                            type: integer
                                            description: accountKeys配列内のプログラムIDのインデックス。
                                          stackHeight:
                                            type: integer
                                            nullable: true
                                            description: スタック高さ。
                                    recentBlockhash:
                                      type: string
                                      description: このトランザクションで使用される最近のブロックハッシュ。
                                signatures:
                                  type: array
                                  description: このトランザクションの署名の配列（base-58エンコード）。
                                  items:
                                    type: string
                      blockTime:
                        type: integer
                        nullable: true
                        description: Unixタイムスタンプとしての推定生成時間。
                        example: null
                      blockHeight:
                        type: integer
                        nullable: true
                        description: このブロックの下のブロック数。
                        example: null
                      rewards:
                        type: array
                        description: ブロックの報酬。
                        items:
                          type: object
                          properties:
                            pubkey:
                              type: string
                              description: 報酬を受け取ったアカウントの公開鍵。
                            lamports:
                              type: integer
                              description: 貸し借りされた報酬ラメポートの数。
                            rewardType:
                              type: string
                              nullable: true
                              description: 報酬の種類（例：「fee」、「rent」）。
        '400':
          description: Bad Request - 無効なリクエストパラメータまたは不正なリクエスト。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 無効なパラメータ
                id: '1'
        '401':
          description: Unauthorized - 無効または欠落しているAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 認証されていません
                id: '1'
        '429':
          description: Too Many Requests - レート制限を超過しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: リクエストが多すぎます
                id: '1'
        '500':
          description: Internal Server Error - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 内部エラー
                id: '1'
        '503':
          description: Service Unavailable - サービスは一時的に利用できません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: サービス利用不可
                id: '1'
        '504':
          description: Gateway Timeout - リクエストがタイムアウトしました。
          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
          enum:
            - '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Helius
        APIキー。無料で[ダッシュボード](https://dashboard.helius.dev/api-keys)から取得できます。

````