# Account Detail Query

> Query account balances and transaction details for a specific currency.

```yaml
openapi: 3.1.0
info:
  title: Account Detail Query
  version: 1.0.0
  description: Query account balances and transaction details for a specific currency.
paths:
  /api/v1/acct/queryAcctDetail:
    post:
      summary: Account Detail Query
      description: Query account balances and transaction details for a specific currency.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Merchant number assigned by Onerway. Retrieve it from the merchant
                    portal or onboarding material after your sandbox or
                    production account is created.
                currency:
                  type: string
                  description: Currency to query.
                beginTime:
                  type: string
                  description: Start time of the query window.
                endTime:
                  type: string
                  description: End time of the query window.
                size:
                  type: integer
                  description: Page size.
                current:
                  type: integer
                  description: Current page number.
                txnType:
                  type: string
                  description: Optional transaction-type filter.
                sign:
                  type: string
                  description: Request signature string. Generate it according to the Transfer
                    request-signing rules with your merchant private key.
              required:
                - merchantNo
                - currency
                - beginTime
                - endTime
                - size
                - current
                - sign
            examples:
              query-account-details:
                summary: Query account details
                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: Account details returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code returned by Onerway.
                  respMsg:
                    type:
                      - string
                      - "null"
                    description: Response message returned by Onerway.
                    x-onerway-value:
                      nullable: true
                      when:
                        en: No response message is returned.
                        zh: 未返回响应信息时为 `null`。
                  data:
                    type: object
                    properties:
                      currency:
                        type: string
                        description: Currency of the queried account.
                      availBalance:
                        type: string
                        description: Available balance.
                      freezeBalance:
                        type: string
                        description: Frozen balance.
                      accountTransactionDetails:
                        type: array
                        description: Transaction detail records.
                        items:
                          type: object
                          properties:
                            serviceId:
                              type: string
                              description: Service or transaction ID.
                            txnType:
                              type: string
                              description: Transaction type.
                            subAcntType:
                              type: string
                              description: Sub account type.
                            currency:
                              type: string
                              description: Currency of the record.
                            accountBalanceBefore:
                              type: number
                              description: Balance before movement.
                            moveAmount:
                              type: number
                              description: Ledger movement amount.
                            accountBalanceAfter:
                              type: number
                              description: Balance after movement.
                            remark:
                              type: string
                              description: Remark.
                            balanceUpdDate:
                              type: string
                              description: Balance update time.
                    description: Account detail and transaction ledger result.
              examples:
                account-details-returned:
                  summary: Account details returned
                  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
```
