VIZANIXSoftware · Automation · Design

ENGINEERING CASE · BTCUSDT perpetual · event-driven · L2

Microstructure Execution Engine

An event-driven engine on the L2 book, taker flow and liquidation context, where a gradient-boosted model is the decision engine rather than an indicator.

The task: Answer one question honestly: can order-book and flow context identify a short window where expected price impact exceeds real trading cost, with a stable out-of-sample expected value after fees, slippage and latency?

DELIVERY

What was built

  • Public WebSocket ingest of book, trades and liquidations
  • Feature engine on RAM ring buffers — no pandas anywhere in the hot loop
  • Three model heads: direction, maximum favourable excursion, maximum adverse excursion
  • Expected-value gate and aggressive-limit execution sized from that EV
  • Private order and execution WebSocket used for confirmation — an ACK is not a fill
  • Backtest with explicit latency and slippage grids, then paper against the live book
  • Telegram control plane over a Unix socket so the trading loop never blocks on a chat API

EVIDENCE

Engineering measurements

3model heads (direction, MFE, MAE)
5phases: collect → research → backtest → paper → live
12test modules on the engine
0pandas calls in the realtime loop

Figures describe software behaviour and come from the running system. Client identity, strategy parameters and financial results stay under NDA; the cover is a schematic, not a client screenshot.

THE HARD PART

What could not be hand-waved

The honest answer to the research question is often 'no'. A microstructure edge that survives in a naive backtest usually dies once latency and the fee schedule are applied, and an engine that cannot tell an acknowledgement from a fill will cheerfully report profit that never existed.

THE RESPONSE

How the risk was addressed

Costs are applied inside the backtest, not subtracted afterwards, and the same code path runs backtest, paper and live. Fills come from the private execution stream only. The documented rule is that if out-of-sample EV is not positive after fees, slippage and latency stress, the system does not trade — and that rule is enforced in code, not in a README.

START A PROJECT

Tell us what you want to build

A short description and one contact are enough. Do not send exchange keys, passwords or sensitive data.

Or contact us directly · @vx_ceo

Add an email or Telegram handle — at least one is required.