OHLCV candlestick, normalized across all exchanges.
Prices are decimals (0.0 to 1.0). Timestamp is the period START (not end).
Serialized over the wire as RFC3339 (DateTime) for API consistency.
Fixed-point price representation. 1 tick = 0.0001 (scale factor 10,000).
Eliminates f64 comparison issues (no PRICE_EPSILON), enables Ord (no NaN),
and uses integer arithmetic (1-5ns vs 20-100ns for f64 ops).
Insert a price level into a bid-sorted (descending) list.
Binary-search for the insert position (O(log n)), then Vec::insert
(O(n) memcpy shift on average). Net O(log n + n) per op vs the old
push+sort’s O(n log n). Equal-price entries go AFTER existing entries.
Sort price levels in ascending order (lowest price first) – ask side ordering.
Uses integer comparison via FixedPrice::Ord (no partial_cmp/NaN handling).
Sort price levels in descending order (highest price first) – bid side ordering.
Uses integer comparison via FixedPrice::Ord (no partial_cmp/NaN handling).