obwasm

command
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Command obwasm compiles the matching engine to WebAssembly and exposes a small JSON API to JavaScript, so the browser demo and the live console run the *real* engine rather than a reimplementation (docs/DEMO-SPEC.md §3, docs/CONSOLE-SPEC.md).

The engine works in integer ticks/lots; this bridge stays decimal-facing for JavaScript, converting at an Instrument boundary (cent ticks, milli lots) so the front-end keeps sending and receiving human decimals.

Everything the console shows is computed HERE, by the shipping library code — sim.NoiseTrader drives the flow, pkg/signals computes OFI/CVD/imbalance/λ, pkg/surveillance watches every event. The page is a renderer; if a panel lies, the library lies.

Build: GOOS=js GOARCH=wasm go build -o web/obook.wasm ./cmd/obwasm

JS globals installed: obReset(seedOrSymbol), obSubmit(user,side,type,price,qty), obSnapshot(depth), obStep(n), obSignals(), obAlerts(since), obCancel(id,user), obSpoof(), obFlood(), obOpenOrders(user). Each returns a JSON string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL