v1.219.0
nautechsystems/nautilus_traderv1.219.0Jul 5, 2025by github-actions[bot]
AI Summary
Release adding graceful shutdown config, data download during backtest, catalog consolidation by period, and DEX swaps support for blockchain adapter. Major refactoring of data catalog to Rust.
Key Highlights
- Added graceful_shutdown_on_exception config for live engines
- Added support for data download during backtest
- Added consolidate catalog by period
- Added DEX swaps support for blockchain adapter
- Added fire_immediately flag for timers
- Added trailing stop orders activation_price support in Rust
Breaking Changes
- Renamed catalog instrument_ids filter param to identifiers
- Changed timer allow_past=False behavior to permit past start times
- Changed Databento DBN upgrade policy to default v3
- Removed support for Databento DBN v1 schemas
- Removed problematic negative balance check for margin accounts
New Features
- graceful_shutdown_on_exception config
- purge_from_database config for LiveExecEngineConfig
- Data download during backtest
- Delete data range from catalog
- Consolidate catalog by period
- DEX swaps support
- fire_immediately flag for timers
- time_bars_build_delay config
- Hidden order support for IBKR
- subscribe_order_book_deltas for IBKR
Full Release Notes
# NautilusTrader 1.219.0 Beta Released on 5th July 2025 (UTC). ### Enhancements - Added `graceful_shutdown_on_exception` config option for live engines (default `False` to retain intended hard crash on unexpected system exceptions) - Added `purge_from_database` config option for `LiveExecEngineConfig` to support cache backing database management - Added support for data download during backtest (#2652), thanks @faysou - Added delete data range to catalog (#2744), thanks @faysou - Added consolidate catalog by period (#2727), thanks @faysou - Added `fire_immediately` flag parameter for timers where a time event will be fired at the `start` instant and then every interval thereafter (default `False` to retain current behavior) (#2600), thanks for the idea @stastnypremysl - Added `time_bars_build_delay` config option for `DataEngineConfig` (#2676), thanks @faysou - Added immediate firing capability for time alerts and corresponding test (#2745), thanks @stastnypremysl - Added missing serialization mappings for some instruments (#2702), thanks @faysou - Added support for DEX swaps for blockchain adapter (#2683), thanks @filipmacek - Added support for Pool liquidity updates for blockchain adapter (#2692), thanks @filipmacek - Added fill report reconciliation warning when discrepancy with existing fill (#2706), thanks @faysou - Added optional metadata function for custom data query (#2724), thanks @faysou - Added support for order-list submission in the sandbox execution client (#2714), thanks @petioptrv - Added hidden order support for IBKR (#2739), thanks @sunlei - Added `subscribe_order_book_deltas` support for IBKR (#2749), thanks @sunlei - Added `bid_levels` and `ask_levels` for `OrderBook.pprint` - Added `accepted_buffer_ns` filter param for `Cache.own_bid_orders(...)` and `Cache.own_ask_orders(...)` - Added trailing stop orders `activation_price` support in Rust (#2750), thanks @nicolad ### Breaking Changes - Renamed catalog `instrument_ids` filter param to `identifiers` to more accurately describe strings which can represent either instrument IDs or bar types - Changed behavior of timers `allow_past=False` to permit `start` times in the past if the next event time is still in the future - Changed Databento DBN upgrade policy to default v3 - Removed problematic negative balance check for margin accounts (cash account negative balance check remains unchanged) - Removed support for Databento DBN v1 schemas (migrate to DBN v2 or v3, see [DBN Changelog](https://github.com/databento/dbn/blob/main/CHANGELOG.md#0350---2025-05-28)) ### Internal Improvements - Added logging macros for custom component and color in Rust - Added Cython-level parameter validation for timer operations to prevent Rust panics and provide clearer Python error messages - Added property-based testing for `Price`, `Quantity`, `Money` value types in Rust - Added property-based testing for `UnixNanos` in Rust - Added property-based testing for `OrderBook` in Rust - Added property-based testing for `TestTimer` in Rust - Added property-based testing for `network` crate in Rust - Added chaos testing with `turmoil` for socket clients in Rust - Added `check_positive_decimal` correctness function and use for instrument validations (#2736), thanks @nicolad - Added `check_positive_money` correctness function and use for instrument validations (#2738), thanks @nicolad - Ported data catalog refactor to Rust (#2681, #2720), thanks @faysou - Optimized `TardisCSVDataLoader` performance (~90% memory usage reduction, ~60-70% faster) - Consolidated the clocks and timers v2 feature from @twitu - Consolidated on pure Rust cryptography crates with no dependencies on native certs or openssl - Consolidated on `aws-lc-rs` cryptography for FIPS compliance - Confirmed parity between Cython and Rust indicators (#2700, #2710, #2713), thanks @nicolad - Implemented `From<Pool>` -> `CurrencyPair` & `InstrumentAny` (#2693), thanks @nicolad - Updated `Makefile` to use new docker compose syntax (#2746), thanks @stastnypremysl - Updated Tardis exchange mappings - Improved live engine message processing to ensure exceptions result in a crash rather than continuing without the queue processing messages - Improved live reconciliation robustness and testing - Improved listen key error handling and recovery for Binance - Improved handling of negative balances in backtests (#2730), thanks @ms32035 - Improved robustness of cash and margin account locked balance calculations to avoid negative free balance - Improved robustness of fill price parsing for Betfair - Improved implementation, validations and testing for Rust instruments (#2723, #2733), thanks @nicolad - Improved `Currency` equality to use `strcmp` to avoid C pointer comparison issues with `ustr` string interning - Improved unsubscribe cleanup(s) for Bybit adapter - Improved `Makefile` to be self-documenting (#2741), thanks @sunlei - Refactored IB adapter (#2647), thanks @faysou - Refactored data catalog (#2652, #2740), thanks @faysou - Refined Rust data catalog (#2734), thanks @faysou - Refined logging subsystem lifecycle management and introduce global log sender - Refined signal serialization and tests (#2705), thanks @faysou - Refined CI/CD and build system (#2707), thanks @stastnypremysl - Upgraded Rust (MSRV) to 1.88.0 - Upgraded Cython to v3.1.2 - Upgraded `databento` crate to v0.28.0 - Upgraded `datafusion` crate to v48.0.0 - Upgraded `pyo3` and `pyo3-async-runtimes` crates to v0.25.1 - Upgraded `redis` crate to v0.32.3 - Upgraded `tokio` crate to v1.46.1 - Upgraded `tokio-tungstenite` crate to v0.27.0 ### Fixes - Fixed `AccountBalance` mutation in `AccountState` events (#2701), thanks for reporting @DeirhX - Fixed order book cache consistency in update and remove operations (found through property-based testing) - Fixed order status report generation for Polymarket where `venue_order_id` was unbounded - Fixed data request identifier attribute access for `LiveDataClient` - Fixed `generate_order_modify_rejected` typo in Binance execution client (#2682), thanks for reporting @etiennepar - Fixed order book depth handling in subscriptions for Binance - Fixed potential `IndexError` with empty bars requests for Binance - Fixed GTD-GTC time in force conversion for Binance - Fixed incorrect logging of trigger type for Binance - Fixed trade ticks unsubscribe for Binance which was not differentiating aggregated trades - Fixed pending update hot cache cleanup for Betfair execution client - Fixed invalid session information on account update for Betfair execution client - Fixed order book snapshots unsubscribe for Tardis data client - Fixed Arrow schema registration for `BinanceBar` - Fixed gRPC server shutdown warning when running dYdX integration tests - Fixed registration of encoder and decoder for `BinanceBar`, thanks for reporting @miller-moore - Fixed spot and futures sandbox for Binance (#2687), thanks @petioptrv - Fixed `clean` and `distclean` make targets entering `.venv` and corrupting the Python virtual env, thanks @faysou - Fixed catalog identifier matching to exact match (#2732), thanks @faysou - Fixed last value updating for RSI indicator (#2703), thanks @bartlaw - Fixed gateway/TWS reconnect process for IBKR (#2710), thanks @bartlaw - Fixed Interactive Brokers options chain issue (#2711), thanks @FGU1 - Fixed partially filled bracket order and SL triggered for IBKR (#2704, #2717), thanks @bartlaw - Fixed instrument message decoding when no `exchange` value for Databento US equities - Fixed fetching single-instrument trading fees for `Binance`, thanks @petioptrv - Fixed IB-TWS connection issue with international languages (#2726), thanks @DracheShiki - Fixed bar requests for Bybit where pagination was incorrect which limited bars being returned - Fixed Bybit Unknown Error (#2742), thanks @DeevsDeevs - Fixed margin balance parsing for Bybit - Restored task error logs for IBKR (#2716), thanks @bartlaw ### Documentation Updates - Updated IB adapter documentation (#2729), thanks @faysou - Improved reconciliation docs in live concept guide ### Deprecations - Deprecated `Portfolio.set_specific_venue(...)`, to be removed in a future release; use `Cache.set_specific_venue(...)` instead