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

# Lịch sử khớp lệnh theo bước giá

> Thống kê khối lượng mua và bán chủ động tại từng mức giá trong ngày giao dịch.



## OpenAPI

````yaml /vi/openapi/dnse.2026-09-25.openapi.yaml get /price/{symbol}/trades/volume-profile
openapi: 3.0.0
info:
  title: DNSE OpenAPI (2026-09-25)
  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:
  /price/{symbol}/trades/volume-profile:
    get:
      tags:
        - market
      summary: Lịch sử khớp lệnh theo bước giá
      description: >-
        Thống kê khối lượng mua và bán chủ động tại từng mức giá trong ngày giao
        dịch.
      operationId: symbol_getVolumeProfile
      parameters:
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XAuxDate'
        - $ref: '#/components/parameters/XSignature'
        - name: version
          in: header
          required: false
          description: API version (YYYY-MM-DD)
          schema:
            type: string
        - name: symbol
          in: path
          required: true
          description: Mã chứng khoán
          schema:
            type: string
        - name: boardId
          in: query
          required: false
          description: |-
            Mã bảng giao dịch
            - G1: Lô chẵn
            - G4: Lô lẻ
            - T1: Thỏa thuận trong giờ (9h - 14h45)
            - T3: Thỏa thuận sau giờ (14h45 - 15h)
            - T4: Thỏa thuận lô lẻ trong giờ (9h - 14h45)
            - T6: Thỏa thuận lô lẻ sau giờ  (14h45 - 15h)
          schema: {}
        - name: time
          in: query
          required: false
          description: Ngày giao dịch cần lấy dữ liệu (YYYY-MM-DD)
          schema: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  volumeProfile:
                    type: array
                    description: >-
                      Danh sách khối lượng mua bán chủ động được phân bổ theo
                      từng mức giá
                    items:
                      type: object
                      properties:
                        accumulatedVol:
                          type: integer
                          format: int32
                          description: Khối lượng giao dịch lũy kế tại mức giá
                        boardId:
                          type: string
                          description: Mã bảng giao dịch
                        buyVol:
                          type: integer
                          format: int32
                          description: Khối lượng mua chủ động tại mức giá.
                        price:
                          type: number
                          format: double
                          description: Mức giá giao dịch (đơn vị nghìn đồng)
                        sellVol:
                          type: integer
                          format: int32
                          description: Khối lượng bán chủ động tại mức giá
                        symbol:
                          type: string
                          description: Mã chứng khoán
                        time:
                          type: string
                          description: Ngày giao dịch
                        unknownVol:
                          type: integer
                          format: int32
                          description: >-
                            Khối lượng giao dịch chưa xác định được bên chủ
                            động.
                example:
                  volumeProfile:
                    - accumulatedVol: 241690
                      boardId: G1
                      buyVol: 68720
                      price: 21.35
                      sellVol: 172970
                      symbol: ACB
                      time: '2026-09-25'
                      unknownVol: 0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  status:
                    type: integer
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  status:
                    type: integer
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

````

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