> ## 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-05-07.yaml get /price/{symbol}/trades/latest
openapi: 3.0.0
info:
  title: DNSE-OpenAPI-V2
  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 '
        deprecated: false
        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
          required: true
          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)
          deprecated: false
          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ụ
          deprecated: false
          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
          deprecated: false
          schema:
            type: string
          example: '{{date}}'
        - name: X-Signature
          in: header
          required: true
          description: Chữ ký xác thực yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{signature}}'
        - name: version
          in: header
          description: 'Phiên bản API '
          schema:
            type: string
            format: date
          example: '2026-05-07'
      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
                properties:
                  trades:
                    type: array
                    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'
                    description: ''
                    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ế
                        symbol:
                          type: string
                          example: ACB
                          description: Mã chứng khoán
                        matchPrice:
                          type: number
                          example: 23.35
                          description: Giá khớp lệnh của giao dịch
                          format: double
                        matchQtty:
                          type: integer
                          example: 20
                          description: Khối lượng khớp của giao dịch
                          format: int32
                        side:
                          type: string
                          example: SELL
                          description: |-
                            Phía giao dịch chủ động
                            - BUY: Bên mua chủ động
                            - SELL: Bên bán chủ động
                        avgPrice:
                          type: number
                          example: 23.435
                          description: Giá khớp trung bình
                          format: double
                        totalVolumeTraded:
                          type: integer
                          example: 427980
                          description: Tổng khối lượng đã giao dịch trong ngày
                          format: int32
                        grossTradeAmount:
                          type: number
                          example: 100.295515
                          description: Tổng giá trị giao dịch trong nngày
                          format: double
                        highestPrice:
                          type: number
                          example: 23.55
                          description: Giá khớp cao nhất trong ngày
                          format: double
                        lowestPrice:
                          type: number
                          example: 23.35
                          description: Giá khớp thấp nhất trong ngày
                          format: double
                        openPrice:
                          type: number
                          example: 23.5
                          description: Giá mở cửa
                          format: float
                        time:
                          type: string
                          example: '2026-05-27 09:43:32.706'
                          description: >-
                            Thời gian trong các message giá của sở trả về
                            (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.