Một lần khớp lệnh trực tiếp từ watch().
interface Tick {
symbol: string;
price: number; // đồng
change: number; // so với tham chiếu, đồng
changePct: number; // phần trăm
volume: number; // khối lượng luỹ kế của phiên
value: number; // giá trị luỹ kế của phiên, đồng
bids: { price: number; volume: number }[];
asks: { price: number; volume: number }[];
side: "buy" | "sell" | null; // chiều của lệnh khớp; null ở chế độ poll
time: string; // lúc nhận tick, giờ Việt Nam
source: "stream" | "poll";
}
Nhận trong callback của vn.watch() và vn.stock(symbol).watch().
{
"symbol": "FPT", "price": 57600, "change": 500, "changePct": 0.876,
"volume": 3304500, "value": 189120000000,
"bids": [{ "price": 57500, "volume": 12000 }], "asks": [{ "price": 57600, "volume": 3500 }],
"side": "buy", "time": "2026-10-20T10:41:05+07:00", "source": "stream"
}
RealtimeQuote và realtime.create() đã bỏ. matched.price thành price, matched.changePercent (phân số) thành changePct (phần trăm), totalVolume/totalValue thành volume/value, bidPrices/askPrices thành bids/asks. Xem Theo dõi & cảnh báo.