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

# getTokenAccountsByDelegate

> 承認されたデリゲートによるすべてのSPLトークンアカウントを返します。

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

<ParamField body="address" type="string" required>
  トークンアカウントを管理するために承認されたデリゲートのSolanaアドレス（公開鍵）。
</ParamField>

<ParamField body="mint" type="string">
  特定のトークンタイプによるデリゲートアカウントをフィルタリングするための特定のトークンミントアドレス。
</ParamField>

<ParamField body="programId" type="string">
  デリゲートアカウントをフィルタリングするための特定のトークンプログラムID（通常はSPLトークンプログラム）。
</ParamField>

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

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

<ParamField body="minContextSlot" type="number">
  リクエストを評価できる最小スロット。
</ParamField>

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

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

<ParamField body="dataSlice.offset" type="number">
  読み始めるバイトオフセット。
</ParamField>

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

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


## OpenAPI

````yaml ja/openapi/rpc-http/getTokenAccountsByDelegate.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    委任トークン認可を問い合わせるための高度なSolana
    APIを使用して、特定の許可を第三者アドレスに与えたすべてのSPLトークンアカウントをアプリケーションが取得できるようにします。
  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: getTokenAccountsByDelegate
      description: |
        特定のSolanaアドレスに委任された権限を持つすべてのSPLトークンアカウントを取得します。
        この強力なAPIは、第三者アプリケーション、ウォレット、またはその他の委任アドレスに
        支出または管理の許可を与えたすべてのトークンアカウントを特定します。
        セキュリティの監視、委任の追跡、どのトークンアカウントを管理または支出する権限があるかを確認する必要があるアプリケーションには不可欠です。
        特定のトークンタイプや委任認可レベルでのフィルタリングをサポートし、
        簡単に統合できるように解析済みデータを提供します。
      operationId: getTokenAccountsByDelegate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: JSON-RPCプロトコルバージョン。
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意な識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTokenAccountsByDelegate
                  description: 呼び出すRPCメソッド名。
                  example: getTokenAccountsByDelegate
                  default: getTokenAccountsByDelegate
                params:
                  type: array
                  description: 委任によるトークンアカウントのクエリパラメータ。
                  default:
                    - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                    - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                    - encoding: jsonParsed
                  items:
                    oneOf:
                      - type: string
                        description: トークンアカウント管理を委任する権限を与えられたSolanaのアドレス（公開鍵）。
                        example: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                      - type: object
                        description: 特定のトークンタイプまたはプログラムに結果を絞るためのフィルター構成。
                        properties:
                          mint:
                            type: string
                            description: 特定のトークンタイプで委任されたアカウントをフィルタリングするための特定のトークンミントアドレス。
                            example: 3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                          programId:
                            type: string
                            description: >-
                              委任されたアカウントをフィルタリングするための特定のトークンプログラムID（通常はSPLトークンプログラム）。
                            example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                      - type: object
                        description: 構成オブジェクト。
                        properties:
                          commitment:
                            type: string
                            description: リクエストのコミットメントレベル。
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: リクエストを評価できる最小スロット。
                            example: 1000
                          dataSlice:
                            type: object
                            description: アカウントのデータのスライスをリクエストします。
                            properties:
                              length:
                                type: integer
                                description: 返すバイト数。
                                example: 10
                              offset:
                                type: integer
                                description: 読み取りを開始するバイトオフセット。
                                example: 0
                          encoding:
                            type: string
                            description: アカウントデータのエンコーディング形式。
                            enum:
                              - base58
                              - base64
                              - base64+zstd
                              - jsonParsed
                            example: jsonParsed
      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: object
                    description: コンテキストとアカウントの詳細。
                    properties:
                      context:
                        type: object
                        description: 応答のコンテキスト。
                        properties:
                          slot:
                            type: integer
                            description: データが取得されたスロット。
                            example: 1114
                      value:
                        type: array
                        description: トークンアカウントのリスト。
                        items:
                          type: object
                          properties:
                            pubkey:
                              type: string
                              description: アカウントの公開鍵をbase-58でエンコードした文字列。
                              example: 28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp
                            account:
                              type: object
                              description: トークンアカウントの詳細。
                              properties:
                                lamports:
                                  type: integer
                                  description: アカウントに割り当てられたラメポートの数。
                                  example: 1726080
                                owner:
                                  type: string
                                  description: このアカウントが割り当てられたプログラムの公開鍵。
                                  example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                                data:
                                  type: object
                                  description: アカウントに関連付けられたトークン状態データ。
                                  properties:
                                    program:
                                      type: string
                                      description: プログラム名。
                                      example: spl-token
                                    parsed:
                                      type: object
                                      description: 解析済みトークンデータ。
                                      properties:
                                        info:
                                          type: object
                                          description: トークンアカウント情報。
                                          properties:
                                            tokenAmount:
                                              type: object
                                              description: トークン量の詳細。
                                              properties:
                                                amount:
                                                  type: string
                                                  description: 小数点以下なしの生の残高。
                                                  example: '1'
                                                decimals:
                                                  type: integer
                                                  description: 小数の数。
                                                  example: 1
                                                uiAmount:
                                                  type: number
                                                  description: ユーザーフレンドリーな形式での残高。
                                                  example: 0.1
                                                uiAmountString:
                                                  type: string
                                                  description: 文字列としての残高。
                                                  example: '0.1'
                                            delegate:
                                              type: string
                                              description: トークンの管理または支出の委任権限を与えられたSolanaアドレス。
                                              example: >-
                                                4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                                            delegatedAmount:
                                              type: object
                                              description: 所有者に代わって代理が支出する権限があるトークンの量。
                                              properties:
                                                amount:
                                                  type: string
                                                  description: 小数点以下なしの生の残高。
                                                  example: '1'
                                                decimals:
                                                  type: integer
                                                  description: 小数の数。
                                                  example: 1
                                                uiAmount:
                                                  type: number
                                                  description: ユーザーフレンドリーな形式での残高。
                                                  example: 0.1
                                                uiAmountString:
                                                  type: string
                                                  description: 文字列としての残高。
                                                  example: '0.1'
                                        state:
                                          type: string
                                          description: トークンアカウントの状態。
                                          example: initialized
                                        isNative:
                                          type: boolean
                                          description: アカウントがネイティブSOLを保持しているかどうかを示します。
                                          example: false
                                        mint:
                                          type: string
                                          description: トークンミントの公開鍵。
                                          example: >-
                                            3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                                        owner:
                                          type: string
                                          description: アカウント所有者の公開鍵。
                                          example: >-
                                            CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD
                                    space:
                                      type: integer
                                      description: アカウントに割り当てられたスペース。
                                      example: 165
                                executable:
                                  type: boolean
                                  description: アカウントがプログラムを含んでいるかどうかを示します。
                                  example: false
                                rentEpoch:
                                  type: integer
                                  description: 次に家賃が発生するエポック。
                                  example: 4
                                space:
                                  type: integer
                                  description: アカウントのデータサイズ。
                                  example: 165
              examples:
                response:
                  value:
                    jsonrpc: '2.0'
                    id: '1'
                    result:
                      context:
                        slot: 1114
                      value:
                        - pubkey: 28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp
                          account:
                            lamports: 1726080
                            owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                            data:
                              program: spl-token
                              parsed:
                                info:
                                  tokenAmount:
                                    amount: '1'
                                    decimals: 1
                                    uiAmount: 0.1
                                    uiAmountString: '0.1'
                                  delegate: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                                  delegatedAmount:
                                    amount: '1'
                                    decimals: 1
                                    uiAmount: 0.1
                                    uiAmountString: '0.1'
                                  state: initialized
                                  isNative: false
                                  mint: 3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                                  owner: CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD
                                type: account
                              space: 165
                            executable: false
                            rentEpoch: 4
                            space: 165
        '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: エラーに関する追加データ。
        id:
          type: string
          description: リクエストに一致する識別子。
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        あなたのHelius
        APIキー。無料で[ダッシュボード](https://dashboard.helius.dev/api-keys)から取得できます。

````