Skip to content
zhou.
← Forum

NLib Release Note v0.2.0 2026-08-17

zhouzhouzhouzhouN-Lib18 Aug 2026

v0.2.0 — 2026-08-17

common.h grew into the vocabulary a live exchange feed needs. Every record changed layout, so consumers must be rebuilt together.

  • Event and receive time are separate. order and trade carry event_ns (exchange event time) and a trailing recv_ns stamped on receipt; book's time_ns is renamed event_ns and gains recv_ns. Feed latency is now measurable end to end. recv_ns is appended last, so every earlier offset is unchanged.
  • Quantities are fixed point in 1/qty_scale (1e-8) units — crypto quantities are fractional — and price_scale grows to 1e10. The pair covers Kraken's maximum 10 price and 8 lot decimals.
  • order_action gains modify and clear. modify sets a new remaining quantity and keeps queue priority while the price is unchanged; clear drops an instrument's resting orders ahead of a snapshot replay. cancel now means the order leaves the book outright — a partial cancel arrives as modify.
  • nlib::metrics, a 120-byte sample of a book pipeline's health: cumulative feed, book, and writer counters, the timed-apply latency accumulators, and instantaneous book gauges. Published unframed on a monitoring socket; nqbook's metrics thread is the producer.
  • Wire sizes are asserted (order 72, trade 64, book 344, metrics 120), so a layout change fails the build rather than the peer.
  • map::capacity() exposes the allocated slot count, letting a consumer account the table's memory — one value_type plus one control byte per slot — without reaching into the layout.

Comments

Sign in to join the discussion.

No comments yet. Be the first.