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

# 理财服务状态查询

> 查询子账户的理财服务开通状态。`X-GatePay-On-Behalf-Of` 指定被代理的机构账户 ID。

## 概述

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

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 这个机构专属接口需要携带 `X-GatePay-On-Behalf-Of`，表示被代理的机构账户 ID。
* 响应中的 `status` 表示理财状态：`SIGN` 已开通，`CANCEL` 已关闭。
* 若子账户从未开通理财服务，响应中 `status` 为 `CANCEL`，且不返回 `enabled` 与 `updated` 字段。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institutional-openapi.json GET /merchant/open/institution/v1/wealth/query
openapi: 3.1.0
info:
  title: GatePay 机构 API
  description: Gate Pay 机构 API 接口文档
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /merchant/open/institution/v1/wealth/query:
    get:
      summary: 理财服务状态查询
      description: 查询子账户的理财服务开通状态。`X-GatePay-On-Behalf-Of` 指定被代理的机构账户 ID。
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WealthQueryResponseWrapper'
              examples:
                success:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      status: SIGN
                      enabled: 1772516898675
                      updated: 1772519811822
                      account_id: '2124766106'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户在Gate商户后台注册应用时分配的clientId
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 毫秒级时间戳，与服务端时间偏差不得超过30秒
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机字符串，字符符合HTTP Header头部的规范，建议长度在32个字符以内，字符串组成为数字和字母
      schema:
        type: string
        example: '9578'
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 请求签名。GatePay通过此签名来确定此请求是否合法
      schema:
        type: string
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: 必填代理归属请求头。请填写本次交易的发起方账户 ID，可填写机构账户 ID 或子账户 ID。
  schemas:
    WealthQueryResponseWrapper:
      type: object
      properties:
        status:
          type: string
          example: SUCCESS
        code:
          type: string
          example: '000000'
        errorMessage:
          type: string
        data:
          $ref: '#/components/schemas/WealthQueryResponse'
    WealthQueryResponse:
      type: object
      properties:
        account_id:
          type: string
          description: 子账户 ID
        status:
          type: string
          description: 理财状态：CANCEL 关闭；SIGN 开通
          enum:
            - CANCEL
            - SIGN
        enabled:
          type: integer
          format: int64
          description: 开启时间（毫秒）
        updated:
          type: integer
          format: int64
          description: 更新时间（毫秒）

````