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

# Giá khớp dự kiến

> Cung cấp thông tin giá đóng cửa, giá khớp dự kiến và khối lượng khớp dự kiến của mã chứng khoán
trong các phiên giao dịch khớp lệnh định kỳ ATO và ATC.



## AsyncAPI

````yaml vi/asyncapi/dnse.2026-09-10.asyncapi.yaml expectedPriceStream
id: expectedPriceStream
title: Giá khớp dự kiến
description: >-
  Cung cấp thông tin giá đóng cửa, giá khớp dự kiến và khối lượng khớp dự kiến
  của mã chứng khoán

  trong các phiên giao dịch khớp lệnh định kỳ ATO và ATC.
servers:
  - id: production
    protocol: wss
    host: ws-openapi.dnse.com.vn
    bindings: []
    variables: []
  - id: sanbox
    protocol: wss
    host: ws-sb-openapi.dnse.com.vn
    bindings: []
    variables: []
address: /v1/stream
parameters: []
bindings:
  - protocol: ws
    version: 0.1.0
    value:
      method: GET
      query:
        type: object
        additionalProperties: false
        required:
          - encoding
        properties:
          encoding:
            type: string
            const: json
            default: json
            description: Định dạng mã hóa dữ liệu WebSocket (`json`, `msgpack`).
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: query
        type: object
        required: false
        properties:
          - name: encoding
            type: string
            description: Định dạng mã hóa dữ liệu WebSocket (`json`, `msgpack`).
            required: true
operations:
  - &ref_1
    id: onExpectedPriceSubscription
    title: Đăng ký luồng giá dự kiến
    type: receive
    messages:
      - &ref_3
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Đăng ký luồng giá dự kiến
            description: Đăng ký topic `expected_price.{market_group}.{encoding}`.
            type: object
            properties:
              - name: action
                type: string
                description: subscribe
                required: true
              - name: channels
                type: array
                required: true
                properties:
                  - name: name
                    type: string
                    description: Topic giá dự kiến theo nhóm thị trường.
                    required: true
                  - name: symbols
                    type: array
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - action
            - channels
          properties:
            action:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-158>
            channels:
              type: array
              minItems: 1
              uniqueItems: true
              items:
                type: object
                additionalProperties: false
                required:
                  - name
                  - symbols
                properties:
                  name:
                    type: string
                    description: Topic giá dự kiến theo nhóm thị trường.
                    pattern: ^expected_price\.[A-Z0-9]+\.json$
                    x-parser-schema-id: <anonymous-schema-161>
                  symbols:
                    type: array
                    minItems: 1
                    uniqueItems: true
                    items:
                      type: string
                      minLength: 1
                      x-parser-schema-id: <anonymous-schema-163>
                    x-parser-schema-id: <anonymous-schema-162>
                x-parser-schema-id: <anonymous-schema-160>
              x-parser-schema-id: <anonymous-schema-159>
          x-parser-schema-id: <anonymous-schema-157>
        title: Đăng ký luồng giá dự kiến
        description: Đăng ký topic `expected_price.{market_group}.{encoding}`.
        example: |-
          {
            "action": "subscribe",
            "channels": [
              {
                "name": "expected_price.G1.json",
                "symbols": [
                  "HPG"
                ]
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: expectedPriceStream
  - &ref_2
    id: onExpectedPriceUpdates
    title: Nhận cập nhật giá dự kiến
    type: send
    messages:
      - &ref_4
        id: update
        contentType: application/json
        payload:
          - name: Cập nhật giá dự kiến
            description: Bản cập nhật giá và khối lượng khớp dự kiến.
            type: object
            properties:
              - name: T
                type: string
                description: Mã loại message giá dự kiến.
                required: true
              - name: marketId
                type: string
                description: Mã thị trường niêm yết mã chứng khoán.
                required: true
              - name: boardId
                type: string
                description: Mã bảng giao dịch.
                required: true
              - name: symbol
                type: string
                description: Mã chứng khoán.
                required: true
              - name: isin
                type: string
                description: Mã định danh quốc tế của chứng khoán.
                required: true
              - name: closePrice
                type: number
                description: Giá đóng cửa.
                required: true
              - name: expectedTradePrice
                type: number
                description: Giá dự khớp tại thời điểm xác định.
                required: true
              - name: expectedTradeQuantity
                type: integer
                description: Khối lượng dự khớp tại thời điểm xác định.
                required: true
              - name: time
                type: object
                description: Thời gian trong các message giá của sàn trả về.
                required: true
                properties:
                  - name: Seconds
                    type: integer
                    description: Unix timestamp tính bằng giây.
                    required: true
                  - name: Nanos
                    type: integer
                    description: Phần nanosecond của timestamp.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Dữ liệu giá và khối lượng khớp dự kiến trong phiên giao dịch định
            kỳ.
          required:
            - T
            - marketId
            - boardId
            - symbol
            - expectedTradePrice
            - expectedTradeQuantity
            - isin
            - closePrice
            - time
          properties:
            T:
              type: string
              description: Mã loại message giá dự kiến.
              const: e
              x-parser-schema-id: <anonymous-schema-165>
            marketId:
              type: string
              description: Mã thị trường niêm yết mã chứng khoán.
              x-parser-schema-id: <anonymous-schema-166>
            boardId:
              type: string
              description: Mã bảng giao dịch.
              x-parser-schema-id: <anonymous-schema-167>
            symbol:
              type: string
              description: Mã chứng khoán.
              x-parser-schema-id: <anonymous-schema-168>
            isin:
              type: string
              description: Mã định danh quốc tế của chứng khoán.
              x-parser-schema-id: <anonymous-schema-169>
            closePrice:
              type: number
              description: Giá đóng cửa.
              x-parser-schema-id: <anonymous-schema-170>
            expectedTradePrice:
              type: number
              description: Giá dự khớp tại thời điểm xác định.
              x-parser-schema-id: <anonymous-schema-171>
            expectedTradeQuantity:
              type: integer
              description: Khối lượng dự khớp tại thời điểm xác định.
              x-parser-schema-id: <anonymous-schema-172>
            time:
              type: object
              description: Thời gian trong các message giá của sàn trả về.
              required:
                - Seconds
                - Nanos
              properties:
                Seconds:
                  type: integer
                  format: int64
                  description: Unix timestamp tính bằng giây.
                  x-parser-schema-id: <anonymous-schema-174>
                Nanos:
                  type: integer
                  format: int32
                  description: Phần nanosecond của timestamp.
                  x-parser-schema-id: <anonymous-schema-175>
              x-parser-schema-id: <anonymous-schema-173>
          x-parser-schema-id: <anonymous-schema-164>
        title: Cập nhật giá dự kiến
        description: Bản cập nhật giá và khối lượng khớp dự kiến.
        example: |-
          {
            "T": "e",
            "marketId": "DVX",
            "boardId": "G1",
            "symbol": "41I1G1000",
            "isin": "VN41I1G10000",
            "closePrice": 28.45,
            "expectedTradePrice": 28.45,
            "expectedTradeQuantity": 133780,
            "time": {
              "Seconds": 1779694639,
              "Nanos": 736000000
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: expectedPriceStream
securitySchemes: []

````

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