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

# Khớp lệnh thỏa thuận

> Cập nhật giao dịch thỏa thuận.



## AsyncAPI

````yaml vi/asyncapi/ssi.2026-07-29.asyncapi.yaml putStream
id: putStream
title: Khớp lệnh thỏa thuận
description: Cập nhật giao dịch thỏa thuận.
servers:
  - id: production
    protocol: wss
    host: stream.ssi.com.vn
    bindings: []
    variables: []
address: /ws/v3
parameters: []
bindings: []
operations:
  - &ref_2
    id: onPutUpdates
    title: Nhận cập nhật khớp lệnh thỏa thuận
    type: send
    messages:
      - &ref_4
        id: update
        contentType: application/json
        payload:
          - name: Cập nhật khớp lệnh thỏa thuận
            description: Giao dịch thỏa thuận theo thời gian thực.
            type: object
            properties:
              - name: channel
                type: string
                description: DATA
                required: true
              - name: topic
                type: string
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: s
                    type: string
                    description: Mã chứng khoán.
                    required: true
                  - name: t
                    type: string
                    description: Thời gian giao dịch, định dạng `YYYY/MM/DD HH:mi:ss`.
                    required: true
                  - name: p
                    type: string
                    description: Giá khớp thỏa thuận.
                    required: true
                  - name: q
                    type: string
                    description: Khối lượng khớp thỏa thuận.
                    required: true
                  - name: tq
                    type: string
                    description: Tổng khối lượng thỏa thuận trong ngày.
                    required: true
                  - name: tv
                    type: string
                    description: Tổng giá trị thỏa thuận trong ngày.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - channel
            - topic
            - data
          properties:
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-103>
            topic:
              type: string
              pattern: >-
                ^put\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)(?:@(tick|1m|5m))?$
              x-parser-schema-id: <anonymous-schema-104>
            data:
              type: object
              additionalProperties: false
              required:
                - s
                - t
                - p
                - q
                - tq
                - tv
              properties:
                s:
                  type: string
                  description: Mã chứng khoán.
                  x-parser-schema-id: <anonymous-schema-106>
                t:
                  type: string
                  description: Thời gian giao dịch, định dạng `YYYY/MM/DD HH:mi:ss`.
                  x-parser-schema-id: <anonymous-schema-107>
                p:
                  type: string
                  description: Giá khớp thỏa thuận.
                  x-parser-schema-id: <anonymous-schema-108>
                q:
                  type: string
                  description: Khối lượng khớp thỏa thuận.
                  x-parser-schema-id: <anonymous-schema-109>
                tq:
                  type: string
                  description: Tổng khối lượng thỏa thuận trong ngày.
                  x-parser-schema-id: <anonymous-schema-110>
                tv:
                  type: string
                  description: Tổng giá trị thỏa thuận trong ngày.
                  x-parser-schema-id: <anonymous-schema-111>
              x-parser-schema-id: <anonymous-schema-105>
          x-parser-schema-id: <anonymous-schema-102>
        title: Cập nhật khớp lệnh thỏa thuận
        description: Giao dịch thỏa thuận theo thời gian thực.
        example: |-
          {
            "channel": "DATA",
            "topic": "put.SSI@tick",
            "data": {
              "s": "SSI",
              "t": "2026/07/29 10:05:12",
              "p": "45.00",
              "q": "50000",
              "tq": "350000",
              "tv": "15750000000"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: putStream
  - &ref_1
    id: onPutSubscription
    title: Đăng ký luồng khớp lệnh thỏa thuận
    type: receive
    messages:
      - &ref_3
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Yêu cầu đăng ký market data
            description: Đăng ký các topic trên channel DATA.
            type: object
            properties:
              - name: method
                type: string
                description: SUBSCRIBE
                required: true
              - name: channel
                type: string
                description: DATA
                required: true
              - name: topics
                type: array
                description: Danh sách topic market data; mỗi phần tử là một chuỗi topic.
                required: true
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - method
            - channel
            - topics
          properties:
            method:
              type: string
              const: SUBSCRIBE
              x-parser-schema-id: <anonymous-schema-93>
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-94>
            topics:
              type: array
              minItems: 1
              uniqueItems: true
              description: Danh sách topic market data; mỗi phần tử là một chuỗi topic.
              items:
                type: string
                minLength: 1
                pattern: >-
                  ^(trade|quote|room|put|oddlot)\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)(?:@(tick|1m|5m))?$|^market\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)$
                x-parser-schema-id: <anonymous-schema-96>
              x-parser-schema-id: <anonymous-schema-95>
          x-parser-schema-id: <anonymous-schema-92>
        title: Yêu cầu đăng ký market data
        description: Đăng ký các topic trên channel DATA.
        example: |-
          {
            "method": "SUBSCRIBE",
            "channel": "DATA",
            "topics": [
              "trade.SSI",
              "quote.ACB-SSI-GVR-KDH",
              "room.vn30",
              "put.hose",
              "oddlot.SSI",
              "market.hose"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: putStream
securitySchemes: []

````

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