Skip to content
zhou.
Forum

[Release v0.5.0] Unify the data input interface

zhouzhouzhouzhouNowQuant Book (NQBook)10 Sept 2026

nqbook v0.5.0

Released 2026-09-09.

Cancels become their own wire record, L2 mode moves into the config file, a book snapshot narrows to the best level, and the service logs through spdlog instead of raw printf.

  • OnCancel() takes a nlib::cancel record, not an order's cancel_qty. nlib::order drops back to 80 bytes without the field, and the new record frames at 48 bytes behind cancel_tag (3). The orders Parquet file loses its cancel_qty column; a new cancels-*.parquet file gets one row per cancel, alongside the trades, levels, and books files.
  • nlib::order_action drops cancel and clear. OnOrder() switches on add and modify only now; a cancel always arrives as its own record, and there is no longer a clear record to replay a snapshot from.
  • nlib::snapshot_depth is 1, not 10. OnSnapshot() aggregates only the best bid and ask per instrument, so nlib::book shrinks with it: the books Parquet file's four price and quantity columns each hold one value per row instead of ten.
  • feed.l2 is a config.yaml tunable, not a command-line flag. nqbook takes no arguments at all now — main reads only config/config.yaml, and neither NQBOOK_FEED_ENDPOINT nor NQBOOK_METRICS_ENDPOINT overrides it.
  • Makefile and .vscode/ add a second way to reach the dev container. make up starts a long-lived book-dev container over the working tree, make shell opens a shell in it, and make build configures and builds inside it; .vscode/clangd-docker points clangd at docker exec -i book-dev clangd, so the editor resolves symbols against the container's toolchain.
  • Logging moves to spdlog, vendored under third_party/. Startup logs the version and every config value at info, a missing config file or a full queue logs a warn instead of going unnoticed, and a config or Arrow/Parquet error logs critical before abort() — replacing the single printf line main used to print on startup and the fprintf(stderr, ...) calls scattered through Config.cpp and ParquetWriter.cpp.
  • project(nqbook VERSION) defines NQBOOK_VERSION, so main can log the running build's version instead of hardcoding it in a log line.
  • nlib bumped to 1ab88a0 for the cancel record, the narrowed order_action, the depth-1 snapshot, and the NLIB_CACHE_LINE macro main now logs alongside the rest of the startup config.

Comments

Sign in to join the discussion.

No comments yet. Be the first.