github nautechsystems/nautilus_trader v1.221.0
NautilusTrader 1.221.0 Beta

one month ago

NautilusTrader 1.221.0 Beta

Released on 26th October 2025 (UTC).

This will be the final release with support for Python 3.11.

Enhancements

  • Added support for OrderBookDepth10 requests (#2955), thanks @faysou
  • Added support for quotes from book depths (#2977), thanks @faysou
  • Added support for quotes from order book deltas updates (#3106), thanks @faysou
  • Added execution engine rate limiting for single-order reconciliation queries
  • Added subscribe_order_fills(...) and unsubscribe_order_fills(...) for Actor allowing to subscribe to all fills for an instrument ID
  • Added on_order_filled(...) for Actor
  • Added Renko bar aggregator (#2941), thanks @faysou
  • Added time_range_generator for on-the-fly data data subscriptions (#2952), thanks @faysou
  • Added __repr__ to NewsEvent (#2958), thanks @MK27MK
  • Added convert_quote_qty_to_base config option to ExecEngineConfig (default True to retain current behavior) allows adapters to keep quote-denominated sizes when needed
  • Added contingent order fields parent_order_id and linked_order_ids for OrderStatusReport and reconciliation
  • Added fs_rust_storage_options to Python catalog (#3008), thanks @faysou and @Johnkhk
  • Added matching engine fallback to default order book for custom fill models (#3039), thanks @Hamish-Leahy
  • Added filesystem parameter to parquet in the consolidate functions (#3097), thanks @huracosunah
  • Added azure support for az protocol (#3102), thanks @huracosunah
  • Added Binance BBO price_match parameter support for order submission
  • Added BitMEX conditional orders support
  • Added BitMEX batch cancel support
  • Added BitMEX contingent orders support (OCO, OTO, brackets)
  • Added BitMEX historical data requests (trades and bars)
  • Added BitMEX configurable recv_window_ms for signed HTTP request expiration
  • Added Bybit SPOT position reports with opt-in use_spot_position_reports config option for BybitExecClientConfig
  • Added Bybit ignore_uncached_instrument_executions config option for BybitExecClientConfig (default False to retain current behavior)
  • Added Databento CME sandbox example
  • Added Interactive Brokers cache config support for historical provider (#2942), thanks @ms32035
  • Added Interactive Brokers support for fetching orders from all clients (#2948), thanks @dinana
  • Added Interactive Brokers order conditions (#2988), thanks @faysou
  • Added Interactive Brokers generate_fill_reports implementation (#2989), thanks @faysou
  • Added OKX conditional trigger orders support
  • Added OKX trade mode per order via params using td_mode key
  • Added OKX margin configuration and spot margin support
  • Added OKX demo account support
  • Added OKX batch cancel support
  • Added Polymarket native market orders support

Breaking Changes

  • Removed nautilus_trader.analysis.statistics subpackage - all statistics are now implemented in Rust and must be imported from nautilus_trader.analysis (e.g., from nautilus_trader.analysis import WinRate)
  • Removed partial bar functionality from bar aggregators and subscription APIs (#3020), thanks @faysou
  • Renamed nautilus-cli crate feature flag from hypersync to defi (gates blockchain/DeFi commands)
  • Polymarket execution client no longer accepts market BUY orders unless quote_quantity=True

Security

  • Fixed non-executable stack for Cython extensions to support hardened Linux systems
  • Fixed divide-by-zero and overflow bugs in model crate that could cause crashes
  • Fixed core arithmetic operations to reject NaN/Infinity values and improve overflow handling

Fixes

  • Fixed reduce-only order panic when quantity exceeds position
  • Fixed position purge logic to prevent purging re-opened position
  • Fixed Position.purge_events_for_order to properly rebuild state from remaining order fills
  • Fixed cache index cleanup bugs in purge_order operations
  • Fixed order average price calculation that was double-counting current fill in weighted average
  • Fixed own order book cleanup for terminal orders and inflight handling
  • Fixed order book depth snapshot processing to avoid padding levels and metadata tracking for L1 top-of-book ticks
  • Fixed crypto instruments PyO3 -> Cython conversion for lot_size where it was not being passed through
  • Fixed serialization crate bugs and improve error handling
  • Fixed PyO3 interpreter lifecycle for async shutdown preventing edge case "interpreter not initialized" panics during shutdown
  • Fixed RiskEngine reduce-only cash exits (#2986), thanks for reporting @dennisnissle
  • Fixed RiskEngine quote quantity validation
  • Fixed BacktestEngine to retain instruments on reset (#3096), thanks for reporting @woung717
  • Fixed overflow in NautilusKernel build time calculation due to negative duration (#2998), thanks for reporting @HaakonFlaaronning
  • Fixed handling of asyncio.CancelledError in execution reconciliation (#3073), thanks @dinana
  • Fixed edge case where rejected orders can remain in own order book
  • Fixed Currency registration to synchronize between Cython and PyO3 runtimes via new register_currency() helper
  • Fixed Databento CMBP-1/CBBO/TBBO symbology resolution
  • Fixed on_load called before strategy added bug (#2953), thanks @lisiyuan656
  • Fixed filesystem usage in catalog for isfile and isdir (#2954), thanks @limx0
  • Fixed SandboxExecutionClient instrument data handling
  • Fixed AccountState Arrow serialization (#3005), thanks for reporting @nikzasel
  • Fixed CryptoOption Arrow schema option_kind field to accept string values
  • Fixed FuturesSpread Arrow schema missing max/min quantity and price fields
  • Fixed OptionSpread Arrow schema missing max/min quantity and price fields
  • Fixed Commodity Arrow schema to match from_dict requirements
  • Fixed safe encoded symbols (#2964), thanks @ms32035
  • Fixed msgspec encoding for type objects with qualified names
  • Fixed nautilus CLI macOS compatibility with regex unicode-perl feature (#2969), thanks @learnerLj
  • Fixed fuzzy candlesticks indicator bugs (#3021), thanks @benhaben
  • Fixed return type annotation for ArrowSerializer.deserialize (#3076), thanks @MK27MK
  • Fixed initializing of sqrt price setting flow when Pool profiling (#3100), thanks @filipmacek
  • Fixed Redis multi-stream consumer skipping messages (#3094), thanks for reporting @kirill-gr1
  • Fixed Binance duplicate OrderSubmitted event generation for order lists (#2994), thanks @sunlei
  • Fixed Binance websocket fill message parsing for Binance US with extra fields (#3006), thanks for reporting @bmlquant
  • Fixed Binance order status parsing for external orders (#3006), thanks for reporting @bmlquant
  • Fixed Binance execution handling for self-trade prevention and liquidations (#3006), thanks for reporting @bmlquant
  • Fixed Binance trailing stop to use server-side activation price (#3056), thanks for reporting @hope2see
  • Fixed Binance Futures reconciliation duplicated position bug (#3067), thanks @lisiyuan656
  • Fixed Binance price_match order price synchronization (#3074)
  • Fixed Binance Futures position risk query to use v3 API returning only symbols with positions or open orders (#3062), thanks for reporting @woung717
  • Fixed Binance Futures liquidation and ADL fill handling
  • Fixed BitMEX testnet support
  • Fixed BitMEX instrument parsing of lot size
  • Fixed BitMEX order rejection handling and response parsing
  • Fixed Blockchain adapter out of gas RPC error in Multicall for problematic contracts (#3086), thanks @filipmacek
  • Fixed Bybit currency parsing from venue resulting in incorrectly low precision (e.g., USDT precision 4 rather than 8)
  • Fixed Bybit handling of OrderModifyRejected events from pending updates
  • Fixed Bybit account endpoint pagination handling
  • Fixed Coinbase Intx API credentials handling to allow passing explicitly
  • Fixed Databento MBO Clear actions and improve docs
  • Fixed Hyperliquid L1 signing with direct MessagePack serialization (#3087), thanks @nicolad
  • Fixed Interactive Brokers tick level historical data downloading (#2956), thanks @DracheShiki
  • Fixed Interactive Brokers instrument provider TypeError when load_ids/contracts are None, thanks for reporting @FGU1
  • Fixed Interactive Brokers modify bracket order (#2979), thanks @faysou
  • Fixed Interactive Brokers historical bars resubscription failure after connection loss (#3002), thanks @Johnkhk
  • Fixed Interactive Brokers flat position reconciliation and instrument loading (#3023), thanks @idobz
  • Fixed Interactive Brokers bars response handling by removing partial bar (#3040), thanks @sunlei
  • Fixed Interactive Brokers account summary handling (#3052), thanks @shinhwasbiz02
  • Fixed Interactive Brokers account balance calculation (#3064), thanks @sunlei
  • Fixed OKX spot margin quote quantity order handling
  • Fixed OKX API credentials handling to allow passing explicitly
  • Fixed OKX fee calculations to account for negative fees
  • Fixed OKX parsing for tick_sz across instrument types
  • Fixed OKX parsing for instruments multiplier field
  • Fixed OKX WebSocket heartbeat and standardize logging
  • Fixed Polymarket handling of one-sided quotes (#2950), thanks for reporting @thefabus
  • Fixed Polymarket websocket message handling (#2963, #2968), thanks @thefabus
  • Fixed Polymarket tick size change handling for quotes (#2980), thanks for reporting @santivazq
  • Fixed Polymarket market order submission to use native CLOB market orders (#2984), thanks for reporting @njkds
  • Fixed Polymarket maker fill order side inversion (#3077), thanks for reporting @DarioHett
  • Fixed Polymarket neg_risk order parameter handling
  • Fixed Tardis instruments lot_size mapping
  • Fixed Tardis adapter error handling and connection robustness
  • Fixed Tardis replay to use catalog-compatible filenames

Internal Improvements

  • Added ARM64 support to Docker builds
  • Added BitMEX adapter integration tests
  • Added OKX adapter integration tests
  • Added turmoil network simulation testing to network crate
  • Added liquidity utilization rate to AMM pool profiler (#3107), thanks @filipmacek
  • Added filter_sec_types config to skip unsupported IB instrument types (#3108), thanks @sunlei
  • Ported PortfolioAnalyzer and all portfolio statistics to Rust
  • Introduced AMM Pool profiler with tickmaps and Uniswapv3 support (#3000, #3010, #3019, #3036), thanks @filipmacek
  • Introduced snapshot, analytics, and PSQL schema for PoolProfiler (#3048), thanks @filipmacek
  • Implemented consistency checking for AMM pool profiler with RPC state (#3030), thanks @filipmacek
  • Implemented PoolFlash event in blockchain adapter (#3055, #3058), thanks @filipmacek
  • Implemented Blockchain adapter pool profiler snapshot integration (#3090), thanks @filipmacek
  • Implemented BitMEX robust ping/pong handling
  • Implemented Hyperliquid adapter HTTP client (#2939), thanks @nicolad
  • Implemented Hyperliquid adapter scaffolding and examples (#2957), thanks @nicolad
  • Implemented Hyperliquid weighted rate limiter for REST API (#2960), thanks @nicolad
  • Implemented Hyperliquid L2 order book with tick-based pricing (#2967), thanks @nicolad
  • Implemented Hyperliquid data client and fix dependencies (#2975), thanks @nicolad
  • Implemented Hyperliquid REST API models for execution (#2983), thanks @nicolad
  • Implemented Hyperliquid InstrumentProvider / definitions parsing (#2992), thanks @nicolad
  • Implemented Hyperliquid DataClient in Python (#2996), thanks @nicolad
  • Implemented Hyperliquid DataClient in Rust (#2999), thanks @nicolad
  • Implemented Hyperliquid ExecutionClient in Python (#3003), thanks @nicolad
  • Implemented Hyperliquid ExecutionClient in Rust (#3013), thanks @nicolad
  • Implemented Hyperliquid websocket tester for streaming market data (#3018), thanks @nicolad
  • Implemented Hyperliquid basic market and limit orders (#3022), thanks @nicolad
  • Implemented Hyperliquid conditional / advanced orders (#3035), thanks @nicolad
  • Implemented Hyperliquid execution reconciliation (#3041), thanks @nicolad
  • Implemented Hyperliquid execution client order submission (#3050), thanks @nicolad
  • Implemented Hyperliquid LiveExecutionClientExt trait (#3075), thanks @nicolad
  • Implemented Hyperliquid typed enums and optimize WebSocket lookups (#3089), thanks @nicolad
  • Refactored Hyperliquid adapter to push complexity to Rust layer (#3063), thanks @nicolad
  • Refactored streaming writer to support per-bar-type persistence (#3078), thanks @faysou
  • Changed Symbol, Currency, and InstrumentId string validation from ASCII to UTF-8, fixing Binance compatibility with Chinese symbols
  • Changed PositionId validation check from ASCII to UTF-8, fixing Binance compatibility with Chinese symbols (#3105), thanks @Osub
  • Improved clock and timer thread safety and validations
  • Improved live timer lifecycle management by canceling existing timers with the same name
  • Improved ActorExecutor lifecycle and concurrency handling
  • Improved order book error handling, state integrity, and pprint/display
  • Improved order book handling of NoOrderSide deltas
  • Improved websocket reconnection sequence protections in stream mode
  • Improved socket reconnect sequence and tighten client setup and testing
  • Improved socket client URL parsing
  • Improved compatibility of Makefile for Windows git-bash (#3066), thanks @faysou
  • Improved Blockchain adapter shutdown with cancellation token
  • Improved Blockchain adapter node_test script (#3092), thanks @filipmacek
  • Improved and optimize AMM pool profiling (#3098), thanks @filipmacek
  • Improved Hyperliquid adapter patterns (#2972), thanks @nicolad
  • Improved BitMEX spot instruments quantity handling by scaling to correct fractional units
  • Improved BitMEX REST rate limits configuration
  • Improved BitMEX instrument cache error logging
  • Improved Binance, Bybit, OKX, BitMEX, and Coinbase International HTTP rate limiting to enforce documented per-endpoint quotas
  • Improved Binance fill handling when instrument not cached with clearer error log
  • Improved OKX trade mode detection and fee currency parsing
  • Improved OKX client connection reliability
  • Improved OKX liquidation and ADL fill handling and logging
  • Improved Tardis instrument requests to filter options by default
  • Standardized Binance order validations with proper order denied events to avoid "hanging" orders
  • Refined Renko bar aggregator and add tests (#2961), thanks @faysou
  • Refined setting of flags in Makefile (#3060), thanks @faysou
  • Refined Bybit balance parsing to use Money.from_str to ensure no rounding errors
  • Refined Interactive Brokers execution flows (#2993), thanks @faysou
  • Refined Interactive Brokers filtering of bars in IB adapter after disconnection (#3011), thanks @faysou and @Johnkhk
  • Refined Interactive Brokers account summary log to debug level (#3084), thanks @sunlei
  • Refined catalog reset_data_file_names method (#3071), thanks @adrianbeer and @faysou
  • Optimized ExecutionEngine hot path with topic caching and reduced cache lookups
  • Optimized rate limiter quota keys with string interning to avoid repeated allocations
  • Upgraded Rust (MSRV) to 1.90.0
  • Upgraded Cython to v3.1.6
  • Upgraded databento crate to v0.35.0
  • Upgraded datafusion crate to v50.3.0
  • Upgraded pyo3 and pyo3-async-runtimes crates to v0.26.0
  • Upgraded redis crate to v0.32.7
  • Upgraded tokio crate to v1.48.0
  • Upgraded uvloop to v0.22.1 (upgrades libuv to v1.49.0)

Documentation Updates

  • Added quick-reference rate limit tables with links to official docs for Binance, Bybit, OKX, BitMEX, and Coinbase International
  • Updated cache concept guide with purging ops
  • Improved dark and light themes for readability
  • Improved clarity of implemented bar aggregations
  • Standardized consistent styling per docs style guide
  • Fixed some broken links

Deprecations

  • Deprecated convert_quote_qty_to_base; disable (False) to maintain consistent behaviour going forwards. Automatic conversion will be removed in a future version.

Don't miss a new nautilus_trader release

NewReleases is sending notifications on new releases.