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

# Dữ liệu khớp gần nhất

> Truy vấn thông tin giao dịch khớp lệnh gần nhất của mã chứng khoán.



## OpenAPI

````yaml https://cdn.entrade.com.vn/dnse-openapi/doc/dnse-openapi-2026-07-23.yaml get /price/{symbol}/trades/latest
openapi: 3.0.0
info:
  title: OpenAPI-V2-Spec 260730
  version: 1.0.0
  description: DNSE OpenAPI spec and tests
servers:
  - url: https://openapi-uat.dnse.com.vn
security: []
paths:
  /price/{symbol}/trades/latest:
    parameters:
      - name: symbol
        in: path
        required: true
        description: 'Mã chứng khoán '
        schema:
          type: string
        example: ACB
    get:
      tags:
        - market-data
      summary: Dữ liệu khớp gần nhất
      description: Truy vấn thông tin giao dịch khớp lệnh gần nhất của mã chứng khoán.
      parameters:
        - name: boardId
          in: query
          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:
            type: string
          example: G1
        - name: X-API-Key
          in: header
          required: true
          description: API Key được cấp khi đăng ký dịch vụ
          schema:
            type: string
          example: '{{apiKey}}'
        - name: X-Aux-Date
          in: header
          required: true
          description: Thời gian thực hiện yêu cầu
          schema:
            type: string
          example: '{{date}}'
        - name: X-Signature
          in: header
          required: true
          description: Chữ ký xác thực yêu cầu
          schema:
            type: string
          example: '{{signature}}'
        - name: version
          in: header
          description: API version (YYYY-MM-DD)
          schema:
            type: string
          example: '2026-07-23'
      responses:
        '200':
          description: OK
          headers:
            Content-Length:
              schema:
                type: integer
              example: 423
            Date:
              schema:
                type: string
              example: Tue, 24 Mar 2026 03:07:04 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 1000
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 997
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1774368830
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
          content:
            application/json:
              schema:
                type: object
                description: Thông tinh giao dịch khớp lệnh.
                properties:
                  trades:
                    type: array
                    description: ''
                    example:
                      - marketId: STO
                        boardId: G1
                        isin: VN000000ACB8
                        symbol: ACB
                        matchPrice: 23.35
                        matchQtty: 20
                        side: SELL
                        avgPrice: 23.435
                        totalVolumeTraded: 427980
                        grossTradeAmount: 100.295515
                        highestPrice: 23.55
                        lowestPrice: 23.35
                        openPrice: 23.5
                        time: '2026-05-27 09:43:32.706'
                    items:
                      type: object
                      properties:
                        marketId:
                          type: string
                          example: STO
                          description: |-
                            Mã thị trường niêm yết mã chứng khoán
                            - DVX: Phái sinh sàn HNX
                            - HCX: Trái phiếu doanh nghiệp HNX
                            - STO: Cổ phiếu sàn HOSE
                            - STX: Cổ phiếu sàn HNX
                            - UPX: Cổ phiếu sàn Upcom
                        boardId:
                          type: string
                          example: G1
                          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)
                        isin:
                          type: string
                          example: VN000000ACB8
                          description: Mã định danh quốc tế (ISIN) của chứng khoán.
                        symbol:
                          type: string
                          example: ACB
                          description: Mã chứng khoán
                        matchPrice:
                          type: number
                          format: double
                          example: 23.35
                          description: Giá khớp gần nhất
                        matchQtty:
                          type: integer
                          format: int32
                          example: 20
                          description: Khối lượng khớp gần nhất
                        side:
                          type: string
                          example: SELL
                          description: >-
                            Chiều giao dịch. Giá trị: BUY (Mu chủ động), SELL
                            (Bán chủ động), UNSPECIFIED (Không xác định)
                        avgPrice:
                          type: number
                          format: double
                          example: 23.435
                          description: Giá khớp trung bình
                        totalVolumeTraded:
                          type: integer
                          format: int32
                          example: 427980
                          description: Tổng khối lượng giao dịch trong ngày
                        grossTradeAmount:
                          type: number
                          format: double
                          example: 100.295515
                          description: Tổng giá trị giao dịch trong ngày
                        highestPrice:
                          type: number
                          format: double
                          example: 23.55
                          description: Giá cao nhất trong ngày
                        lowestPrice:
                          type: number
                          format: double
                          example: 23.35
                          description: Giá thấp nhất trong ngày
                        openPrice:
                          type: number
                          format: double
                          example: 23.5
                          description: Giá mở cửa.
                        time:
                          type: string
                          example: '2026-05-27 09:43:32.706'
                          description: >-
                            Thời gian ghi nhận. Định dạng: YYYY-MM-DD
                            HH:mm:ss.SSS (GMT+7)
              example:
                trades:
                  - marketId: STO
                    boardId: G1
                    isin: VN000000ACB8
                    symbol: ACB
                    matchPrice: 23.35
                    matchQtty: 20
                    side: SELL
                    avgPrice: 23.435
                    totalVolumeTraded: 427980
                    grossTradeAmount: 100.295515
                    highestPrice: 23.55
                    lowestPrice: 23.35
                    openPrice: 23.5
                    time: '2026-05-27 09:43:32.706'
        '400':
          description: Yêu cầu không hợp lệ
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-003
                    description: Mã lỗi
                  message:
                    type: string
                    example: Thông tin nhập không hợp lệ
                    description: Thông điệp lỗi
              example:
                code: OA-003
                message: Thông tin nhập không hợp lệ
                status: 400
        '500':
          description: Lỗi hệ thống
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-009
                    description: Mã lỗi
                  message:
                    type: string
                    example: Lỗi hệ thống
                    description: Thông điệp lỗi
              example:
                code: OA-009
                message: Lỗi hệ thống
                status: 500

````

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