NAUTILUS / RUST source 3eb18933
Pages

Overview

Relevant Rust source files

  • Cargo.toml
  • crates/core/src/lib.rs
  • crates/model/src/lib.rs
  • crates/system/src/kernel.rs
  • crates/backtest/src/node.rs
  • crates/live/src/node/mod.rs
  • crates/adapters/databento/src/lib.rs
  • crates/adapters/interactive_brokers/src/lib.rs

NautilusTrader is a Rust-native, event-driven engine for multi-asset trading systems. The workspace supplies domain types, clocks, messaging, cache and persistence contracts, data and execution engines, deterministic simulation, live orchestration, and provider adapters as composable crates. This edition documents those Rust crates directly; optional foreign-language bindings are outside its API surface.

System promise

The same model and engine contracts span research, simulation, and live operation. A QuoteTick, TradeTick, Bar, OrderAny, Position, or AccountState does not change meaning when it moves between a backtest and a live node. The environment changes clocks, clients, and execution venues—not the domain model.

Core properties follow from that design:

  • nanosecond timestamps through UnixNanos;
  • fixed-point Price, Quantity, and Money values;
  • topic and endpoint routing through the Rust MessageBus;
  • deterministic TestClock time in simulation and LiveClock time in production;
  • typed data, risk, execution, portfolio, and trader components;
  • optional durable cache, message-bus backing, streaming, and event-store facilities;
  • provider translation at adapter boundaries rather than inside the domain.

Crate topology

Layered Nautilus Rust crate dependency map from shared foundations through engines and system composition to backtest, live, Databento and Interactive Brokers.

nautilus-core owns low-level time, identity, correctness, collections, and shared primitives. nautilus-model owns market and trading semantics. nautilus-common owns clocks, messages, the message bus, cache contracts, logging, actors, and components. Higher crates compose those foundations rather than redefining them.

Execution contexts

BacktestNode and BacktestEngine consume historical data under deterministic time and simulated venues. LiveNode and LiveNodeBuilder compose live data clients, execution clients, reconciliation, and the kernel. Strategies and actors are registered with the trader and observe the same model values in either context.

The live boundary is intentionally narrow. A data adapter decodes provider messages into Nautilus instruments and market data. An execution adapter maps Nautilus commands to a broker and maps broker reports back into Nautilus events. Provider SDK types stop at that boundary.

Selected integrations

This reference covers only two adapter crates:

Adapter Role Distribution
nautilus-databento Historical and live institutional market data, DBN decoding, symbology, Arrow conversion Published crate
nautilus-interactive-brokers Interactive Brokers market data and live execution through TWS or IB Gateway Workspace crate, currently publish = false

Other adapter implementations in the upstream workspace are deliberately excluded. Their existence does not enlarge the dependency or support surface of this edition.

Build contract

The pinned workspace uses Rust edition 2024 and declares its minimum supported Rust version in the root Cargo.toml. Precision and subsystem behavior are controlled by Cargo features. Consumers should pin all Nautilus crates to one compatible release or one source revision; mixing unrelated revisions is unsafe because the crates share model and message contracts.

Use Getting Started for Cargo composition, Core Architecture for the engine graph, Backtesting System for deterministic simulation, and Live Trading System for production orchestration.