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

# getCompressedTokenAccountBalance

> 指定されたトークンアカウントの残高を返します。

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

<ParamField body="address" type="string" default="111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj">
  base58文字列として表されるSolanaの公開鍵。
</ParamField>

<ParamField body="hash" type="string">
  base58文字列として表される32バイトのハッシュ。
</ParamField>


## OpenAPI

````yaml ja/openapi/zk-compression/getCompressedTokenAccountBalance.yaml POST /
openapi: 3.0.3
info:
  title: photon-indexer
  description: 一般圧縮用のSolanaインデクサー
  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: Devnet RPCエンドポイント
security: []
paths:
  /:
    summary: getCompressedTokenAccountBalance
    post:
      description: getCompressedTokenAccountBalance情報を取得します
      operationId: getCompressedTokenAccountBalance
      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:
                    - getCompressedTokenAccountBalance
                  default: getCompressedTokenAccountBalance
                params:
                  type: object
                  description: 圧縮されたアカウントデータのリクエスト
                  default:
                    address: null
                    hash: '11111111111111111111111111111111'
                  properties:
                    address:
                      allOf:
                        - $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                    hash:
                      allOf:
                        - $ref: '#/components/schemas/Hash'
                      nullable: true
                  additionalProperties: false
                  example:
                    address: null
                    hash: '11111111111111111111111111111111'
        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/TokenAccountBalance'
                additionalProperties: false
        '400':
          description: Bad Request - 無効なリクエストパラメータまたは不正なリクエスト。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Unauthorized - 無効または欠落しているAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - レート制限を超えました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - サービスは一時的に利用できません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - リクエストがタイムアウトしました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    SerializablePubkey:
      type: string
      description: Solanaの公開鍵をbase58文字列として表現。
      default: 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj
      example: 111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj
    Hash:
      type: string
      description: 32バイトのハッシュをbase58文字列として表現。
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
    TokenAccountBalance:
      type: object
      required:
        - amount
      properties:
        amount:
          $ref: '#/components/schemas/UnsignedInteger'
      additionalProperties: false
    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'
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        あなたのHelius
        APIキー。無料で[ダッシュボード](https://dashboard.helius.dev/api-keys)で取得できます。

````