Nautilus API References (Index)
This is an index, not a deep-dive. The 51 sibling
nautilus-*.mdpages 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 whichghcommand to run - without having to remember it.Three canonical references:
- Python API (Sphinx, daily surface): https://nautechsystems.github.io/nautilus_docs/python-api-latest/
- Rust API (rustdoc, reference-only for Cortana): https://nautechsystems.github.io/nautilus_docs/rust-api-latest/nautilus_trading/index.html
- Source repo (
nautechsystems/nautilus_trader, default branchdevelop, LGPL-3.0): https://github.com/nautechsystems/nautilus_trader
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
| Need | Tool | Example query |
|---|---|---|
Daily class lookup (“what does LiveDataClient actually expose?“) | Python API | Fetch python-api-latest/live.html, search for LiveDataClient |
Hot-path investigation (“what does MessageBus.publish cost?“) | Rust API | Fetch rust-api-latest/nautilus_common/index.html, follow msgbus |
| Adapter authoring (“how does Bybit do credential resolution?“) | GitHub | gh api repos/nautechsystems/nautilus_trader/contents/nautilus_trader/adapters/bybit/factories.py |
Test fixture discovery (“does TestInstrumentProvider have an OPRA option?“) | Python API + GitHub | Fetch 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 version | gh api .../contents/crates/risk/src/engine.rs?ref=v1.226.0 |
Carryover #7 (ts_init nanosecond-tie ordering) | GitHub at pinned version | gh api .../contents/crates/data/src/engine/mod.rs?ref=v1.226.0 |
UW DataClient template (“what’s the bare-minimum _subscribe?“) | GitHub | gh api .../contents/nautilus_trader/adapters/bybit/data.py |
| Databento catalog ingest pattern | GitHub | gh 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:
| Module | Page | What’s in it |
|---|---|---|
nautilus_trader.accounting | accounting.html | Account types, AccountFactory, balance/margin calculators |
nautilus_trader.analysis | analysis.html | PortfolioAnalyzer, statistics (Sharpe, Sortino, drawdown) |
nautilus_trader.backtest | backtest.html | BacktestEngine, BacktestNode, BacktestEngineConfig, fill models |
nautilus_trader.cache | cache.html | Cache, CacheConfig, CacheDatabase (Redis/in-memory) |
nautilus_trader.common | common.html | Actor, Component, Clock/TestClock/LiveClock, MessageBus, Logger |
nautilus_trader.config | config.html | LiveDataClientConfig, LiveExecClientConfig, StrategyConfig, ActorConfig, LoggingConfig |
nautilus_trader.core | core.html | Data base class, UUID4, nautilus_pyo3 re-exports |
nautilus_trader.data | data.html | DataEngine, DataClient, DataCommand/SubscribeData/RequestData messages |
nautilus_trader.execution | execution.html | ExecutionEngine, ExecutionClient, OrderEmulator, matching engine, reports |
nautilus_trader.indicators | indicators.html | EMA, ATR, RSI, MACD, Bollinger, VWAP, Keltner, AdaptiveMA, etc. |
nautilus_trader.live | live.html | LiveNode, LiveDataClient, LiveMarketDataClient, LiveExecutionClient, LiveDataEngine |
nautilus_trader.persistence | persistence.html | ParquetDataCatalog, writers, streamers, custom-data registry |
nautilus_trader.portfolio | portfolio.html | Portfolio, position-aggregation, account-state derivation |
nautilus_trader.risk | risk.html | RiskEngine, RiskEngineConfig, pre-trade rule plumbing |
nautilus_trader.serialization | serialization.html | Arrow encoders, Capnp serializers, JSON envelope helpers |
nautilus_trader.system | system.html | Kernel, KernelConfig - boot order for actors/strategies |
nautilus_trader.trading | trading.html | Trader, 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 viaadapters/index.html.nautilus_trader.model- value types (Price,Quantity,Money,InstrumentId,Bar,QuoteTick,TradeTick,OrderBookDelta), enums (OrderSide,OrderType,TimeInForce), identifiers. Sphinx anchors viamodel/index.html.nautilus_trader.test_kit-TestInstrumentProvider,TestDataStubs,TestIdStubs,eventuallyasync wait helper. Used by every Cortana test (pernautilus-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):
| Crate | What’s in it |
|---|---|
nautilus_core | Time primitives (UnixNanos, clock), correctness helpers, env-var resolution |
nautilus_common | MessageBus, Cache, Component/Actor traits, LiveClock, runtime helpers (get_runtime) |
nautilus_model | Price, Quantity, Money, InstrumentId, Bar, QuoteTick, TradeTick, OrderBookDelta, all enums |
nautilus_data | DataEngine, subscription routing, custom-data dispatch, ts_init ordering (carryover #7) |
nautilus_execution | ExecutionEngine, OrderEmulator, matching engine, fill dispatch, reconciliation |
nautilus_risk | RiskEngine, pre-trade rule plumbing (carryover #5: custom rule API) |
nautilus_portfolio | Position aggregation, account-state derivation |
nautilus_persistence | ParquetDataCatalog, Parquet readers/writers, Arrow schema |
nautilus_persistence_macros | Procedural macros for catalog schema generation |
nautilus_serialization | Arrow encoders, Capnp serializers, JSON envelope codec |
nautilus_indicators | EMA, ATR, RSI, MACD, etc. (Rust impls; Python wrappers in nautilus_trader.indicators) |
nautilus_analysis | Statistics (Sharpe, Sortino, drawdown calculators) |
nautilus_backtest | Backtest harness, fill models, latency models |
nautilus_live | LiveNode, LiveNodeBuilder, live data/exec engines |
nautilus_system | Kernel, boot orchestration |
nautilus_sandbox | Paper-trading harness sitting between backtest and live |
nautilus_network | HttpClient, WebSocketClient, RetryManager, rate limiting |
nautilus_cli | Command-line tools (catalog ops, replay, etc.) |
nautilus_infrastructure | Cross-crate infrastructure helpers |
nautilus_cryptography | Signing primitives for venue credentials |
nautilus_testkit | Rust-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-exportsStrategy,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- seecrates/risk/src/engine.rsand the Python wrapper atnautilus_trader/risk/engine.py+nautilus_trader/risk/sizing.py. - Carryover #7 (
ts_initnanosecond-tie ordering):nautilus_data- seecrates/data/src/engine/mod.rs. The fan-out ordering when multiple Data items sharets_eventand tie onts_initis 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.0Read 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 -dList release tags / changelog
gh api repos/nautechsystems/nautilus_trader/releases --paginate \
| jq -r '.[] | "\(.tag_name)\t\(.published_at)\t\(.name)"' | head -20Direct 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 DatabentoDataLoader → ParquetDataCatalog.
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:
| File | Purpose |
|---|---|
crates/risk/src/engine.rs | Rust RiskEngine core; rule trait definition, dispatch flow |
nautilus_trader/risk/engine.py | Python RiskEngine Cython wrapper (legacy v1) / PyO3 binding (v2) |
nautilus_trader/risk/sizing.py | PositionSizer 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:
| File | Purpose |
|---|---|
crates/data/src/engine/mod.rs | DataEngine 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:
| File | Purpose |
|---|---|
nautilus_trader/adapters/bybit/data.py | Closest-shape reference for _subscribe/_unsubscribe/_request triplet on a custom WS feed |
Databento catalog ingest:
| File | Purpose |
|---|---|
nautilus_trader/adapters/databento/loaders.py | DatabentoDataLoader - 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:
- Pin the version (per
nautilus-dev-releases.md). - When code work needs a literal symbol, fetch the API page at the pinned version on demand using this index page’s URLs.
- Cite the pinned-version URL in the Codex handoff so reviewers can verify the same symbol they read.
- 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
- Nautilus Dev - Releases - version-pin policy that drives the on-demand-fetch discipline
- Nautilus Dev - Python - the Python authoring contract; daily surface
- Nautilus Dev - Rust - Rust toolchain (reference-only for Cortana)
- Nautilus Dev - Adapters - Adapter Authoring Bible; cites Bybit + Databento as templates
- Nautilus Dev - Testing -
test_kitfixture imports and patterns - Nautilus Developer Guide - the parent extension/contribution overview
- Nautilus Custom Data -
ts_event/ts_initsemantics (carryover #7 surrounding context) - Nautilus Execution - RiskEngine plumbing (carryover #5 surrounding context)
- 2026-05-09 Nautilus Spike Plan:
~/conductor/workspaces/cortanaroi-mk2/belo-horizonte/plans/2026-05-09-nautilus-spike.md - 2026-05-09 MK3 Roadmap:
~/conductor/workspaces/cortanaroi-mk2/belo-horizonte/plans/2026-05-09-mk3-roadmap.md
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).