实时行情报价板
代码
阅读文档 →<script lang="ts">
import { Grid, type GridApi } from 'bo-grid'
import { createTickStream } from 'bo-grid/realtime'
let rows = $state.raw(quotes) // one plain object per symbol
let api: GridApi
// Ticks coalesce to one patch a frame; only the changed cells repaint.
const stream = createTickStream({ apply: (batch) => api.patchRows(batch) })
feed.subscribeQuotes(symbols, (qs) => qs.forEach((q) => stream.push(q.symbol, q)))
stream.start()
</script>
<Grid {rows} {columns} getRowId={(r) => r.symbol} flashMotion="hold"
onReady={(a) => (api = a)} />● 模拟行情数据,在你的浏览器中生成
适用于任何交易所的实时报价板:1,000 个品种、每秒 30,000 笔行情,单元格随变化闪烁,支持分组、透视和导出 Excel。
各行原地刷新;行情变动时也能排序、筛选和分组。
API: bo-grid


