finds.dev← search

// the find

OctopusTakopi/binance_l3_est

★ 237 · Rust · MIT · updated Apr 2026

Uses L2 data's change in time to estimate a L3 order book microstructure on Binance

A Rust terminal/GUI tool that ingests Binance L2 WebSocket depth streams and reconstructs a synthetic L3 order book by tracking order-level queue seniority across updates. Aimed at HFT researchers and quant traders who want to study microstructure without access to actual L3 feed data.

The core estimation approach is genuinely interesting — using L2 delta sequences to infer order priority is a real technique used in production microstructure research. The benchmark suite (three separate criterion benches for order book ops) suggests the author actually measured performance rather than guessing. SIMD queue implementation (`simd_queue.rs`) and a dedicated fast path (`fast_order_book.rs`) show awareness of where latency actually comes from. The TWAP detector analyzing periodic trade patterns is a useful practical feature — spotting execution algos is hard and the approach here (frequency + volume clustering) is reasonable.

L3 reconstruction from L2 is fundamentally an estimation with known failure modes: order splitting, iceberg orders, and queue jumps all break the seniority model silently. There's no documentation on how the estimation handles these edge cases or what the error rate looks like in practice. The K-Means clustering runs on live data with no obvious parameter tuning interface beyond what's in the UI — cluster count appears hardcoded, which will give garbage results in different market regimes. Binance-only: the network layer speaks Binance's SBE protocol directly, so there's no path to using this on any other venue without a rewrite. No persistence or replay — you can't record a session and re-analyze it offline, which limits usefulness for backtesting hypotheses you noticed in the live view.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →