NautilusTrader Python API

NautilusTrader is an open-source, production-grade, Rust-native trading engine infrastructure for multi-asset, multi-venue trading systems.

Its Rust-native core spans research, deterministic simulation, portfolio and risk modeling, and live execution under one event-driven architecture. Python serves as the control plane for strategy logic, configuration, and orchestration, while entire systems can also be built in Rust.

NautilusTrader is engineered to minimize the gap between research and production. The same execution semantics and time model apply in both backtests and live systems, reducing deployment risk and unexpected behavior.

Modular adapters keep venue integration neutral. Current integrations span crypto venues, traditional markets, betting exchanges, and data providers, with custom adapters available for REST, WebSocket, and provider-specific APIs.

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