NautilusTrader Python API

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.

This reference covers every public module, class, method, and function in the Python framework.

Modules

Module

Description

Accounting

Account management and balance tracking

Adapters

Exchange and broker integrations

Analysis

Performance analysis and statistics

Backtest

Historical backtesting engine

Cache

In-memory data and state caching

Common

Shared components, clocks, loggers, and factories

Config

Configuration objects for system components

Core

Core primitives, datetime utilities, and UUID types

Data

Data engine, clients, and aggregation

Execution

Execution engine, clients, and algorithms

Indicators

Technical analysis indicators

Live

Live trading engine and execution

Model

Domain model: instruments, orders, events, and data

Persistence

Data persistence and catalog

Portfolio

Portfolio management

Risk

Risk engine and management

Serialization

Message serialization

System

System kernel and process management

Trading

Trading strategies and controllers