Skip to main content

Crate tickvault

Crate tickvault 

Source
Expand description

tickvault: a full-depth crypto order book recorder.

The recorder exists to produce a dataset, and the dataset’s only real advantage over the free alternatives is that it is honest about its own holes. Every layer here is built so a gap can be detected, bounded in time, and reported, rather than smoothed over into a book that looks continuous and is not.

Reading order, roughly bottom up:

  • fixed exact decimals, because checksum validation cannot survive floats
  • book the L2 book, its crossed-book invariant, and Kraken’s CRC32
  • sequence five per-venue loss detectors, and what each cannot prove
  • venue the venue::Venue trait, six implementations, the capabilities
  • gap suspect windows and the report they feed
  • session the ingest loop that ties them together
  • store the Parquet archive, its manifest, and crash recovery
  • reconstruct rebuilding a book at an arbitrary instant
  • query streaming reads, aggregations, and paced replay

Reading an archive needs none of the capture half, so venue, transport, session, recorder and pipeline sit behind the default record feature. Turning it off leaves the book, the archive, reconstruction and queries, which is exactly the subset that compiles to wasm for the viewer.

Re-exports§

pub use clock::Clock;
pub use clock::ManualClock;
pub use clock::MonotonicClock;
pub use clock::Stamp;
pub use clock::Timestamps;
pub use error::Error;
pub use error::Result;
pub use fixed::Fixed;
pub use symbols::SymbolMapper;
pub use types::BookLevel;
pub use types::Side;
pub use types::Symbol;
pub use types::VenueId;
pub use types::VenueSymbol;

Modules§

book
The L2 order book and the invariants it must never violate silently.
clock
Receipt timestamps.
config
The deployment’s own description of itself.
error
Error type.
fixed
Exact fixed-point decimals for prices and quantities.
gap
Suspect windows and the gap report.
latency
Turning latency that is recorded into latency that is known.
limits
Rate limiting and subscription budgeting.
pipeline
Ingest to disk, with the backpressure decision made explicitly.
query
Querying the archive.
reconstruct
Rebuilding a book from the archive.
recorder
Raw frame capture.
sequence
Loss detection.
session
The ingest loop.
status
The recorder, answering for itself while it runs.
store
The Parquet archive.
supervise
Keeps every configured venue recording, and knows when one is not.
symbols
Symbol normalization.
transport
Sources of raw frames.
types
Identifiers shared by every venue.
venue
The venue abstraction.