1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// SPDX-License-Identifier: MIT
//! # fin-stream
//!
//! Lock-free streaming primitives for real-time financial market data.
//!
//! ## Architecture
//!
//! ```text
//! Tick Source
//! |
//! v
//! SPSC Ring Buffer (lock-free, zero-allocation hot path)
//! |
//! v
//! OHLCV Aggregator (streaming bar construction at any timeframe)
//! |
//! v
//! MinMax Normalizer (rolling-window coordinate normalization)
//! |
//! +---> Lorentz Transform (spacetime boost for feature engineering)
//! |
//! v
//! Downstream (ML model, trade signal engine, order management)
//! ```
//!
//! ## Performance
//!
//! The SPSC ring buffer sustains 100 K+ ticks/second with no heap allocation
//! on the fast path. All error paths return `Result<_, StreamError>` — the
//! library never panics on the hot path. Construction functions validate their
//! arguments and panic on misuse with a clear message (e.g. ring capacity of 0,
//! normalizer window size of 0).
//!
//! ## Modules
//!
//! | Module | Responsibility |
//! |--------|----------------|
//! [`book`] | Order book delta streaming and crossed-book detection |
//! [`error`] | Typed error hierarchy (`StreamError`) |
//! [`health`] | Feed staleness detection and circuit-breaker |
//! [`lorentz`] | Lorentz spacetime transforms for time-series features |
//! [`norm`] | Rolling min-max coordinate normalization |
//! [`ohlcv`] | OHLCV bar aggregation at arbitrary timeframes |
//! [`ring`] | SPSC lock-free ring buffer |
//! [`session`] | Market session and trading-hours classification |
//! [`tick`] | Raw-to-normalized tick conversion for all exchanges |
//! [`ws`] | WebSocket connection management and reconnect policy |
pub use ;
pub use StreamError;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;