Getting Started
Set up a Python 3.12-3.14 environment and install the package:
pip install -U --pre nautilus_traderPyPI publishes NautilusTrader 2.x as 2.0.0rcN pre-releases. Include --pre until 2.0.0 is
released. Confirm the install with:
python -c "import nautilus_trader; print(nautilus_trader.__version__)"Installation
Platform support, package indexes, and building from source.
Quickstart
Run your first backtest in five minutes using synthetic data.
Choose your path
- Backtesting: learn the two API levels below, then work through the tutorials for strategy pattern walkthroughs.
- Live trading: see the Configure a live trading node how-to and Integrations for supported venues.
- Data workflows: see the how-to guides for loading external data and setting up the Parquet data catalog.
- Building adapters: see the Developer guide.
Backtesting API levels
NautilusTrader provides two API levels for backtesting:
| API level | Entry point | Best for |
|---|---|---|
| Low-level | BacktestEngine | Direct component access, library development |
| High-level | BacktestNode | Production workflows, easier transition to live trading (recommended) |
The high-level API requires a Parquet-based data catalog. The low-level API works with in-memory data but has no live-trading path.
One node per process
Running multiple BacktestNode or LiveNode instances concurrently in the same process is not
supported due to global singleton state. Sequential execution with proper disposal between runs is
supported. A replacement LiveNode on the same thread also requires dropping the previous node, or
releasing all references to it in Python, before construction.
See Processes and threads.
See the Backtesting guide for help choosing an API level.
Backtest (low-level API)
Backtest an EMA cross strategy with a TWAP execution algorithm on Binance trade ticks with BacktestEngine.
Backtest (high-level API)
Load raw data into the data catalog, then run a backtest with BacktestNode.
Examples
The docs cover a subset of examples. For the full set, see the nautilus_trader repository.
| Directory | Description |
|---|---|
| examples/ | Runnable Python examples organized by environment |
| docs/tutorials/ | Python and Rust tutorials for common workflows |
| docs/concepts/ | Concept guides with code snippets |
| python/tests/unit/ | Unit tests covering core functionality and edge cases |
Running in Docker
A self-contained Jupyter notebook server is available as a Docker image, with no local setup required.
docker pull ghcr.io/nautechsystems/jupyterlab:latest --platform linux/amd64
docker run -p 8888:8888 ghcr.io/nautechsystems/jupyterlab:latestThen open http://localhost:8888 in your browser.
Container data is ephemeral; deleting the container removes all data.
NautilusTrader log output can exceed Jupyter's default rate limit, causing notebooks to hang.
Set LoggerConfig(stdout_level=LogLevel.ERROR) to avoid this.