docs/concepts/overview.md
NautilusTrader is an open-source, production-grade, Rust-native engine for multi-asset, multi-venue trading systems.
The system spans research, deterministic simulation, and live execution within a single event-driven architecture, with Python serving as the control plane for strategy logic, configuration, and orchestration.
This separation provides the performance and safety of a compiled trading engine with the flexibility of Python for system composition and strategy development. Trading systems can also be written entirely in Rust for mission-critical workloads.
The same execution semantics and deterministic time model operate in both research and live systems. Strategies deploy from research to production with no code changes, providing research-to-live parity and reducing the divergence that typically introduces deployment risk.
NautilusTrader is asset-class-agnostic. Any venue with a REST API or WebSocket feed can be integrated through modular adapters. Current integrations span crypto exchanges (CEX and DEX), traditional markets (FX, equities, futures, options), and betting exchanges.
IOC, FOK, GTC, GTD, DAY, AT_THE_OPEN, AT_THE_CLOSE, advanced order types and conditional triggers. Execution instructions post-only, reduce-only, and icebergs. Contingency orders including OCO, OUO, OTO.Trading strategy research typically happens in Python using vectorized approaches, while production trading systems are built separately using event-driven architectures in compiled languages.
NautilusTrader removes this separation.
A Rust-native core provides a deterministic event-driven runtime for both research and live execution, while Python serves as the control plane. The same architecture, execution semantics, and time model operate across both environments, allowing strategies to move from research to production without reimplementation.
Python bindings are provided via PyO3, with an ongoing migration from Cython. No Rust toolchain is required at install time.
There are three main use cases for this software package:
backtest).sandbox).live).The codebase provides a framework for building the software layer of systems that achieve the above.
The default backtest and live system implementations live in their respectively named subpackages.
A sandbox environment can be built using the sandbox adapter.
:::note
:::
The platform integrates into larger distributed systems. Nearly all configuration and domain objects serialize using JSON, MessagePack, or Apache Arrow (Feather) for communication over the network.
The common system core is used by all node environment contexts (backtest, sandbox, and live).
User-defined Actor, Strategy and ExecAlgorithm components are managed consistently across these environment contexts.
Feed data to a BacktestEngine either directly or through a higher-level BacktestNode and
ParquetDataCatalog, then run the data through the system with nanosecond resolution.
A TradingNode ingests data and events from multiple data and execution clients, supporting both
demo/paper trading accounts and real accounts. Running asynchronously on a single
event loop provides high performance,
with the option to use the uvloop implementation
(available for Linux and macOS) for additional throughput.
The platform features a trading domain model that includes various value types such as
Price and Quantity, as well as more complex entities such as Order and Position objects,
which are used to aggregate multiple events to determine state.
All timestamps use nanosecond precision in UTC.
Timestamp strings follow ISO 8601 (RFC 3339) format with either 9 digits (nanoseconds) or 3 digits (milliseconds) of decimal precision, (but mostly nanoseconds) always maintaining all digits including trailing zeros. These can be seen in log messages, and debug/display outputs for objects.
A timestamp string consists of:
YYYY-MM-DD.T separator between date and time components.Z suffix.Example: 2024-01-05T15:30:45.123456789Z
For the complete specification, refer to RFC 3339: Date and Time on the Internet.
The platform uses Universally Unique Identifiers (UUID) version 4 (RFC 4122) for unique identifiers.
Our high-performance implementation uses the uuid crate for correctness validation when parsing from strings,
ensuring input UUIDs comply with the specification.
A valid UUID v4 consists of:
8-4-4-4-12 format.Example: 2d89666b-1a1e-4a75-b193-4eb3b454c757
For the complete specification, refer to RFC 4122: A Universally Unique Identifier (UUID) URN Namespace.
The following market data types can be requested historically, and also subscribed to as live streams when available from a venue / data provider, and implemented in an integrations adapter.
OrderBookDelta (L1/L2/L3)OrderBookDeltas (container type)OrderBookDepth10 (fixed depth of 10 levels per side)QuoteTickTradeTickBarInstrumentInstrumentStatusInstrumentCloseThe following PriceType options can be used for bar aggregations:
BIDASKMIDLASTThe following BarAggregation methods are available:
MILLISECONDSECONDMINUTEHOURDAYWEEKMONTHYEARTICKVOLUMEVALUE (a.k.a Dollar bars)RENKO (price-based bricks)TICK_IMBALANCETICK_RUNSVOLUME_IMBALANCEVOLUME_RUNSVALUE_IMBALANCEVALUE_RUNSAll listed aggregations are implemented for internal aggregation.
Information-driven aggregations require TradeTick data.
The price types and bar aggregations can be combined with step sizes >= 1 in any way through a BarSpecification.
This allows alternative bars to be aggregated for live trading.
The following account types are available for both live and backtest environments:
Cash single-currency (base currency)Cash multi-currencyMargin single-currency (base currency)Margin multi-currencyBetting single-currencyThe following order types are available (when possible on a venue):
MARKETLIMITSTOP_MARKETSTOP_LIMITMARKET_TO_LIMITMARKET_IF_TOUCHEDLIMIT_IF_TOUCHEDTRAILING_STOP_MARKETTRAILING_STOP_LIMITThe following value types are backed by either 128-bit or 64-bit raw integer values, depending on the precision mode used during compilation.
PriceQuantityMoneyWhen the high-precision feature flag is enabled (default), values use the specification:
| Type | Raw backing | Max precision | Min value | Max value |
|---|---|---|---|---|
Price | i128 | 16 | -17,014,118,346,046 | 17,014,118,346,046 |
Money | i128 | 16 | -17,014,118,346,046 | 17,014,118,346,046 |
Quantity | u128 | 16 | 0 | 34,028,236,692,093 |
When the high-precision feature flag is disabled, values use the specification:
| Type | Raw backing | Max precision | Min value | Max value |
|---|---|---|---|---|
Price | i64 | 9 | -9,223,372,036 | 9,223,372,036 |
Money | i64 | 9 | -9,223,372,036 | 9,223,372,036 |
Quantity | u64 | 9 | 0 | 18,446,744,073 |