@openpit/engine - embeddable pre-trade risk SDK as a WebAssembly engine for
Node, browsers, Deno, Bun, and edge runtimes.
The root entry mirrors the SDK facade: the engine, its staged builder, the
wasm initialization hooks, and the typed OpenpitError hierarchy.
Everything else lives under a subpath that mirrors the SDK module tree:
@openpit/engine/param - value types, identifiers, and enums.
@openpit/engine/core - global instrument reference data.
@openpit/engine/model - order, execution-report, and adjustment models.
@openpit/engine/pretrade - pipeline handles, results, contexts, and the
custom-policy contract.
@openpit/engine- embeddable pre-trade risk SDK as a WebAssembly engine for Node, browsers, Deno, Bun, and edge runtimes.The root entry mirrors the SDK facade: the engine, its staged builder, the wasm initialization hooks, and the typed OpenpitError hierarchy. Everything else lives under a subpath that mirrors the SDK module tree:
@openpit/engine/param- value types, identifiers, and enums.@openpit/engine/core- global instrument reference data.@openpit/engine/model- order, execution-report, and adjustment models.@openpit/engine/pretrade- pipeline handles, results, contexts, and the custom-policy contract.@openpit/engine/pretrade/policies- built-in policy builders.@openpit/engine/marketdata- the live market-data service.@openpit/engine/reject- rejects, reject codes, and account-block types.@openpit/engine/accountadjustment- adjustment outcome types.@openpit/engine/accounts- the account registry handle.@openpit/engine/tx- the commit/rollback mutation pair.The published package ships two platform builds that share this surface:
node/): reads the sibling.wasmfrom disk and instantiates synchronously at import.browser/): instantiates from base64-inlined wasm synchronously at import (nofetch, nofs).Both default to zero-await usage:
For environments that forbid synchronous wasm compilation,
await ready(orawait ensureInit()) before touching any class.