> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询账户余额

> 查询账户中各币种的余额。

## 概述

本页说明 `POST /payment/open/institution/v1/balance` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 这是机构子账户余额查询接口。
* 请求体使用 JSON 数组传入需要查询的币种列表，例如 `["USDT", "BTC"]`。
* 当前正确接口路径为旧文档确认可用路径，不使用 `/payment/open/institution/v1/pay/balance/query`。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。

## 机构说明

* 机构侧请求需携带 `X-GatePay-On-Behalf-Of`，用于指定要操作的机构子账户。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution/common-openapi.json GET /payment/open/institution/v1/pay/balance/query
openapi: 3.1.0
info:
  title: GatePay 通用 API
  description: GatePay 通用 API 接口文档，包含账户余额查询和交易手续费查询。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/balance/query:
    get:
      summary: 查询余额
      description: 查询账户中各币种的余额。
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceQueryResponse'
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      balance_list:
                        - currency: DOGE
                          available: '1843.32095'
                        - currency: FORG
                          available: '3.02'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 签名
      schema:
        type: string
        example: 672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒）
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数
      schema:
        type: string
        example: '9578'
  schemas:
    BalanceQueryResponse:
      type: object
      properties:
        status:
          type: string
          description: SUCCESS 或者 FAIL
          enum:
            - SUCCESS
            - FAIL
          example: SUCCESS
        code:
          type: string
          description: 出错代码
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息
          example: ''
        data:
          type: object
          properties:
            balance_list:
              type: array
              description: 余额列表
              items:
                $ref: '#/components/schemas/BalanceItem'
    BalanceItem:
      type: object
      properties:
        currency:
          type: string
          description: 币种
          example: DOGE
        available:
          type: string
          description: 币种在商户现货账户中的余额
          example: '1843.32095'

````