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

> getCompressedTokenAccountBalance возвращает баланс одного аккаунта сжатых токенов в Solana, найденного по адресу в формате base58 или 32-байтовому хешу (ZK Compression).

## Параметры запроса

<ParamField body="address" type="string" default="111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj">
  Публичный ключ Solana в виде строки base58.
</ParamField>

<ParamField body="hash" type="string">
  32-байтовый хеш в виде строки base58.
</ParamField>


## OpenAPI

````yaml ru/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: Конечная точка 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: Идентификатор запроса.
                  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: >-
            Некорректный запрос — недопустимые параметры запроса или
            неправильный формат запроса.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Не авторизовано — недействительный или отсутствующий ключ API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Слишком много запросов — превышен лимит запросов.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Внутренняя ошибка сервера — на сервере произошла ошибка.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Сервис недоступен — сервис временно недоступен.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Истекло время ожидания шлюза — время ожидания запроса истекло.
          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: >-
        Ваш ключ API Helius. Его можно бесплатно получить в [панели
        управления](https://dashboard.helius.dev/api-keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.