NautilusTrader 1.217.0 Beta
Released on 30th April 2025 (UTC).
Enhancements
- Added processing of
OrderBookDepth10forBacktestEngineandOrderMatchingEngine(#2542), thanks @limx0 - Added
Actor.subscribe_order_book_depth(...)subscription method (#2555), thanks @limx0 - Added
Actor.unsubscribe_order_book_depth(...)subscription method - Added
Actor.on_order_book_depth(...)handler method (#2555), thanks @limx0 - Added
UnixNanos::max()convenience method for the maximum valid value - Added
available_offsetfilter parameter forTardisInstrumentProvider - Added
NAUTILUS_WORKER_THREADSenvironment variable for common tokio runtime builder - Added
Quantity::non_zero(...)method - Added
Quantity::non_zero_checked(...)method - Added
round_downparam forInstrument.make_qty(...)that isFalseby default to maintain current behavior - Added WebSocket batch order operations for Bybit (#2521), thanks @sunlei
- Added mark price subscription for Binance Futures (#2548), thanks @bartolootrit
- Added
Chainstruct to represent blockchain network (#2526), thanks @filipmacek - Added
Blockprimitive for blockchain domain model (#2535), thanks @filipmacek - Added
Transactionprimitive for blockchain domain model (#2551), thanks @filipmacek - Added initial blockchain adapter with live block subscription (#2557), thanks @filipmacek
Breaking Changes
- Removed fees from locked balance calculations for
CASHaccounts - Removed fees from margin calculations for
MARGINaccounts - Renamed
idconstructor parameter toinstrument_idacross all PyO3 instruments, aligning with equivalent Cython instrument constructors
Internal Improvements
- Implemented exponential backoff and jitter for the
RetryManager(#2518), thanks @davidsblom - Simplified default locked balance and margin calculations to not include fees
- Improved handling of time range and effective date filters for
TardisInstrumentProvider - Improved reconnection robustness for Bybit private/trading channels (#2520), thanks @sunlei
- Improved logger buffers flushing post backtest
- Improved validations for Tardis trades data
- Improved correctness of client registration and deregistration for
ExecutionEngine - Improved build time by only compiling libraries (#2539), thanks @twitu
- Improved logging flush (#2568), thanks @faysou
- Improved
clear_log_fileto happen for each kernel initialization (#2569), thanks @faysou - Refined
PriceandQuantityvalidations and correctness - Filter fill events if order is already filled for dYdX (#2547), thanks @davidsblom
- Fixed some clippy lints (#2517), thanks @twitu
- Upgraded
databentocrate to v0.24.0 - Upgraded
datafusioncrate to v47.0.0 - Upgraded
rediscrate to v0.30.0 - Upgraded
sqlxcrate to v0.8.5 - Upgraded
pyo3crate to v0.24.2
Fixes
- Fixed consistent ordering of execution events (#2513, #2554), thanks for reporting @stastnypremysl
- Fixed type error when generating an elapsed time for backtests with no elapsed time
- Fixed memory leak in
RetryManagerby simplifying the acquire-release pattern, avoiding the asynchronous context manager protocol that led to state sharing, thanks for reporting @DeevsDeevs - Fixed locked balance and initial margin calculations for reduce-only orders (#2505), thanks for reporting @stastnypremysl
- Fixed purging order events from position (these needed to be purged prior to removing cache index entry), thanks @DeevsDeevs
- Fixed
TypeErrorwhen formatting backtest post run timestamps which wereNone(#2514), thanks for reporting @stastnypremysl - Fixed handling of
BetfairSequenceCompletedas custom data - Fixed the instrument class of
IndexInstrument, changing toSPOTto correctly represent a spot index of underlying constituents - Fixed data range request
endhandling forDataEngine - Fixed unsubscribe instrument close for
DataEngine - Fixed network clients authentication for OKX (#2553), thanks for reporting @S3toGreen
- Fixed account balance calculation for dYdX (#2563), thanks @davidsblom
- Fixed
ts_initfor databento historical data (#2566), thanks @faysou - Fixed
RequestInstrumentinquery_catalog(#2567), thanks @faysou - Reverted removal of rotate log file on UTC date change (#2552), thanks @twitu
Documentation Updates
- Improved environment setup guide with recommended rust analyzer settings (#2538), thanks @twitu
- Fixed alignment with code for some
ExecutionEnginedocstrings
Deprecations
None