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

# Thông tin tiền



## OpenAPI

````yaml /vi/openapi/dnse.2026-09-10.openapi.yaml get /accounts/{accountNo}/balances
openapi: 3.0.0
info:
  title: DNSE OpenAPI (2026-09-10)
  version: 2.0.0
  description: DNSE OpenAPI spec
servers:
  - url: https://openapi.dnse.com.vn
    description: Production
  - url: https://sb-openapi.dnse.com.vn
    description: Sanbox
security: []
tags:
  - name: trading
    description: Xác thực và các hoạt động đặt lệnh.
    x-group: Giao dịch
  - name: account
    description: Tài khoản, số dư, khoản vay, lệnh và vị thế.
    x-group: Tài khoản
  - name: market
    description: Thông tin mã chứng khoán, báo giá, OHLC và giao dịch.
    x-group: Dữ liệu thị trường
paths:
  /accounts/{accountNo}/balances:
    parameters:
      - name: accountNo
        in: path
        required: true
        description: Số tiểu khoản
        deprecated: false
        schema:
          type: string
        example: '0001179019'
    get:
      tags:
        - account
      summary: Thông tin tiền
      operationId: account_getBalances
      parameters:
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XAuxDate'
        - $ref: '#/components/parameters/XSignature'
      responses:
        '200':
          description: OK
          headers:
            Access-Control-Allow-Credentials:
              $ref: '#/components/headers/AccessControlAllowCredentials'
            Access-Control-Allow-Headers:
              deprecated: false
              schema: {}
              example: >-
                Content-Type, Authorization, X-Request-ID, Accept, Origin,
                X-Requested-With
            Access-Control-Allow-Methods:
              deprecated: false
              schema: {}
              example: GET, POST, PUT, DELETE, OPTIONS, PATCH
            Access-Control-Allow-Origin:
              deprecated: false
              schema: {}
              example: '*'
            Access-Control-Max-Age:
              deprecated: false
              schema: {}
              example: '86400'
            Content-Length:
              $ref: '#/components/headers/ContentLength'
            Date:
              $ref: '#/components/headers/Date'
            Vary:
              $ref: '#/components/headers/Vary'
            X-Ratelimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-Ratelimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-Ratelimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-Tyk-Api-Expires:
              deprecated: false
              schema: {}
              example: Thu, 02 Jan 3000 15:04:00 UTC
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
              example:
                stock:
                  totalCash: 3720308
                  availableCash: 3720022
                  depositInterest: 286
                  totalDebt: 592355
                  depositFeeAmount: 405
                  withdrawableCash: 3719617
                  cashDividendReceiving: 0
                derivative:
                  pendingDepositWithdraw: 826996062
                  remainSecure: 122363429600
                  usedSecure: 102098277
                  pendingSecure: 826996062
                  holdTaxAndFee: 0
                  totalLoanDebt: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    XApiKey:
      name: X-Api-Key
      in: header
      required: true
      description: >-
        API key được cấp khi đăng ký dịch vụ DNSE OpenAPI.

        Ví dụ:
        `b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=`
      schema:
        type: string
    XAuxDate:
      name: X-Aux-Date
      in: header
      required: true
      description: |-
        Thời gian thực hiện request, dùng trong cơ chế ký request của DNSE.
        Ví dụ: `Sat, 01 May 2026 14:24:23 +0000`
      schema:
        type: string
    XSignature:
      name: X-Signature
      in: header
      required: true
      description: >-
        Chữ ký xác thực request được tạo từ API key secret và X-Aux-Date.

        Ví dụ: `Signature
        keyId="b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=",algorithm="hmac-sha256",headers="(request-target)
        x-aux-date",signature="rfbVXHDUi%2B%2FsOkLXle7O17Qm%2F05cbISSR%2BDcFrBHfqQ%3D",nonce="4add8c3264e4492b9f8ecde0cf26b523"`
      schema:
        type: string
  headers:
    AccessControlAllowCredentials:
      description: Whether the response permits credentials in cross-origin requests.
      schema:
        type: boolean
      example: true
    ContentLength:
      description: Response body size in bytes.
      schema:
        type: integer
      example: 430
    Date:
      description: Response date from the DNSE gateway.
      schema:
        type: string
      example: Wed, 18 Mar 2026 16:17:35 GMT
    Vary:
      description: >-
        Response header indicating the request headers used for content
        negotiation.
      schema:
        type: string
      example: Origin
    XRateLimitLimit:
      description: Maximum number of requests allowed in the current rate-limit window.
      schema:
        type: integer
      example: 300
    XRateLimitRemaining:
      description: Number of requests remaining in the current rate-limit window.
      schema:
        type: integer
      example: 299
    XRateLimitReset:
      description: Unix timestamp at which the current rate-limit window resets.
      schema:
        type: integer
      example: 1773850655
    XRequestId:
      description: Unique identifier assigned to the request by the DNSE gateway.
      schema:
        type: string
      example: unknown
  schemas:
    BalancesResponse:
      type: object
      properties:
        stock:
          $ref: '#/components/schemas/StockBalance'
        derivative:
          $ref: '#/components/schemas/DerivativeBalance'
        bond:
          $ref: '#/components/schemas/BondBalance'
        egg:
          $ref: '#/components/schemas/EggBalance'
    StockBalance:
      type: object
      properties:
        totalCash:
          type: integer
          format: int32
          example: 3720308
          description: >-
            Tổng tiền (Tiền mặt + Lãi tiền gửi + Tiền bán chờ về + Tiền cổ tức
            chờ về - Tiền mua trong ngày)
        availableCash:
          type: integer
          format: int32
          example: 3720022
          description: Tiền mặt hiện có
        depositInterest:
          type: integer
          format: int32
          example: 286
          description: Lãi tiền gửi không kỳ hạn
        totalDebt:
          type: integer
          format: int32
          example: 592355
          description: Tổng nợ (Nợ margin tạm thu + Nợ margin còn lại)
        depositFeeAmount:
          type: integer
          format: int32
          example: 405
          description: Phí lưu ký
        secureAmount:
          type: integer
          format: int32
          description: Tổng tiền ký quỹ
          example: 11174173
        orderSecured:
          type: integer
          format: int32
          description: Số tiền đang được phong tỏa cho các lệnh giao dịch
          example: 7903713
        withdrawableCash:
          type: integer
          format: int32
          example: 3719617
          description: Tiền có thể rút
        cashDividendReceiving:
          type: integer
          format: int32
          example: 0
          description: Tiền cổ tức chờ về
      example:
        totalCash: 3720308
        availableCash: 3720022
        depositInterest: 286
        totalDebt: 592355
        depositFeeAmount: 405
        withdrawableCash: 3719617
        cashDividendReceiving: 0
      description: ''
    DerivativeBalance:
      type: object
      properties:
        pendingDepositWithdraw:
          type: integer
          format: int32
          example: 826996062
          description: Tiền nộp/rút cọc chờ xử lý
        remainSecure:
          type: integer
          format: int64
          example: 122363429600
          description: Cọc còn lại
        usedSecure:
          type: integer
          format: int32
          example: 102098277
          description: Cọc đã sử dụng
        pendingSecure:
          type: integer
          format: int32
          example: 826996062
          description: Cọc chờ duyệt
        holdTaxAndFee:
          type: integer
          format: int32
          example: 0
          description: Thuế và phí tạm giữ
        totalLoanDebt:
          type: integer
          format: int32
          example: 0
          description: Khoản ứng chưa hoàn
      example:
        pendingDepositWithdraw: 826996062
        remainSecure: 122363429600
        usedSecure: 102098277
        pendingSecure: 826996062
        holdTaxAndFee: 0
        totalLoanDebt: 0
      description: ''
    BondBalance:
      type: object
      properties:
        totalValue:
          type: integer
          format: int64
          description: Tổng giá trị tài sản trái phiếu
          example: 40102762100
      description: Thông tin tài sản trái phiếu
      example:
        totalValue: 40102762100
    EggBalance:
      type: object
      properties:
        totalValue:
          type: integer
          format: int32
          description: Tổng giá trị tài sản trứng
          example: 6849005
      description: Thông tin tài sản trứng vàng
      example:
        totalValue: 6849005
    ErrorBody:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: integer
          format: int32
          description: Mã HTTP.
          example: 400
        code:
          type: string
          description: Mã lỗi DNSE.
          example: OA-003
        message:
          type: string
          description: Thông điệp lỗi.
          example: Thông tin nhập không hợp lệ
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ.
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLength'
        Date:
          $ref: '#/components/headers/Date'
        Vary:
          $ref: '#/components/headers/Vary'
        X-Ratelimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-Ratelimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-Ratelimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Tyk-Api-Expires:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            status: 400
            code: OA-003
            message: Thông tin nhập không hợp lệ
    InternalError:
      description: Lỗi hệ thống.
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLength'
        Date:
          $ref: '#/components/headers/Date'
        Vary:
          $ref: '#/components/headers/Vary'
        X-Ratelimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-Ratelimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-Ratelimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Tyk-Api-Expires:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            status: 500
            code: OA-009
            message: Lỗi hệ thống

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.