v1.204.0
nautechsystems/nautilus_traderv1.204.0Oct 22, 2024by github-actions[bot]
AI Summary
This release focuses on Tardis CSV support, microsecond timestamp utilities, and breaking changes to legacy loaders and data structures.
Key Highlights
- Added TardisCSVDataLoader for loading legacy format CSV files.
- Added Clock.timestamp_us() method for UNIX timestamps in microseconds.
- Implemented rate limiter for WebSocketClient.
Breaking Changes
- Removed legacy TardisQuoteDataLoader and TardisTradeDataLoader.
- Custom signals now passed to on_signal(signal) instead of on_data(data).
- Changed Position.to_dict() commission value type to list[str].
- Changed BettingInstrument Arrow schema fields to uint64.
New Features
- TardisCSVDataLoader
- Clock.timestamp_us()
- compute_effective_deltas config setting
- on_signal(signal) handler
- nautilus_trader.common.events module
Full Release Notes
# NautilusTrader 1.204.0 Beta Released on 22nd October 2024 (UTC). ### Enhancements - Added `TardisCSVDataLoader` for loading data from Tardis format CSV files as either legacy Cython or PyO3 objects - Added `Clock.timestamp_us()` method for UNIX timestamps in microseconds (μs) - Added support for `bbo-1s` and `bbo-1m` quote schemas for Databento adapter (#1990), thanks @faysou - Added validation for venue `book_type` configuration vs data (prevents an issue where top-of-book data is used when order book data is expected) - Added `compute_effective_deltas` config setting for `PolymarketDataClientConfig`, reducing snapshot size (`False` by default to maintain current behavior) - Added rate limiter for `WebSocketClient` (#1994), thanks @Pushkarm029 - Added in the money probability field to GreeksData (#1995), thanks @faysou - Added `on_signal(signal)` handler for custom signal data - Added `nautilus_trader.common.events` module with re-exports for `TimeEvent` and other system events - Improved usability of `OrderBookDepth10` by filling partial levels with null orders and zero counts - Improved Postgres config (#2010), thanks @filipmacek - Refined `DatabentoInstrumentProvider` handling of large bulks of instrument definitions (improved parent symbol support) - Standardized Betfair symbology to use hyphens instead of periods (prevents Betfair symbols being treated as composite) - Integration guide docs fixes (#1991), thanks @FarukhS52 ### Internal Improvements - Ported `Throttler` to Rust (#1988), thanks @Pushkarm029 and @twitu - Ported `BettingInstrument` to Rust - Refined `RateLimiter` for `WebSocketClient` and add tests (#2000), thanks @Pushkarm029 - Refined `WebSocketClient` to close existing tasks on reconnect (#1986), thanks @davidsblom - Remove mutable references in `CacheDatabaseAdapter` trait in Rust (#2015), thanks @filipmacek - Use Rust rate limiter for dYdX websockets (#1996, #1999), thanks @davidsblom - Improved error logs for dYdX websocket subscriptions (#1993), thanks @davidsblom - Standardized log and error message syntax in Rust - Continue porting `SimulatedExchange` and `OrderMatchingEngine` to Rust (#1997, #1998, #2001, #2003, #2004, #2006, #2007, #2009, #2014), thanks @filipmacek ### Breaking Changes - Removed legacy `TardisQuoteDataLoader` (now redundant with new Rust implemented loader) - Removed legacy `TardisTradeDataLoader` (now redundant with new Rust implemented loader) - Custom signals are now passed to `on_signal(signal)` instead of `on_data(data)` - Changed `Position.to_dict()` `commissions` value type to `list[str]` (rather than an optional `str` of a list of strings) - Changed `Position.to_dict()` `avg_px_open` value type to `float` - Changed `Position.to_dict()` `avg_px_close` value type to `float | None` - Changed `Position.to_dict()` `realized_return` value type to `float | None` - Changed `BettingInstrument` Arrow schema fields `event_open_date` and `market_start_time` from `string` to `uint64` ### Fixes - Fixed `SocketClient` TLS implementation - Fixed `WebSocketClient` error handling on writer close, thanks for reporting @davidsblom - Fixed resubscribing to orderbook in batched mode for dYdX (#1985), thanks @davidsblom - Fixed Betfair tests related to symbology (#1988), thanks @limx0 - Fixed check for `OmsType` in `OrderMatchingEngine` position ID processing (#2003), thanks @filipmacek - Fixed `TardisCSVDataLoader` snapshot5 and snapshot25 parsing (#2005), thanks @Pushkarm029 - Fixed Binance clients venue assignment, we should use the `client_id` params (which match the custom client `name`) to communicate with the clients, and use the same `'BINANCE'` venue identifiers - Fixed `OrderMatchingEngine` incorrectly attempting to process monthly bars for execution (which will fail, as no reasonable `timedelta` is available), thanks for reporting @frostRed - Fixed handling `MONTH` aggregation for `cache.bar_types()` (sorting required an internal call for the bar intervals `timedelta`), thanks for reporting @frostRed