即時報價看板

<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 筆 tick,儲存格隨變動閃爍,支援分組、樞紐分析與匯出 Excel。

各列原地跳動;行情變動時也能排序、篩選與分組。

API: bo-grid