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
//! Order-book types shared between the spline WSS feed and the Phoenix CLOB L2
//! stream.
/// Origin of a [`BookRow`] entry: Phoenix on-chain splines or CLOB L2 from the
/// Phoenix WS feed. Tracked per-trader inside a row so a price level shared
/// between sources can still mark the user's CLOB-resting orders.
/// Unified row for the coalesced book display. Splines are abstracted into
/// point quotes at their most aggressive price (`price_start` of the spline
/// region) so the table reads as a normal CLOB. Multiple traders quoting the
/// same price level are merged into a single row, with their pubkey prefixes
/// retained in `traders` for display and user-order detection.
/// Sorted, coalesced (splines + CLOB) view of the active market's book.
/// One CLOB level: `(price, size, trader)` where `trader` is a short pubkey
/// prefix for the resting order's owner, or a placeholder if the
/// `GlobalTraderIndex` hasn't resolved that pointer yet. Multiple entries can
/// share a price when different traders have orders at the same tick.
pub type ClobLevel = ;
/// Full L2 snapshot emitted by the Phoenix L2 task; `symbol` must match the
/// poller's active market before applying.