# 账户详情查询

> 查询指定币种下的账户余额和交易明细。

```yaml
openapi: 3.1.0
info:
  title: 账户详情查询
  version: 1.0.0
  description: 查询指定币种下的账户余额和交易明细。
paths:
  /api/v1/acct/queryAcctDetail:
    post:
      summary: 账户详情查询
      description: 查询指定币种下的账户余额和交易明细。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Onerway 分配的商户号。通常在沙盒或生产商户开通后，从商户后台或开户材料中获取。
                currency:
                  type: string
                  description: 币种，如：USD。
                beginTime:
                  type: string
                  description: 开始时间，格式如：2024-06-11 00:00:00。
                endTime:
                  type: string
                  description: 结束时间，格式如：2024-07-13 12:12:12。
                size:
                  type: integer
                  description: 每页条数，如：10。
                current:
                  type: integer
                  description: 当前页，默认 1。
                txnType:
                  type: string
                  description: 交易类型。
                sign:
                  type: string
                  description: 请求签名字符串，需使用商户私钥按 Transfer 请求签名规则生成。
              required:
                - merchantNo
                - currency
                - beginTime
                - endTime
                - size
                - current
                - sign
            examples:
              query-account-details:
                summary: 账户详情查询
                value:
                  beginTime: 2025-06-15 00:00:00
                  currency: USD
                  current: 1
                  endTime: 2025-09-10 12:12:12
                  merchantNo: "801129"
                  sign: "{{SIGN}}"
                  size: 10
      responses:
        "200":
          description: 返回账户详情
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Onerway 返回的响应码。
                  respMsg:
                    type:
                      - string
                      - "null"
                    description: Onerway 返回的响应信息。
                    x-onerway-value:
                      nullable: true
                      when:
                        en: No response message is returned.
                        zh: 未返回响应信息时为 `null`。
                  data:
                    type: object
                    properties:
                      currency:
                        type: string
                        description: 币种。
                      availBalance:
                        type: string
                        description: 可用余额。
                      freezeBalance:
                        type: string
                        description: 冻结余额。
                      accountTransactionDetails:
                        type: array
                        description: 交易明细列表。
                        items:
                          type: object
                          properties:
                            serviceId:
                              type: string
                              description: 流水号。
                            txnType:
                              type: string
                              description: 交易类型。
                            subAcntType:
                              type: string
                              description: 子账户类型。
                            currency:
                              type: string
                              description: 币种。
                            accountBalanceBefore:
                              type: number
                              description: 期初金额。
                            moveAmount:
                              type: number
                              description: 动账金额。
                            accountBalanceAfter:
                              type: number
                              description: 期末金额。
                            remark:
                              type: string
                              description: 备注。
                            balanceUpdDate:
                              type: string
                              description: 账户余额更新时间。
                    description: 用于查询指定币种的账户交易明细。
              examples:
                account-details-returned:
                  summary: 返回账户详情
                  value:
                    respCode: "20000"
                    respMsg: null
                    data:
                      currency: USD
                      availBalance: "989734.42"
                      freezeBalance: "128.00"
                      accountTransactionDetails:
                        - serviceId: "1965301543088029696"
                          txnType: "0107"
                          subAcntType: AVAIL
                          currency: USD
                          accountBalanceBefore: 989996.92
                          moveAmount: -5
                          accountBalanceAfter: 989991.92
                          remark: jiaoyiRemark
                          balanceUpdDate: 2025-09-09 14:29:36
                        - serviceId: "1965301540898603008"
                          txnType: "0035"
                          subAcntType: AVAIL
                          currency: USD
                          accountBalanceBefore: 989997.98
                          moveAmount: -1.06
                          accountBalanceAfter: 989996.92
                          remark: null
                          balanceUpdDate: 2025-09-09 14:29:35
```
