> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oms.verolabs.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming API

> Kênh WebSocket cho cập nhật thời gian thực của Vero OMS

<div style={{ width: '100%', height: 240, marginBottom: 32, borderRadius: 16, overflow: 'hidden', position: 'relative' }}>
  <video style={{ width: '100%', height: '100%', objectFit: 'cover' }} autoPlay loop muted playsInline>
    <source src="https://mintcdn.com/vero-8996ea10/hu9QdVlMC-7-ZuH_/images/bg_video.mp4?fit=max&auto=format&n=hu9QdVlMC-7-ZuH_&q=85&s=aebece46bb35649a673a523819eb1a56" type="video/mp4" data-path="images/bg_video.mp4" />
  </video>
</div>

Vero OMS Streaming API dùng WebSocket cho publication dữ liệu thị trường, lệnh, tài khoản và thông báo.

<CardGroup cols={3}>
  <Card title="Kênh streaming" icon="tower-broadcast">
    Subscribe cập nhật market, order, account và notification theo thời gian thực.
  </Card>

  <Card title="WebSocket URL" icon="tower-broadcast">
    `wss://streaming.verolabs.co/connection/websocket`
  </Card>

  <Card title="Độ phủ" icon="diagram-project">
    8 channel pattern có trong phần tham chiếu Streaming API.
  </Card>
</CardGroup>

## Luồng client

<Steps>
  <Step title="Kết nối">
    Mở kết nối WebSocket tới streaming server.
  </Step>

  <Step title="Subscribe">
    Subscribe vào channel pattern tương ứng với tài khoản, mã giao dịch hoặc loại thông báo cần nhận.
  </Step>

  <Step title="Xử lý publication">
    Decode publication JSON UTF-8 và route theo channel cùng payload schema.
  </Step>
</Steps>
