Skip to main content
Use OrderbookEngine when your application needs a current local book. Enable PN1 integrity for price-sensitive decisions so gaps and checksum mismatches fail closed.
PN1 keeps orderbook prices and sizes as exact decimal strings. It validates the full-snapshot anchor, then validates sequence continuity and a deterministic checksum on each applicable update. The managed state moves through initializing, ready, stale, resyncing, and failed. With allowStaleReads: false, reads are unavailable until a verified anchor is ready and become unavailable again after a disconnect or integrity failure. The client requests a fresh anchor before returning to ready.
Wildcard "*" subscriptions are intentionally unavailable in integrity mode. Subscribe with explicit token IDs, slugs, or condition IDs so every verified book has a bounded identity and anchor.

Filtered views

Raw messages

Use pn.configureOrderbook({ integrity: true }) when you want protocol messages without managed local state:

Cleanup

See the shared orderbook guide and PN1 protocol reference.