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

# getCompressedTokenAccountsByOwner

> 特定のアカウントが所有する圧縮トークンアカウントを返します。

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

<ParamField body="cursor" type="string" default="3J98t1WpEZ73CNm">
  大量の保有を持つSolanaウォレット内の圧縮トークンアカウントの次のセットを取得するためのページネーションカーソル
</ParamField>

<ParamField body="limit" type="number">
  リクエストごとに返す圧縮トークンアカウントの最大数（ページネーション用）
</ParamField>

<ParamField body="mint" type="string" default="11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9">
  特定のSolanaトークンのミントアドレスで圧縮トークンアカウントをフィルタリング
</ParamField>

<ParamField body="owner" type="string" required default="11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9">
  アカウントとウォレットアドレスのためのbase58文字列で表されたSolanaパブリックキー。
</ParamField>


## OpenAPI

````yaml ja/openapi/zk-compression/getCompressedTokenAccountsByOwner.yaml POST /
openapi: 3.0.3
info:
  title: Solana Compressed Token Portfolio API
  description: >
    効率的でコスト効果の高いトークンの保存と取得のために、状態圧縮技術を使用した圧縮トークンアカウント用の高度なSolanaインデクサーです。

    このAPIは、Solana圧縮トークンとNFTへの最適化されたアクセスを提供し、

    Solanaトークンエコシステムとの完全なセキュリティと互換性を維持しながら、最大1000倍のコスト削減を実現します。ウォレットアプリケーション、市場、およびトークンベースのdAppに最適です。

    圧縮資産の効率的なポートフォリオ管理が必要です。
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: メインネットRPCエンドポイント
  - url: https://devnet.helius-rpc.com
    description: デブネットRPCエンドポイント
security: []
paths:
  /:
    summary: getCompressedTokenAccountsByOwner
    post:
      description: |
        特定のSolanaウォレットアドレスによって所有されるすべての圧縮トークンアカウントを取得します。
        このポートフォリオエンドポイントは、Solanaの状態圧縮技術を使用した大幅なコスト削減で、
        完全な圧縮SPLトークンとNFTの保持データを提供します。ミントアドレスで結果をフィルタリングし、
        大規模なコレクションを効率的にページネーションし、完全な所有権検証を伴う詳細なアカウントデータにアクセスできます。

        主な利点:
        - トークンアカウントのためのオンチェーンストレージコストの削減（最大1000倍の節約）
        - 効率的なページネーションを備えた大規模ウォレット統合のサポート
        - SolanaのSPLトークン標準および圧縮NFTとの互換性
        - ターゲットトークンのクエリを行うためのミント特定のフィルタリング
        - 残高、デリゲート、状態を含む完全なトークンアカウントデータ
      operationId: getCompressedTokenAccountsByOwner
      requestBody:
        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: リクエストを識別するためのID。
                  default: '1'
                method:
                  type: string
                  description: 呼び出すメソッドの名前。
                  enum:
                    - getCompressedTokenAccountsByOwner
                  default: getCompressedTokenAccountsByOwner
                params:
                  type: object
                  required:
                    - owner
                  properties:
                    cursor:
                      allOf:
                        - $ref: '#/components/schemas/Base58String'
                      nullable: true
                      description: >-
                        Solanaウォレット内の大規模保有量を持つ圧縮トークンアカウントの次のセットを取得するためのページネーションクロス
                    limit:
                      allOf:
                        - $ref: '#/components/schemas/Limit'
                      nullable: true
                      description: 1回のリクエストあたりに返す圧縮トークンアカウントの最大数（ページネーション用）
                    mint:
                      allOf:
                        - $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                      description: 特定のSolanaトークンミントアドレスで圧縮トークンアカウントをフィルタリング
                    owner:
                      $ref: '#/components/schemas/SerializablePubkey'
                      description: 取得する圧縮トークンアカウントを所有するSolanaウォレットアドレス
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: 指定されたウォレットオーナーのためにSolanaブロックチェーンから圧縮トークンアカウントを正常に取得しました
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/TokenAccountList'
                additionalProperties: false
        '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:
    Base58String:
      type: string
      description: Solanaアドレスおよび識別子に使用されるBase58エンコードされた文字列。
      default: 3J98t1WpEZ73CNm
      example: 3J98t1WpEZ73CNm
    Limit:
      type: integer
      format: int64
      minimum: 0
      description: 1回のリクエストで返す圧縮トークンアカウントの最大数
    SerializablePubkey:
      type: string
      description: アカウントおよびウォレットアドレス用のBase58文字列として表されるSolana公開鍵。
      default: 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9
      example: 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: この応答の現在のSolanaブロックチェーンスロット
    TokenAccountList:
      type: object
      required:
        - items
      properties:
        cursor:
          $ref: '#/components/schemas/Base58String'
          description: 後続のリクエストで圧縮トークンアカウントの次のセットを取得するためのページネーションクロス
        items:
          type: array
          items:
            $ref: '#/components/schemas/TokenAcccount'
          description: 指定されたSolanaウォレットアドレスによって所有されている圧縮トークンアカウントの配列
    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'
    TokenAcccount:
      type: object
      required:
        - account
        - tokenData
      properties:
        account:
          $ref: '#/components/schemas/Account'
          description: ツリーポジションと検証データを含むSolanaのトークンアカウントの圧縮アカウント情報
        tokenData:
          $ref: '#/components/schemas/TokenData'
          description: 残高、ミント、所有者、委任状況を含む特定のトークン関連データ
      additionalProperties: false
    Account:
      type: object
      required:
        - hash
        - owner
        - lamports
        - tree
        - leafIndex
        - seq
        - slotCreated
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Solana上の圧縮アカウントの一意のアドレス
        data:
          $ref: '#/components/schemas/AccountData'
          description: Solanaに圧縮形式で保存されたアカウントデータ
        hash:
          $ref: '#/components/schemas/Hash'
          description: 検証のための圧縮アカウントデータの暗号ハッシュ
        lamports:
          $ref: '#/components/schemas/UnsignedInteger'
          description: 圧縮アカウントに関連付けられたラクリポートの残高
        leafIndex:
          $ref: '#/components/schemas/UnsignedInteger'
          description: 圧縮アカウントが保存されているマークルツリーのインデックス位置
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮アカウントを所有するSolanaプログラム
        seq:
          $ref: '#/components/schemas/UnsignedInteger'
          description: 圧縮アカウントの更新を追跡するためのシーケンス番号
        slotCreated:
          $ref: '#/components/schemas/UnsignedInteger'
          description: 圧縮アカウントが作成されたSolanaブロックチェーンスロット
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮アカウントを含むマークルツリーのアドレス
      additionalProperties: false
    TokenData:
      type: object
      required:
        - mint
        - owner
        - amount
        - state
      properties:
        amount:
          $ref: '#/components/schemas/UnsignedInteger'
          description: この圧縮トークンアカウントに保持されているトークン残高
        delegate:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮トークンアカウントでの操作を行う権限のあるオプションのデリゲートアドレス
        mint:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮トークンアカウントが属するSolana SPLトークンミントアドレス
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
          description: この圧縮トークンアカウントを所有するSolanaウォレットアドレス
        state:
          $ref: '#/components/schemas/AccountState'
          description: 圧縮トークンアカウントの現在の状態（initializedまたはfrozen）
        tlv:
          $ref: '#/components/schemas/Base64String'
          description: 拡張トークンアカウント情報のためのオプションの型長値エンコードデータ
    AccountData:
      type: object
      required:
        - discriminator
        - data
        - dataHash
      properties:
        data:
          $ref: '#/components/schemas/Base64String'
          description: 圧縮SolanaアカウントのBase64エンコードされたデータ
        dataHash:
          $ref: '#/components/schemas/Hash'
          description: 整合性検証のための圧縮アカウントデータのハッシュ
        discriminator:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Solanaプログラムでのアカウントタイプの識別子
      additionalProperties: false
    Hash:
      type: string
      description: Solanaデータ検証のためのBase58文字列として表される32バイトの暗号ハッシュ。
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
      description: トークン量、シーケンス番号、その他の数値に使用される非負の整数値
    AccountState:
      type: string
      enum:
        - initialized
        - frozen
      description: 圧縮トークンアカウントの現在の状態（initializedまたはfrozen）
    Base64String:
      type: string
      description: 圧縮Solanaアカウント内のバイナリデータを保存するためのBase64エンコードされた文字列。
      default: SGVsbG8sIFdvcmxkIQ==
      example: SGVsbG8sIFdvcmxkIQ==
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Helius
        APIキーです。[ダッシュボード](https://dashboard.helius.dev/api-keys)で無料で取得できます。

````