Sharded ingest
One owner per shard serializes its commits.
Order-book state, matching-engine telemetry and surveillance queries on one engine, with every trade and the state derived from it in one place.
The problem
An exchange runs three clocks at once: the matching engine emits fills and book deltas continuously, operations needs the state of every book and gateway right now, and compliance needs to reconstruct what the market looked like at a given point.
Splitting that across a tick store, a cache for book state and a warehouse for surveillance means three schemas and a reconciliation layer that itself becomes a failure source, with an audit trail that can disagree with the cache.
You want one engine that stores fills and deltas durably, keeps per-instrument book and gateway state, and answers surveillance queries over the same history in the same SQL.
Where NYXDB fits
Architecture
Fills and book deltas land in one durable table; keyed tables hold the latest state per instrument and gateway; transformations and grouped STREAM SELECT maintain the aggregates that operations and surveillance read.
Fills land in tables sharded by instrument; one owner per shard serializes its commits.
The latest row per (instrument, level) and per gateway, in UPSERT tables.
Grouped scans over durable history, and the market state at any past commit with AS OF COMMIT.
Per-instrument totals reach operations dashboards as fills commit, from a grouped STREAM SELECT.
In practice
The examples use the same two tables on every page. See the SQL reference for full syntax.
STREAM SELECT chain_id, token, SUM(amount) AS volume, COUNT(*) AS transfersFROM transfersGROUP BY chain_id, token;Capabilities
One owner per shard serializes its commits.
Latest row per instrument and gateway.
Reread any past market state, with AS OF COMMIT.
Changes reach operations dashboards as they commit, with STREAM SELECT.
Learn more
Explore market data & trading analytics or run a node.