NautilusTrader
Getting Started
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.

Installation

NautilusTrader is officially supported for Python 3.12-3.14 on the following 64-bit platforms:

Operating SystemSupported VersionsCPU Architecture
Linux (Ubuntu)22.04 and laterx86_64
Linux (Ubuntu)22.04 and laterARM64
macOS15.0 and laterARM64
Windows Server2022 and laterx86_64

NautilusTrader may work on other platforms, but only those listed above are regularly used by developers and tested in CI.

NautilusTrader follows the Python support window in Scientific Python SPEC 0. Each Python minor version is supported for three years after its initial release. Support normally ends in the first NautilusTrader release after that window and after the replacement Python version passes compatibility checks.

Continuous CI coverage comes from the GitHub Actions runners we build on:

  • Linux (Ubuntu) builds currently pin to ubuntu-22.04 to keep glibc 2.35 compatibility even as ubuntu-latest moves ahead.
  • macOS (ARM64) builds run on macos-latest, so support tracks that runner image as it moves ahead.
  • Windows (x86_64) builds currently pin to windows-2022 to keep the toolchain stable.

On Linux, confirm your glibc version with ldd --version and ensure it reports 2.35 or newer before proceeding.

We recommend using the latest supported version of Python and installing nautilus_trader inside a virtual environment to isolate dependencies.

There are two supported ways to install:

  1. Pre-built binary wheel from PyPI or the Nautech Systems package index.
  2. Build from source.

We highly recommend installing using the uv package manager with a "vanilla" CPython.

Conda and other Python distributions may work but aren't officially supported.

From PyPI

To install the latest nautilus_trader binary wheel (or sdist package) from PyPI:

uv pip install nautilus_trader

Release-candidate wheels

NautilusTrader publishes release‑candidate wheels to PyPI using 2.0.0rcN versions while final validation is in progress.

uv pip install --pre nautilus_trader

The --pre flag is required because these wheels are pre-release builds. The installed import name is still nautilus_trader.

Run this command outside a NautilusTrader source checkout. The repository root uses an exclude-newer uv policy for reproducible development, which can filter out newly published wheels. Inside a source checkout, use Build Python from source instead.

Current wheels target Python 3.12-3.14. Build from source when you need local Rust changes, a debug build, or a platform wheel that is not available.

Extras

Install the optional dependencies for Plotly‑based interactive tearsheets and charts with the visualization extra:

uv pip install "nautilus_trader[visualization]"

From the Nautech Systems package index

The Nautech Systems package index (packages.nautechsystems.io) complies with PEP-503 and hosts both stable and development binary wheels for nautilus_trader. This enables users to install either the latest stable release or pre-release versions for testing.

Stable wheels

Stable wheels correspond to official releases of nautilus_trader on PyPI, and use standard versioning.

To install the latest stable release:

uv pip install nautilus_trader --index-url=https://packages.nautechsystems.io/simple

Use --extra-index-url instead of --index-url if you want uv to fall back to PyPI automatically.

Development wheels

The main package index publishes development wheels from both the nightly and develop branches, allowing users to test features and fixes ahead of stable releases.

This process also helps preserve compute resources and provides easy access to the exact binaries tested in CI pipelines, while adhering to PEP-440 versioning standards:

  • develop wheels use the version suffix .devYYYYMMDD+run.
  • nightly wheels use .devYYYYMMDD when the base version is already a pre‑release, and aYYYYMMDD otherwise.
PlatformDevelopNightly
Linux (x86_64)
Linux (ARM64)-
macOS (ARM64)-
Windows (x86_64)-

We do not recommend using development wheels in production environments, such as live trading controlling real capital.

By default, uv will install the latest stable release. Adding the --pre flag ensures that pre-release versions, including development wheels, are considered.

To install the latest available pre-release (including development wheels):

uv pip install nautilus_trader --pre --index-url=https://packages.nautechsystems.io/simple

The installed import name is still nautilus_trader. Run this command outside a NautilusTrader source checkout so the repository's exclude-newer uv policy does not filter out newly published wheels. Build from source when you need local Rust changes, a debug build, or a platform wheel that is not available.

Available versions

You can view all available versions of nautilus_trader on the package index.

To programmatically request and list available versions:

curl -s https://packages.nautechsystems.io/simple/nautilus-trader/index.html | grep -oP '(?<=<a href=")[^"]+(?=")' | awk -F'#' '{print $1}' | sort

Branch updates

  • develop branch wheels (.devYYYYMMDD+run): Build and publish continuously with every merged commit.
  • nightly branch wheels (.devYYYYMMDD or aYYYYMMDD): Build and publish daily when we automatically merge the develop branch at 14
    UTC
    (if there are changes).

Retention policies

  • develop branch wheels: We retain only the most recent wheel build.
  • nightly branch wheels: We retain only the 30 most recent publication dates per platform.

Verifying build provenance

All release artifacts published by the project carry cryptographic attestations generated by the CI/CD pipeline:

  • Python wheels and source distribution (PyPI, GitHub Releases, Nautech Systems package index): SLSA build provenance.
  • Docker images (ghcr.io/nautechsystems/nautilus_trader, ghcr.io/nautechsystems/jupyterlab): keyless cosign signatures plus SPDX SBOM attestations.

Both are issued via Sigstore and bound to a specific commit SHA, so verification ensures the artifact was produced by the official NautilusTrader GitHub Actions workflow and has not been tampered with since.

For step-by-step verification commands, see Verifying releases in SECURITY.md.

Verification requires the GitHub CLI (gh) for Python artifacts and cosign for Docker images. Development wheels from develop and nightly branches are also attested.

From source

It's possible to install from source using pip if you first install the build dependencies as specified in the pyproject.toml.

Install rustup

Install rustup (the Rust toolchain installer):

curl https://sh.rustup.rs -sSf | sh

Verify: rustc --version

Enable cargo

Enable cargo in the current shell:

source $HOME/.cargo/env

Install clang

Install clang (a C language frontend for LLVM). On Linux this also installs lld, which is configured as the Rust linker for faster builds:

sudo apt-get install clang lld

Verify: clang --version

Install uv

Install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Clone and sync dependencies

Clone the source with git, then sync its dependencies from the project root:

git clone --branch develop --depth 1 https://github.com/nautechsystems/nautilus_trader
cd nautilus_trader
make sync

For development hosts and CI runner images, see the single source of truth for versions before installing pinned tools.

The --depth 1 flag fetches just the latest commit for a faster, lightweight clone.

Install Cap'n Proto for development

Install Cap'n Proto if you plan to enable the capnp Rust feature, regenerate serialization schemas, or work on serialization code. Use the repository script on Linux or macOS to install the pinned version from tools.toml:

./scripts/install-capnp.sh

Verify: capnp --version

Cap'n Proto is a development dependency. It is not required when installing pre-built wheels.

Set environment variables

Set environment variables for PyO3 compilation (Linux and macOS only). Run these commands from the repository root after make sync:

# Set the Python executable path for PyO3
export PYO3_PYTHON="$PWD/.venv/bin/python"

# Linux only: Set the library path for the uv-managed Python runtime
PYTHON_LIB_DIR="$("$PYO3_PYTHON" -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')"
export LD_LIBRARY_PATH="$PYTHON_LIB_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

# Required for Rust tests when using uv-installed Python
export PYTHONHOME="$("$PYO3_PYTHON" -c 'import sys; print(sys.base_prefix)')"

The LD_LIBRARY_PATH export is Linux-specific and not needed on macOS.

The PYTHONHOME variable is required when running make cargo-test with a uv-installed Python. Without it, tests that depend on PyO3 may fail to locate the Python runtime.

Build Python from source

This path builds the PyO3 package from the python/ directory and installs it into the root .venv. Use it from a NautilusTrader source checkout when a development wheel is not available for your platform or when you need local Rust changes.

From the repository root:

make build-debug

This target syncs .venv, builds the Rust extension with maturin, and regenerates Python type stubs. It uses target/ for Cargo artifacts.

Run a Python example with the project environment:

.venv/bin/python examples/live/lighter/data_tester.py

The script connects to the Lighter testnet and starts streaming market data; stop it with Ctrl+C.

For direct commands and test targets, see the Python package README.

From GitHub release

To install a binary wheel from GitHub, first navigate to the latest release. Download the appropriate .whl for your operating system and Python version, then run:

uv pip install <file-name>.whl

Versioning and releases

NautilusTrader is still under active development. Some features may be incomplete, and while the API is becoming more stable, breaking changes can occur between releases. We strive to document these changes in the release notes on a best-effort basis.

We aim to follow a bi-weekly release schedule, though experimental or larger features may cause delays.

Use NautilusTrader only if you are prepared to adapt to these changes.

Redis

Using Redis with NautilusTrader is optional and only required if configured as the backend for a cache database or message bus.

The minimum supported Redis version is 6.2 (required for streams functionality).

For a quick setup, we recommend using a Redis Docker container. You can find an example setup in the .docker directory, or run the following command to start a container:

docker run -d --name redis -p 6379:6379 redis:latest

This command will:

  • Pull the latest version of Redis from Docker Hub if it's not already downloaded.
  • Run the container in detached mode (-d).
  • Name the container redis for easy reference.
  • Expose Redis on the default port 6379, making it accessible to NautilusTrader on your machine.

To manage the Redis container:

  • Start it with docker start redis
  • Stop it with docker stop redis

We recommend using Redis Insight as a GUI to visualize and debug Redis data efficiently.

Precision mode

NautilusTrader supports two precision modes for its core value types (Price, Quantity, Money), which differ in their internal bit-width and maximum decimal precision.

  • High-precision: 128-bit integers with up to 16 decimals of precision, and a larger value range.
  • Standard-precision: 64-bit integers with up to 9 decimals of precision, and a smaller value range.

By default, the official Python wheels ship in high‑precision (128‑bit) mode on all supported platforms.

For pure Rust crates, high-precision works on all platforms (including Windows) since Rust handles i128/u128 via software emulation. The default is standard-precision unless you explicitly enable the high-precision feature flag.

The performance tradeoff is that standard-precision is ~3-5% faster in typical backtests, but has lower decimal precision and a smaller representable value range.

Performance benchmarks comparing the modes are pending.

Build configuration

The precision mode is selected at compile time through the high-precision Rust feature flag. The Python package enables this flag in the maturin build features (see python/pyproject.toml), so source builds default to high-precision. For a standard-precision (64-bit) Python build, remove high-precision from the maturin feature list, then build as usual:

make build-debug

Rust feature flag

To enable high-precision (128-bit) mode in Rust, add the high-precision feature to your Cargo.toml:

[dependencies]
nautilus-core = { version = "*", features = ["high-precision"] }

See the Value Types specifications for more details.

On this page