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

# getCompressedBalance

> 指定されたアドレスまたはハッシュを持つ圧縮アカウントの残高を返します。

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

<ParamField body="address" type="string" default="11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP">
  base58文字列で表されたSolana公開鍵。
</ParamField>

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


## OpenAPI

````yaml ja/openapi/zk-compression/getCompressedBalance.yaml POST /
openapi: 3.0.3
info:
  title: photon-indexer
  description: 一般的な圧縮のためのSolanaインデクサー
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Mainnet RPCエンドポイント
  - url: https://devnet.helius-rpc.com
    description: Devnet RPCエンドポイント
security: []
paths:
  /:
    post:
      description: 圧縮されたアカウント残高を取得
      operationId: getCompressedBalance
      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。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 呼び出すメソッドの名前。
                  enum:
                    - getCompressedBalance
                  default: getCompressedBalance
                params:
                  type: object
                  description: 圧縮されたアカウントデータのリクエスト
                  default:
                    address: null
                    hash: '11111111111111111111111111111111'
                  properties:
                    address:
                      type: string
                      allOf:
                        - $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                    hash:
                      type: string
                      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/UnsignedInteger'
                additionalProperties: false
        '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:
    SerializablePubkey:
      type: string
      description: base58文字列で表現されるSolanaの公開鍵。
      default: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Hash:
      type: string
      description: base58文字列で表現される32バイトのハッシュ。
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
    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キーです。[dashboard](https://dashboard.helius.dev/api-keys)で無料で取得できます。

````