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

# getAccountInfo

> 指定されたPubkeyのアカウントに関連するすべての情報を返します。

<Info>
  **新機能**: `getAccountInfo` は、インクリメンタルアップデート用のパラメータ `changedSinceSlot` をサポートするようになりました。指定された場合、このメソッドは指定されたスロット番号以降に変更されたアカウントのみを返します。指定されたスロット以降に変更がないアカウントの場合、レスポンスには `status: "unchanged"` が含まれることになります。
</Info>

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

<ParamField body="pubkey" type="string" required>
  クエリ対象のアカウントのPubkey、base-58エンコードされた文字列として。
</ParamField>

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

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

<ParamField body="encoding" type="string">
  アカウントデータのエンコード形式。

  * `base58`
  * `base64`
  * `base64+zstd`
  * `jsonParsed`
</ParamField>

<ParamField body="dataSlice" type="object">
  アカウントデータのスライスをリクエストします。
</ParamField>

<ParamField body="dataSlice.offset" type="number">
  読み取り開始位置のバイトオフセット。
</ParamField>

<ParamField body="dataSlice.length" type="number">
  返すバイト数。
</ParamField>

<ParamField body="minContextSlot" type="number">
  リクエストが評価される最小スロット。
</ParamField>

<ParamField body="changedSinceSlot" type="number">
  このスロット番号以降に変更があった場合にのみアカウントを返します。アカウントが存在するが指定されたスロット以降に変更がない場合、レスポンスには「unchanged」としてステータスが含まれます。
</ParamField>


## OpenAPI

````yaml ja/openapi/rpc-http/getAccountInfo.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: getAccountInfo
      operationId: getAccountInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPCプロトコルバージョン。
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意の識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 呼び出すRPCメソッドの名前。
                  enum:
                    - getAccountInfo
                  default: getAccountInfo
                params:
                  type: array
                  default:
                    - 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                  items:
                    oneOf:
                      - title: Pubkey
                        type: string
                        description: クエリするアカウントのPubkeyをbase-58でエンコードした文字列。
                        example: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                      - title: Configuration Object
                        type: object
                        description: 設定オブジェクト。
                        properties:
                          commitment:
                            type: string
                            description: クエリのコミットメントレベル。
                            enum:
                              - finalized
                              - confirmed
                              - processed
                            example: confirmed
                          encoding:
                            type: string
                            description: アカウントデータのエンコーディング形式。
                            enum:
                              - base58
                              - base64
                              - base64+zstd
                              - jsonParsed
                            example: base58
                          dataSlice:
                            type: object
                            description: アカウントのデータの一部をリクエストします。
                            properties:
                              offset:
                                type: integer
                                description: 読み取りを開始するバイトオフセット。
                                example: 0
                              length:
                                type: integer
                                description: 返されるバイト数。
                                example: 64
                          minContextSlot:
                            type: integer
                            description: リクエストが評価できる最小スロット。
                            example: 100000000
                          changedSinceSlot:
                            type: integer
                            description: >-
                              このスロット番号以降に変更された場合のみアカウントを返します。アカウントが存在するが指定されたスロット以降変更がない場合、応答にはステータスが「変更なし」として含まれます。
                            example: 464175999
      responses:
        '200':
          description: アカウント情報の取得に成功しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPCプロトコルバージョン。
                    example: '2.0'
                  result:
                    type: object
                    properties:
                      context:
                        type: object
                        description: リクエストのコンテキスト。
                        properties:
                          apiVersion:
                            type: string
                            description: リクエストのAPIバージョン。
                            example: 2.0.15
                          slot:
                            type: integer
                            description: 応答のスロット番号。
                            example: 341197053
                      value:
                        oneOf:
                          - type: object
                            description: アカウントが存在する場合のデータ。
                            properties:
                              lamports:
                                type: integer
                                description: このアカウントに割り当てられたランポートの数。
                                example: 88849814690250
                              owner:
                                type: string
                                description: このアカウントが割り当てられているプログラムのbase-58エンコードされたPubkey。
                                example: '11111111111111111111111111111111'
                              data:
                                type: array
                                items:
                                  type: string
                                description: アカウントに関連付けられたデータ、エンコードされたバイナリデータまたはJSON形式。
                                example:
                                  - ''
                                  - base58
                              executable:
                                type: boolean
                                description: アカウントにプログラムが含まれているかどうかを示します。
                                example: false
                              rentEpoch:
                                type: integer
                                description: このアカウントが次にレンタルを支払うエポック。
                                example: 18446744073709552000
                              space:
                                type: integer
                                description: アカウントのデータサイズ。
                                example: 0
                          - type: object
                            description: アカウントが存在するが指定されたスロット以降変更がない場合のステータスのみの応答。
                            properties:
                              status:
                                type: string
                                description: 指定されたスロット以降にアカウントが変更されていないことを示すステータス。
                                enum:
                                  - unchanged
                                example: unchanged
                  id:
                    type: integer
                    description: リクエストIDに一致する一意の識別子。
                    example: 1
                  method:
                    type: string
                    description: 呼び出されているメソッド。
                    example: getAccountInfo
                  params:
                    type: array
                    description: リクエストのパラメータ。
                    items:
                      oneOf:
                        - type: string
                        - type: object
                          properties:
                            encoding:
                              type: string
              examples:
                response:
                  value:
                    jsonrpc: '2.0'
                    result:
                      context:
                        apiVersion: 2.0.15
                        slot: 341197053
                      value:
                        lamports: 88849814690250
                        owner: '11111111111111111111111111111111'
                        data:
                          - ''
                          - base58
                        executable: false
                        rentEpoch: 18446744073709552000
                        space: 0
                    id: 1
        '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'
          default: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: エラーコード。
            message:
              type: string
              description: エラーメッセージ。
        id:
          type: string
          description: リクエストの一意の識別子。
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        あなたのHelius
        APIキーです。[ダッシュボード](https://dashboard.helius.dev/api-keys)で無料で取得できます。

````