The document explains configuration conventions in NautilusTrader, covering typed settings for data and execution clients, engines, and strategies. It distinguishes concrete fields from optional fields, whose absent values can mean disabled behavior, an…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
144 documents
The guide explains how NautilusTrader connects to Bybit for live market data and order execution across spot, linear and inverse contracts, and options. It describes product-specific symbol suffixes, instrument loading, and the differences among mainnet,…
This technical reference explains how an order-expiry event is processed in an execution pipeline. The event is applied to the order, updates the cache, and is published on the message bus. It may originate from a venue, a simulated matching engine, or…
This guide describes how NautilusTrader builds and maintains positions from fills. It covers signed exposure, average entry and exit prices, realized and unrealized PnL, commissions, funding adjustments, and closure when net quantity reaches zero. It…
This engineering guide explains how to build Rust-native adapters that connect NautilusTrader to exchanges and data providers. It covers venue-specific data and execution clients, configuration and Python exposure through PyO3, plus contracts for…
This example outlines a staged workflow for obtaining option data through an Interactive Brokers connection. It configures an instrument provider for an underlying futures contract and a put option, then checks whether the gateway or trading workstation is…
This document explains how a backtest matching engine assigns fill prices across depth books, top-of-book data, and bar-based triggers. Market orders can walk available levels; limit orders use crossed prices when taking liquidity and their limit when…
This example describes a live data actor that subscribes to a slice of Bybit BTC options. At startup, it searches cached instruments for unexpired Bybit options, selects the soonest expiry, prefers USDT settlement when available, and constructs the…
An order book delta represents one incremental change to a book and is used when a venue or data provider sends updates that a trading system must apply locally. The document distinguishes three supported granularities: order-level Level 3 data, price-level…
This documentation explains how an execution algorithm receives a primary order and can break it into spawned orders. Its built-in TWAP implementation divides an order across a configured time horizon and interval, submitting the first slice immediately and…
This example demonstrates an execution test that streams public Binance spot market data into a local sandbox matching engine. The built-in strategy opens a position with an immediate-or-cancel order, maintains post-only buy and sell limit quotes, then…
This example configures a strategy that monitors top-of-book order imbalance for a perpetual gold instrument and submits sandbox orders when configured thresholds are met. Its settings specify a maximum trade size, a minimum size for triggering, an imbalance…
This example shows how to run an options backtest from a catalog containing option instruments, quote ticks, and Greeks. It subscribes to periodic option-chain snapshots for a chosen series and selects a contract either at a specified strike or near a target…
This example configures a live trading framework to connect to Derive’s test environment and exercise its built-in execution tester on an ETH perpetual instrument. At startup, the strategy can open a position using an immediate-or-cancel order and maintain…
This quickstart walks through a bar-based exponential moving average crossover strategy in a backtesting engine. The strategy waits for its fast and slow averages to initialize, then buys when the fast average is at or above the slow one and sells when it is…
The script runs an EMA-crossover backtest on USD/JPY five-minute bid bars built from one-minute FXCM data. It configures a simulated margin venue, balances, fees, rollover interest, and probabilistic fills, then collects bars and fills from the engine. The…
This document describes an adapter for collecting DeFi data from EVM blockchains and making it available through a trading system’s data model. It covers historical and live block feeds, DEX pool discovery, pool event replay, snapshots, and an experimental…
This reference explains how the Nautilus trading framework models a listed share or ETF as an equity instrument. It describes required identifiers, venue symbol, quote currency, price precision and increment, timestamps, and optional metadata such as lot…
This reference explains how a bar represents open, high, low, close, and volume data for a specified bar type. A venue or provider may supply bars, or a trading system may build them from quote ticks, trade ticks, or smaller bars. Bar type carries…
This overview explains how NautilusTrader simulates strategies against historical data. A backtest engine processes a historical data stream through components that are also used in live trading, including portfolios, strategies, execution algorithms, and…
This reference explains an order-rejection event in an execution system. A rejection marks an order as terminal, updates the order and cache, and is published to the message bus for handlers such as a strategy’s rejection callback. The event commonly follows…
This design document explains how NautilusTrader captures state-changing messages in a durable, ordered event log. Each run has its own sequence numbers, entries, and manifest; the log can be inspected, verified, or replayed to rebuild cache state. Captured…
The document explains how a trading system represents instruments across spot assets, futures, options, swaps, CFDs, betting markets, and synthetic instruments. Each instrument has a unique symbol-and-venue identity, while its definition carries details such…
This guide explains how an execution system applies order events, interprets command outcomes, retries requests, persists state, and reconciles local orders with venue reports. It distinguishes definitive local failures, confirmed venue results, and unknown…