Skip to content

feat: order flow, WebGL2 rendering, and extension points - #41

Merged
joeblau merged 1 commit into
mainfrom
feat/order-flow-webgl
Sep 30, 2026
Merged

joeblau merged 1 commit into
mainfrom
feat/order-flow-webgl

Conversation

@joeblau

@joeblau joeblau commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the order-flow stack and a WebGL2 backend to @bloxwap/chart, and rebuilds the landing-page playground around them.

Refs #33, #34, #35, #36, #37, #38, #39, #40

Library

Playground / landing page

  • Header controls move into the left rail (timeframe, chart type, indicators, Auto/%/Log). A right-edge disclosure picks the volume profile, the full order book, or none.
  • The order book comes from Hyperliquid l2Book. Binance REST returns HTTP 451 from the US. The feed stitches two precisions for full depth and uses the bbo feed for the true spread.
  • WebGL2 is on by default; ?renderer=canvas2d compares against Canvas2D.
  • The mark-price, last-close and heatmap overlays are settings toggles, off by default.

Test plan

  • npm run coverage: 1849 tests pass, 100% line/branch/function coverage on every file
  • Landing page (docs dev server) checked in Chrome at 1m, 15m and 4h:
    • WebGL2 backend active; live Hyperliquid book (38 levels a side stitched); true spread label (Δ 1.0)
    • Right-edge disclosure switches profile / book / none; profile tweens on zoom
    • Rail controls work; autoscale holds while panning
  • Spot-check light theme and a narrow (<600px) viewport

🤖 Generated with Claude Code

Adds the order-flow stack and a WebGL2 backend to @bloxwap/chart, and
rebuilds the landing-page playground around them.

Library:
- Extension points: series registry, host panes (stacked/docked) and
  pane primitives drawn behind or above the series.
- Depth: DepthBook model, maintained L2 book manager (snapshot + diff
  deltas, gap resync, retry backoff) and the datafeed depth channel.
- Inline order book: ladder or mirrored layout, docked or overlaid on
  the plot edge, theme-token colors, side-colored labels, bold best
  levels, per-row label culling and an optional true-spread label.
- Liquidity heatmap with multi-stop color ramps; trade tape, trade
  prints, footprint series and delta/CVD indicators; session volume
  profile/TPO pane.
- Visible-range volume profile: round-price rows sized to the screen,
  mirrored up/down volume, POC outline, theme tokens and tweened
  transitions on a frame scheduler.
- WebGL2 renderer (renderer: 'webgl2') with automatic Canvas2D fallback.
- chart.scale.scrollPrice and vertical plot panning while autoscale is
  off; new range-profile and order-book icons.
- Fix: a throwing onBook no longer strands buffered depth deltas.

Playground / landing page:
- Controls move from the header into the left rail; a right-edge
  disclosure picks the volume profile, the full order book, or none.
- Order book from Hyperliquid l2Book (Binance REST is geo-blocked),
  stitching two precisions for full depth plus the bbo feed for the
  true spread; WebGL2 on by default (?renderer=canvas2d to compare).
- Mark, last-close and heatmap overlays are settings toggles, off by
  default.

Test suite: 1849 tests, 100% line/branch/function coverage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@joeblau
joeblau merged commit be0c27b into main Sep 30, 2026
4 checks passed
@joeblau
joeblau deleted the feat/order-flow-webgl branch September 30, 2026 02:12
joeblau added a commit that referenced this pull request Sep 30, 2026
- Set @bloxwap/chart (and the workspace apps) to 0.2.0 for the order-flow
  and WebGL2 release (#41)
- Landing page: the hero, playground intro and third feature card now
  cover live order books, volume profiles, heatmaps, footprint and WebGL2
- Docs, README, llms.txt, OpenAPI and the site's structured data name
  0.2.0; llms.txt and the structured-data description gain order flow

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant