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

# Thông tin đầu ngày và phiên

> Cập nhật thông tin giá tham chiếu và cờ phiên của thị trường.



## AsyncAPI

````yaml vi/asyncapi/ssi.2026-07-29.asyncapi.yaml marketStream
id: marketStream
title: Thông tin đầu ngày và phiên
description: Cập nhật thông tin giá tham chiếu và cờ phiên của thị trường.
servers:
  - id: production
    protocol: wss
    host: stream.ssi.com.vn
    bindings: []
    variables: []
address: /ws/v3
parameters: []
bindings: []
operations:
  - &ref_2
    id: onMarketUpdates
    title: Nhận cập nhật thị trường
    type: send
    messages:
      - &ref_4
        id: update
        contentType: application/json
        payload:
          - name: Cập nhật thông tin thị trường
            description: Giá trần, giá sàn và giá tham chiếu đầu ngày.
            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: b
                    type: string
                    description: Sàn giao dịch.
                    enumValues:
                      - HOSE
                      - HNX
                      - UPCOM
                    required: true
                  - name: t
                    type: string
                    description: Ngày giao dịch, định dạng `YYYY/MM/DD`.
                    required: true
                  - name: ce
                    type: string
                    description: Giá trần.
                    required: true
                  - name: fl
                    type: string
                    description: Giá sàn.
                    required: true
                  - name: ref
                    type: string
                    description: Giá tham chiếu.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - channel
            - topic
            - data
          properties:
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-147>
            topic:
              type: string
              pattern: ^market\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)$
              x-parser-schema-id: <anonymous-schema-148>
            data:
              type: object
              additionalProperties: false
              required:
                - s
                - b
                - t
                - ce
                - fl
                - ref
              properties:
                s:
                  type: string
                  description: Mã chứng khoán.
                  x-parser-schema-id: <anonymous-schema-150>
                b:
                  type: string
                  enum:
                    - HOSE
                    - HNX
                    - UPCOM
                  description: Sàn giao dịch.
                  x-parser-schema-id: <anonymous-schema-151>
                t:
                  type: string
                  description: Ngày giao dịch, định dạng `YYYY/MM/DD`.
                  x-parser-schema-id: <anonymous-schema-152>
                ce:
                  type: string
                  description: Giá trần.
                  x-parser-schema-id: <anonymous-schema-153>
                fl:
                  type: string
                  description: Giá sàn.
                  x-parser-schema-id: <anonymous-schema-154>
                ref:
                  type: string
                  description: Giá tham chiếu.
                  x-parser-schema-id: <anonymous-schema-155>
              x-parser-schema-id: <anonymous-schema-149>
          x-parser-schema-id: <anonymous-schema-146>
        title: Cập nhật thông tin thị trường
        description: Giá trần, giá sàn và giá tham chiếu đầu ngày.
        example: |-
          {
            "channel": "DATA",
            "topic": "market.SSI",
            "data": {
              "s": "SSI",
              "b": "HOSE",
              "t": "2026/07/29",
              "ce": "48.50",
              "fl": "42.10",
              "ref": "45.30"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
      - &ref_5
        id: sessionFlag
        contentType: application/json
        payload:
          - name: Cờ phiên giao dịch
            description: Thông tin trạng thái phiên giao dịch.
            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: b
                    type: string
                    description: Sàn hoặc thị trường.
                    enumValues:
                      - HOSE
                      - HNX
                      - UPCOM
                      - DERIVATIVES
                    required: true
                  - name: t
                    type: string
                    description: Thời gian giao dịch, định dạng `YYYY/MM/DD HH:mm:ss`.
                    required: true
                  - name: f
                    type: string
                    description: Cờ phiên, ví dụ `ATO`, `LO`, `ATC`.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          additionalProperties: false
          required:
            - channel
            - topic
            - data
          properties:
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-157>
            topic:
              type: string
              pattern: ^market\.(index|exchange|[A-Za-z0-9_-]+(?:-[A-Za-z0-9_-]+)*|\*)$
              x-parser-schema-id: <anonymous-schema-158>
            data:
              type: object
              additionalProperties: false
              required:
                - b
                - t
                - f
              properties:
                b:
                  type: string
                  enum:
                    - HOSE
                    - HNX
                    - UPCOM
                    - DERIVATIVES
                  description: Sàn hoặc thị trường.
                  x-parser-schema-id: <anonymous-schema-160>
                t:
                  type: string
                  description: Thời gian giao dịch, định dạng `YYYY/MM/DD HH:mm:ss`.
                  x-parser-schema-id: <anonymous-schema-161>
                f:
                  type: string
                  description: Cờ phiên, ví dụ `ATO`, `LO`, `ATC`.
                  x-parser-schema-id: <anonymous-schema-162>
              x-parser-schema-id: <anonymous-schema-159>
          x-parser-schema-id: <anonymous-schema-156>
        title: Cờ phiên giao dịch
        description: Thông tin trạng thái phiên giao dịch.
        example: |-
          {
            "channel": "DATA",
            "topic": "market.SSI",
            "data": {
              "b": "HOSE",
              "t": "2026/07/29 09:00:00",
              "f": "ATO"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionFlag
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: marketStream
  - &ref_1
    id: onMarketSubscription
    title: Đăng ký luồng thị trường
    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-137>
            channel:
              type: string
              const: DATA
              x-parser-schema-id: <anonymous-schema-138>
            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-140>
              x-parser-schema-id: <anonymous-schema-139>
          x-parser-schema-id: <anonymous-schema-136>
        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
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: marketStream
securitySchemes: []

````

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