Nautilus API References (Index)

This is an index, not a deep-dive. The 51 sibling nautilus-*.md pages already cite specific symbols where it matters (InstrumentProvider.load_all_async, LiveDataClient._handle_data, OrderBookDelta.flags, BacktestEngine.dispose, etc.). This page exists for one reason: when Saturday-Cody or Codex (during M1–M5) needs the canonical class signature, file location, or method list for a specific Nautilus symbol, they need to know which URL to fetch and which gh command to run - without having to remember it.

Three canonical references:

Why this page is an index, not a deep-dive

Per nautilus-dev-releases.md, every Nautilus minor release (≈monthly) ships breaking changes. Pre-filing API symbol pages would mean re-filing them every minor - high write cost, low read value, and they go stale invisibly. The discipline is: pin to a specific version (M1: exact pin, M3: re-pin once), and fetch the API at that pinned version on demand. This page is the router for that fetch - what URL, what gh command, what file path.

The 51 sibling concept pages already encode the patterns (lifecycle, contracts, anti-patterns, value-type rules). When Cortana code needs a literal class signature or method list, that’s when this page is the first stop.

When to use which reference

NeedToolExample query
Daily class lookup (“what does LiveDataClient actually expose?“)Python APIFetch python-api-latest/live.html, search for LiveDataClient
Hot-path investigation (“what does MessageBus.publish cost?“)Rust APIFetch rust-api-latest/nautilus_common/index.html, follow msgbus
Adapter authoring (“how does Bybit do credential resolution?“)GitHubgh api repos/nautechsystems/nautilus_trader/contents/nautilus_trader/adapters/bybit/factories.py
Test fixture discovery (“does TestInstrumentProvider have an OPRA option?“)Python API + GitHubFetch python-api-latest/test_kit.html; cross-check with nautilus_trader/test_kit/providers.py
Breaking-change diagnosis (“why does my code fail after pip install -U?“)GitHub releases + Rust API`gh api repos/nautechsystems/nautilus_trader/releases
Carryover #5 (custom RiskEngine rule API)GitHub at pinned versiongh api .../contents/crates/risk/src/engine.rs?ref=v1.226.0
Carryover #7 (ts_init nanosecond-tie ordering)GitHub at pinned versiongh api .../contents/crates/data/src/engine/mod.rs?ref=v1.226.0
UW DataClient template (“what’s the bare-minimum _subscribe?“)GitHubgh api .../contents/nautilus_trader/adapters/bybit/data.py
Databento catalog ingest patternGitHubgh api .../contents/nautilus_trader/adapters/databento/loaders.py

Python API map (nautilus_trader.*, Sphinx, daily surface)

URL: https://nautechsystems.github.io/nautilus_docs/python-api-latest/

The Sphinx index lists 17 top-level documentation pages. Each is <module>.html under the URL above. Captured at the brain-commit snapshot:

ModulePageWhat’s in it
nautilus_trader.accountingaccounting.htmlAccount types, AccountFactory, balance/margin calculators
nautilus_trader.analysisanalysis.htmlPortfolioAnalyzer, statistics (Sharpe, Sortino, drawdown)
nautilus_trader.backtestbacktest.htmlBacktestEngine, BacktestNode, BacktestEngineConfig, fill models
nautilus_trader.cachecache.htmlCache, CacheConfig, CacheDatabase (Redis/in-memory)
nautilus_trader.commoncommon.htmlActor, Component, Clock/TestClock/LiveClock, MessageBus, Logger
nautilus_trader.configconfig.htmlLiveDataClientConfig, LiveExecClientConfig, StrategyConfig, ActorConfig, LoggingConfig
nautilus_trader.corecore.htmlData base class, UUID4, nautilus_pyo3 re-exports
nautilus_trader.datadata.htmlDataEngine, DataClient, DataCommand/SubscribeData/RequestData messages
nautilus_trader.executionexecution.htmlExecutionEngine, ExecutionClient, OrderEmulator, matching engine, reports
nautilus_trader.indicatorsindicators.htmlEMA, ATR, RSI, MACD, Bollinger, VWAP, Keltner, AdaptiveMA, etc.
nautilus_trader.livelive.htmlLiveNode, LiveDataClient, LiveMarketDataClient, LiveExecutionClient, LiveDataEngine
nautilus_trader.persistencepersistence.htmlParquetDataCatalog, writers, streamers, custom-data registry
nautilus_trader.portfolioportfolio.htmlPortfolio, position-aggregation, account-state derivation
nautilus_trader.riskrisk.htmlRiskEngine, RiskEngineConfig, pre-trade rule plumbing
nautilus_trader.serializationserialization.htmlArrow encoders, Capnp serializers, JSON envelope helpers
nautilus_trader.systemsystem.htmlKernel, KernelConfig - boot order for actors/strategies
nautilus_trader.tradingtrading.htmlTrader, Strategy, StrategyConfig, controller hooks

Not on the top-level toctree but reachable:

  • nautilus_trader.adapters - per-adapter Python wiring (one subpage per venue: interactive_brokers, databento, bybit, binance, etc.). Sphinx anchors via adapters/index.html.
  • nautilus_trader.model - value types (Price, Quantity, Money, InstrumentId, Bar, QuoteTick, TradeTick, OrderBookDelta), enums (OrderSide, OrderType, TimeInForce), identifiers. Sphinx anchors via model/index.html.
  • nautilus_trader.test_kit - TestInstrumentProvider, TestDataStubs, TestIdStubs, eventually async wait helper. Used by every Cortana test (per nautilus-dev-testing.md).

For Cortana, the daily surface is: common + live + data + execution + risk + model + config + backtest + test_kit. Everything else is occasional reference.

Rust API map (crates/*, rustdoc, reference-only for Cortana)

URL: https://nautechsystems.github.io/nautilus_docs/rust-api-latest/

Cortana developers normally do not fetch this. Per nautilus-dev-rust.md: Cortana stays Python; Rust is reference-only unless we drop down to author a UW WebSocket adapter for latency reasons. The full crate list captured from the rustdoc root index:

Core platform crates (the runtime kernel):

CrateWhat’s in it
nautilus_coreTime primitives (UnixNanos, clock), correctness helpers, env-var resolution
nautilus_commonMessageBus, Cache, Component/Actor traits, LiveClock, runtime helpers (get_runtime)
nautilus_modelPrice, Quantity, Money, InstrumentId, Bar, QuoteTick, TradeTick, OrderBookDelta, all enums
nautilus_dataDataEngine, subscription routing, custom-data dispatch, ts_init ordering (carryover #7)
nautilus_executionExecutionEngine, OrderEmulator, matching engine, fill dispatch, reconciliation
nautilus_riskRiskEngine, pre-trade rule plumbing (carryover #5: custom rule API)
nautilus_portfolioPosition aggregation, account-state derivation
nautilus_persistenceParquetDataCatalog, Parquet readers/writers, Arrow schema
nautilus_persistence_macrosProcedural macros for catalog schema generation
nautilus_serializationArrow encoders, Capnp serializers, JSON envelope codec
nautilus_indicatorsEMA, ATR, RSI, MACD, etc. (Rust impls; Python wrappers in nautilus_trader.indicators)
nautilus_analysisStatistics (Sharpe, Sortino, drawdown calculators)
nautilus_backtestBacktest harness, fill models, latency models
nautilus_liveLiveNode, LiveNodeBuilder, live data/exec engines
nautilus_systemKernel, boot orchestration
nautilus_sandboxPaper-trading harness sitting between backtest and live
nautilus_networkHttpClient, WebSocketClient, RetryManager, rate limiting
nautilus_cliCommand-line tools (catalog ops, replay, etc.)
nautilus_infrastructureCross-crate infrastructure helpers
nautilus_cryptographySigning primitives for venue credentials
nautilus_testkitRust-side test fixtures (mirrors Python test_kit)

Adapter crates (one per integrated venue):

nautilus_betfair, nautilus_binance, nautilus_bitmex, nautilus_blockchain, nautilus_bybit, nautilus_coinbase, nautilus_databento, nautilus_deribit, nautilus_dydx, nautilus_hyperliquid, nautilus_interactive_brokers, nautilus_kraken, nautilus_okx, nautilus_polymarket, nautilus_tardis. Plus nautilus_architect_ax (research integration).

Top-level umbrella crates:

  • nautilus_trader - the umbrella crate (re-exports the above).
  • nautilus_trading - strategy/actor types (entry point named in the task brief; re-exports Strategy, Actor, StrategyConfig, etc.).

When does Cortana fetch a Rust crate? Only when chasing one of the two open carryovers:

  • Carryover #5 (custom RiskEngine rule API): nautilus_risk - see crates/risk/src/engine.rs and the Python wrapper at nautilus_trader/risk/engine.py + nautilus_trader/risk/sizing.py.
  • Carryover #7 (ts_init nanosecond-tie ordering): nautilus_data - see crates/data/src/engine/mod.rs. The fan-out ordering when multiple Data items share ts_event and tie on ts_init is documented here.

Everything else stays Python.

GitHub cheat-sheet

Repo: https://github.com/nautechsystems/nautilus_trader Default branch: develop (per gh api lookup 2026-05-07). License: LGPL-3.0. Visibility: public. Topics include algorithmic-trading-engine, options-trading, python, rust. Stargazers: ~22.5k. Open issues: 70.

Search code across the repo

# Find all usages of a pattern (regex supported)
gh search code -R nautechsystems/nautilus_trader 'class LiveDataClient'
gh search code -R nautechsystems/nautilus_trader 'fn get_runtime'
gh search code -R nautechsystems/nautilus_trader 'F_LAST | F_SNAPSHOT'
 
# Limit by language
gh search code -R nautechsystems/nautilus_trader --language python 'TestInstrumentProvider.option_contract'
gh search code -R nautechsystems/nautilus_trader --language rust 'WsDispatchState'

List directory contents

# Latest develop
gh api repos/nautechsystems/nautilus_trader/contents/nautilus_trader/adapters/bybit
gh api repos/nautechsystems/nautilus_trader/contents/nautilus_trader/risk
 
# Pinned to a release (do this during M1 - Cortana stays on the spike pin)
gh api repos/nautechsystems/nautilus_trader/contents/nautilus_trader/adapters/bybit?ref=v1.226.0

Read a single file at a pinned version

# Returns base64-encoded content; pipe through jq + base64 -d
gh api 'repos/nautechsystems/nautilus_trader/contents/nautilus_trader/adapters/databento/loaders.py?ref=v1.226.0' \
  | jq -r .content | base64 -d

List release tags / changelog

gh api repos/nautechsystems/nautilus_trader/releases --paginate \
  | jq -r '.[] | "\(.tag_name)\t\(.published_at)\t\(.name)"' | head -20

Direct GitHub URLs for the four directories that matter for Cortana

These are the canonical reference paths for adapter authoring + test patterns. Inventory captured 2026-05-07 against develop.

examples/live/interactive_brokers/ - IB live integration examples (Cortana’s broker for v1): https://github.com/nautechsystems/nautilus_trader/tree/develop/examples/live/interactive_brokers

file  connect_with_dockerized_gateway.py
file  connect_with_tws.py
file  contract_download.py
file  historical_download.py
file  with_databento_client.py
dir   notebooks/

examples/backtest/ - backtest examples (the harness Cortana uses for its test suite): https://github.com/nautechsystems/nautilus_trader/tree/develop/examples/backtest

file  architect_ax_book_imbalance.py
file  architect_ax_mean_reversion.py
file  betfair_backtest_orderbook_imbalance.py
file  bitmex_grid_market_maker.py
file  crypto_ema_cross_ethusdt_trade_ticks.py
file  crypto_ema_cross_ethusdt_trailing_stop.py
file  crypto_ema_cross_with_binance_provider.py
file  crypto_orderbook_imbalance.py
file  databento_cme_quoter.py
file  databento_ema_cross_long_only_aapl_bars.py
file  databento_ema_cross_long_only_spy_trades.py
file  databento_ema_cross_long_only_tsla_trades.py
dir   example_01_load_bars_from_custom_csv/
dir   example_02_use_clock_timer/
dir   example_03_bar_aggregation/
dir   example_04_using_data_catalog/
dir   example_05_using_portfolio/
dir   example_06_using_cache/
dir   example_07_using_indicators/
dir   example_08_cascaded_indicator/
dir   example_09_messaging_with_msgbus/
dir   example_10_messaging_with_actor_data/
dir   example_11_messaging_with_actor_signals/
file  fx_ema_cross_audusd_bars_from_ticks.py
file  fx_ema_cross_audusd_ticks.py
file  fx_ema_cross_bracket_gbpusd_bars_external.py
file  fx_ema_cross_bracket_gbpusd_bars_internal.py
file  fx_market_maker_gbpusd_bars.py
file  model_configs_example.py
dir   notebooks/
file  polymarket_simple_quoter.py
file  synthetic_data_pnl_test.py

The example_0X_* directories are Cortana’s most relevant reading order: they show the full bar/clock/catalog/portfolio/cache/ indicator/cascaded-indicator/msgbus/actor-data/actor-signals shape each as a self-contained example.

nautilus_trader/adapters/bybit/ - UW DataClient template (Bybit is the closest-shape reference for a custom WS DataClient, per nautilus-dev-adapters.md): https://github.com/nautechsystems/nautilus_trader/tree/develop/nautilus_trader/adapters/bybit

file  __init__.py
file  config.py
file  constants.py
file  data.py
file  execution.py
file  factories.py
file  loaders.py
file  providers.py
file  types.py

For the UW spike: read data.py (the LiveMarketDataClient shape), config.py (config dataclass pattern), factories.py (registration seam for LiveNode.builder()), and __init__.py (__all__ exports).

nautilus_trader/adapters/databento/ - Databento adapter (Cortana’s catalog-ingest reference per spike Step 0.5; loaders.py is the canonical DatabentoDataLoader for catalog ingest): https://github.com/nautechsystems/nautilus_trader/tree/develop/nautilus_trader/adapters/databento

file  __init__.py
file  common.py
file  config.py
file  constants.py
file  data.py
file  data_utils.py
file  enums.py
file  factories.py
file  loaders.py
file  providers.py
file  publishers.json
file  types.py

loaders.py (18.7 KB at 2026-05-07) is the file the spike will read during Step 0.5 to validate the $125-credit Databento pull goes through DatabentoDataLoaderParquetDataCatalog.

nautilus_trader/test_kit/ - pytest fixtures (live in the nautilus_trader package, not tests/). Note: there is no tests/test_kit/ directory in the repo - the test_kit lives inside the nautilus_trader package so it ships with the wheel: https://github.com/nautechsystems/nautilus_trader/tree/develop/nautilus_trader/test_kit

file  __init__.py
file  debug_helpers.py
file  functions.py        ← await eventually(...) lives here
dir   mocks/
file  providers.py        ← TestInstrumentProvider
dir   rust/
dir   strategies/
dir   stubs/              ← TestDataStubs, TestIdStubs

For Cortana tests: import from nautilus_trader.test_kit.providers (not tests.test_kit.providers - common typo). Per nautilus-dev-testing.md the canonical imports are from nautilus_trader.test_kit.providers import TestInstrumentProvider and from nautilus_trader.test_kit.stubs.data import TestDataStubs.

Spike-day code-read targets

These are the file paths the spike (and post-spike Codex handoffs) need to fetch literal source from. Pinned to whichever release the spike picks at Step 0.5 - substitute ?ref=v1.X.Y accordingly.

Carryover #5 - custom RiskEngine rule API:

FilePurpose
crates/risk/src/engine.rsRust RiskEngine core; rule trait definition, dispatch flow
nautilus_trader/risk/engine.pyPython RiskEngine Cython wrapper (legacy v1) / PyO3 binding (v2)
nautilus_trader/risk/sizing.pyPositionSizer helpers; meta-prob-aware sizing pattern reference

Question to answer from these: “What’s the literal trait/ABC Cortana must subclass for MetaProbGateRule, and where does it plug into the LiveNode builder?”

Carryover #7 - ts_init nanosecond-tie ordering:

FilePurpose
crates/data/src/engine/mod.rsDataEngine dispatch order when multiple Data items share ts_event

Question to answer: “If UWFlowAlert and Bar arrive with the same ts_event ns, which on_data fires first? Does Nautilus enforce a tie-break, or is it adapter-emission-order?” Per nautilus-custom-data.md the tie-break is ts_init; this file is the source of truth.

UW DataClient template:

FilePurpose
nautilus_trader/adapters/bybit/data.pyClosest-shape reference for _subscribe/_unsubscribe/_request triplet on a custom WS feed

Databento catalog ingest:

FilePurpose
nautilus_trader/adapters/databento/loaders.pyDatabentoDataLoader - the entry point for the spike Step 0.5 $125-credit pull

Cortana doesn’t pre-file API pages - the policy

Per nautilus-dev-releases.md the version-pin discipline is: M1 exact-pin to the spike version, no upgrades during M1; M2 same pin with one controlled upgrade allowed at start; M3 re-pin once at production cutover; M4+ no upgrades during multi-tenant work.

Pre-filing API symbol pages would mean re-filing them every minor release (≈monthly cadence with breaking changes). That’s high write cost, low read value, and pages go stale invisibly. The discipline instead is:

  1. Pin the version (per nautilus-dev-releases.md).
  2. When code work needs a literal symbol, fetch the API page at the pinned version on demand using this index page’s URLs.
  3. Cite the pinned-version URL in the Codex handoff so reviewers can verify the same symbol they read.
  4. Only file an API-symbol-specific concept page if the same symbol keeps recurring across multiple sessions and the surrounding patterns aren’t already covered by an existing concept page.

The 51 sibling concept pages cover the patterns; this index covers how to find the literal API at the pinned version. Together that’s the complete reference shape. No symbol-by-symbol pre-filing.

See Also


Timeline

2026-05-07 | Cody - Filed as index page; explicit policy to fetch API pages on demand rather than pre-file (per nautilus-dev-releases.md pin discipline).