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

# Giao dịch lô lẻ

> Cập nhật giao dịch và bid/ask lô lẻ.



## AsyncAPI

````yaml vi/asyncapi/ssi.2026-07-29.asyncapi.yaml oddlotStream
id: oddlotStream
title: Giao dịch lô lẻ
description: Cập nhật giao dịch và bid/ask lô lẻ.
servers:
  - id: production
    protocol: wss
    host: stream.ssi.com.vn
    bindings: []
    variables: []
address: /ws/v3
parameters: []
bindings: []
operations:
  - &ref_2
    id: onOddlotUpdates
    title: Nhận cập nhật giao dịch lô lẻ
    type: send
    messages:
      - &ref_4
        id: update
        contentType: application/json
        payload:
          - name: Cập nhật giao dịch lô lẻ
            description: Giao dịch và bid/ask lô lẻ.
            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 lô lẻ.
                    required: true
                  - name: q
                    type: string
                    description: Khối lượng khớp lô lẻ.
                    required: true
                  - name: bids
                    type: array
                    description: Danh sách mức giá mua lô lẻ `[price, quantity]`.
                    required: true
                    properties:
                      - name: item
                        type: array
                        required: false
                        properties:
                          - name: item
                            type: string
                            required: false
                  - name: asks
                    type: array
                    description: Danh sách mức giá bán lô lẻ `[price, quantity]`.
                    required: true
                    properties:
                      - name: item
                        type: array
                        required: false
                        properties:
                          - name: item
                            type: string
                            required: false
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - channel
            - topic
            - data
          properties:
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-123>
            topic:
              type: string
              pattern: >-
                ^oddlot\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)(?:@(tick|1m|5m))?$
              x-parser-schema-id: <anonymous-schema-124>
            data:
              type: object
              additionalProperties: false
              required:
                - s
                - t
                - p
                - q
                - bids
                - asks
              properties:
                s:
                  type: string
                  description: Mã chứng khoán.
                  x-parser-schema-id: <anonymous-schema-126>
                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-127>
                p:
                  type: string
                  description: Giá khớp lô lẻ.
                  x-parser-schema-id: <anonymous-schema-128>
                q:
                  type: string
                  description: Khối lượng khớp lô lẻ.
                  x-parser-schema-id: <anonymous-schema-129>
                bids:
                  description: Danh sách mức giá mua lô lẻ `[price, quantity]`.
                  type: array
                  items:
                    type: array
                    minItems: 2
                    maxItems: 2
                    items:
                      type: string
                      x-parser-schema-id: <anonymous-schema-132>
                    x-parser-schema-id: <anonymous-schema-131>
                  x-parser-schema-id: <anonymous-schema-130>
                asks:
                  description: Danh sách mức giá bán lô lẻ `[price, quantity]`.
                  type: array
                  items:
                    type: array
                    minItems: 2
                    maxItems: 2
                    items:
                      type: string
                      x-parser-schema-id: <anonymous-schema-135>
                    x-parser-schema-id: <anonymous-schema-134>
                  x-parser-schema-id: <anonymous-schema-133>
              x-parser-schema-id: <anonymous-schema-125>
          x-parser-schema-id: <anonymous-schema-122>
        title: Cập nhật giao dịch lô lẻ
        description: Giao dịch và bid/ask lô lẻ.
        example: |-
          {
            "channel": "DATA",
            "topic": "oddlot.SSI@tick",
            "data": {
              "s": "SSI",
              "t": "2026/07/29 09:16:05",
              "p": "45.50",
              "q": "80",
              "bids": [
                [
                  "45.45",
                  "50"
                ],
                [
                  "45.40",
                  "30"
                ]
              ],
              "asks": [
                [
                  "45.55",
                  "40"
                ],
                [
                  "45.60",
                  "20"
                ]
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: oddlotStream
  - &ref_1
    id: onOddlotSubscription
    title: Đăng ký luồng giao dịch lô lẻ
    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-113>
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-114>
            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-116>
              x-parser-schema-id: <anonymous-schema-115>
          x-parser-schema-id: <anonymous-schema-112>
        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: oddlotStream
securitySchemes: []

````

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