Skip to content
Apache-2.0 · C++20 · Live / Backtest Parity

All of Binance's live market data on a $100 server.

KeronisEngine is an open-source C++20 trading engine that processes 10,000+ market messages/sec with continuous streaming state-machine features and in-process ONNX Runtime inference—running the exact same strategy and feature code across training, backtesting, paper trading, and live venues.

10,000+ msg/s
Full-exchange live feeds with continuous streaming features & ONNX scoring
~$100 / mo
Runs on a single commodity dedicated server (e.g. Hetzner)
~1.5 ns / op
RingBufferBook::apply_bid under strict IEEE-754 flags (Core Ultra 9 285K)
Zero Skew
Same C++ StrategyStateMachine in offline Parquet gen, backtest & live
Run a Backtest in One Command
# Run the core C++ test suite (225 test cases)
docker run --rm ghcr.io/jneuvonen/keronisengine:latest trading_engine_tests

# Run the bundled SMA crossover backtest (emits summary.json, trades.json, equity_curve.json)
docker run --rm ghcr.io/jneuvonen/keronisengine:latest \
  ./examples/quickstart_backtest/run.sh /src/build/bin/backtest_runner
Built for Production, Not Toy Demos

RingBufferBook

Flat tick-indexed ring with 16-byte POD slots, occupancy bitmap + __builtin_ctzll depth walks, lazy OS page commitment, and runtime window sizing (19-bit CEX / 10-bit Polymarket).

Streaming State Machines + ONNX

7 bundled C++ state machines (including six_venue_order and global_bba) shared across historical_feature_gen, backtest_runner, and live_infra with in-process ONNX Runtime inference.

Realistic PaperExchange

Evaluates orders as taker at ack + latency, fills resting remainders as maker against quotes and subsequent prints, and stops fills immediately on cancel. Polymarket backtests also model queue notional.

Crash-Safe QuoteHolds

Quote pulls are durable state—not transient commands—so a restarted engine comes back with resting entries still pulled, backed by a quote_guard staleness heartbeat and graceful SIGTERM sweeps.

Zero-Fork Plugin Registry

Keep proprietary alpha in your own repo. Register strategies with KERONIS_REGISTER_STRATEGY and state machines with KERONIS_REGISTER_STATE_MACHINE via -DKERONIS_STRATEGY_DIRS.

MPFR Precision & Native Venues

Clean-room Apache-2.0 mpreal over shared-linked MPFR/GMP, strict -fno-fast-math, native clients for Hyperliquid (Rust signer), Aster, and Polymarket, plus Lighter L2 books.

Building with AI agents? Point your coding agent at https://engine.keronis.ai/llms.txt or ingest the entire docs in one fetch via https://engine.keronis.ai/llms-full.txt.
Browse Full Docs →