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

# 查询费用配置规则详情

> 查询子账户在指定时间的生效配置，不传时间则返回当前时间的生效配置。

## 概述

本页介绍机构主商户查询子账户在指定时间的生效配置快照。完整字段、请求参数与响应示例由上方 OpenAPI 定义渲染。

## 说明

* 查询子账户在指定时间的生效配置，不传时间则返回当前时间的生效配置。
* 本接口使用 `X-GatePay-MerchantId` 标识主商户上下文，不使用 `X-GatePay-On-Behalf-Of`。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution-fee-settings-openapi.json GET /rate/commission_rule
openapi: 3.1.0
info:
  title: GatePay 机构费用设置 API
  version: 1.0.0
  description: 说明机构主商户为子账户查询、创建、升级和分页检索收益分成（Markup）规则的专属接口。路径和业务字段保持原始设计，文档仅优化展示命名与结构。
servers:
  - url: https://openplatform.gateapi.io
    description: Production
security: []
tags:
  - name: Fee Settings
    description: 机构子账户 Markup 费用设置接口。
paths:
  /rate/commission_rule:
    get:
      tags:
        - Fee Settings
      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'
        - $ref: '#/components/parameters/X-GatePay-MerchantId'
        - $ref: '#/components/parameters/sub_merchant_id'
        - $ref: '#/components/parameters/effective_date_query'
      responses:
        '200':
          description: 成功响应。
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandardSuccessEnvelope_CommissionRuleQueryData
              examples:
                success:
                  summary: 成功示例
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      sub_merchant_id: '123456789'
                      has_markup: true
                      config_id: cfg_202604150001
                      r_markup: 0.001
                      f_markup: 0
                      status: EFFECTIVE
                      effective_date: '2026-04-15 00:00:00'
                      expired_date: null
                      actual_rate:
                        r_total: 0.0035
                        f_total: 1
                      updated_at: '2026-04-15T08:30:00Z'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 应用 ClientId。
      schema:
        type: string
      example: your_client_id
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 使用 Payment API Secret 生成的 HMAC-SHA512 签名。
      schema:
        type: string
      example: generated_signature
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: UTC 毫秒时间戳。
      schema:
        type: string
      example: '1713433200000'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机字符串，用于防重放。
      schema:
        type: string
      example: fee-setting-001
    X-GatePay-MerchantId:
      name: X-GatePay-MerchantId
      in: header
      required: true
      description: 主商户 ID。该接口组通过此请求头声明当前机构主商户上下文。
      schema:
        type: string
      example: main_merchant_123456
    sub_merchant_id:
      name: sub_merchant_id
      in: query
      required: true
      description: 子账户 ID。
      schema:
        type: string
      example: '123456789'
    effective_date_query:
      name: effective_date
      in: query
      required: false
      description: 查询时间，格式 `YYYY-MM-DD HH:mm:ss`；不传则返回当前时间的生效配置。
      schema:
        type: string
      example: '2026-04-15 00:00:00'
  schemas:
    StandardSuccessEnvelope_CommissionRuleQueryData:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiEnvelopeStatus'
        code:
          type: string
          description: 业务结果码。
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息；成功时为空字符串。
          example: ''
        data:
          $ref: '#/components/schemas/CommissionRuleQueryData'
    ApiEnvelopeStatus:
      type: string
      description: 接口处理状态。
      enum:
        - SUCCESS
        - FAIL
    CommissionRuleQueryData:
      type: object
      properties:
        sub_merchant_id:
          type: string
          description: 子账户 ID。
          example: '123456789'
        has_markup:
          type: boolean
          description: 是否已配置 Markup。`false` 表示继承主账户费率。
          example: true
        config_id:
          type: string
          nullable: true
          description: 配置 ID；未命中规则时可为空。
          example: cfg_202604150001
        r_markup:
          type: number
          nullable: true
          description: 百分比加价；未配置时为 `null`。
          example: 0.001
        f_markup:
          type: number
          nullable: true
          description: 固定额加价（USDT）；未配置时为 `null`。
          example: 0
        status:
          $ref: '#/components/schemas/FeeRuleStatus'
        effective_date:
          type: string
          description: 本配置版本生效时间，格式 `yyyy-MM-dd HH:mm:ss`。
          example: '2026-04-15 00:00:00'
        expired_date:
          type: string
          nullable: true
          description: 失效时间；长期有效时为 `null`。
          example: null
        updated_at:
          type: string
          description: 最后更新时间，ISO8601。
          example: '2026-04-15T08:30:00Z'
    FeeRuleStatus:
      type: string
      description: 费率规则状态。
      enum:
        - EFFECTIVE
        - PENDING_EFFECTIVE
        - EXPIRED

````