v1.210.0
nautechsystems/nautilus_traderv1.210.0Jan 10, 2025by github-actions[bot]
AI Summary
This release adds `PerContractFeeModel`, internal error types for dYdX, and ports the `OrderManager` to Rust. It also standardizes ISO 8601 timestamps to RFC 3339 and improves validation across order types.
Key Highlights
- Added `PerContractFeeModel` for fee calculation
- Added `DYDXInternalError` and `DYDXOraclaPrice` data types for dYdX
- Ported `OrderManager` to Rust
- Standardized ISO 8601 timestamps to RFC 3339 format
Breaking Changes
- Removed optional `value` param from `UUID4`
- Changed `unix_nanos_to_iso8601` and `format_iso8601` to output RFC 3339
- Changed `TradingNode.is_built` and `is_running` from properties to methods
- Changed `OrderInitialized` Arrow schema fields to binary types
- Changed order dict representation types for `avg_px` and `slippage`
- Changed `aggregation_source` filter default to optional
New Features
- Added `PerContractFeeModel`
- Added `DYDXInternalError` and `DYDXOraclaPrice` data types
- Added `time_bars_skip_first_non_full_bar` config option
- Added `execution.fast` support for Bybit
- Added catalog helper functions to export data
- Added `bar_adaptive_high_low_ordering` to `BacktestVenueConfig`
Full Release Notes
# NautilusTrader 1.210.0 Beta Released on 10th January 2025 (UTC). ### Enhancements - Added `PerContractFeeModel`, thanks @stefansimik - Added `DYDXInternalError` and `DYDXOraclaPrice` data types for dYdX (#2155), thanks @davidsblom - Added proper `OrderBookDeltas` flags parsing for Betfair - Added Binance TradeLite message support (#2156), thanks @DeevsDeevs - Added `DataEngineConfig.time_bars_skip_first_non_full_bar` config option (#2160), thanks @faysou - Added `execution.fast` support for Bybit (#2165), thanks @sunlei - Added catalog helper functions to export data (#2135), thanks @twitu - Added additional timestamp properties for `NautilusKernel` - Added `event_logging` config option for `StrategyConfig` (#2183), thanks @sunlei - Added `bar_adaptive_high_low_ordering` to `BacktestVenueConfig` (#2188), thanks @faysou and @stefansimik ### Breaking Changes - Removed optional `value` param from `UUID4` (use `UUID4.from_str(...)` instead), aligns with Nautilus PyO3 API - Changed `unix_nanos_to_iso8601` to output an ISO 8601 (RFC 3339) format string with nanosecond precision - Changed `format_iso8601` to output ISO 8601 (RFC 3339) format string with nanosecond precision - Changed `format_iso8601` `dt` parameter to enforce `pd.Timestamp` (which has nanosecond precision) - Changed `TradingNode.is_built` from a property to a method `.is_built()` - Changed `TradingNode.is_running` from a property to a method `.is_running()` - Changed `OrderInitialized` Arrow schema (`linked_order_ids` and `tags` data types changed from `string` to `binary`) - Changed order dictionary representation field types for `avg_px` and `slippage` from `str` to `float` (as out of alignment with position events) - Changed `aggregation_source` filter parameter for `Cache.bar_types(...)` to optional with default of `None` ### Internal Improvements - Improved market order handling when no size available in book (now explicitly rejects) - Improved validation for `TradeTick` by ensuring `size` is always positive - Improved validation for `OrderBookDelta` by ensuring `order.size` is positive when `action` is either `ADD` or `UPDATE` - Improved validation for `BarSpecification` by ensuring `step` is always positive - Standardized ISO 8601 timestamps to RFC 3339 spec with nanosecond precision - Standardized flags for `OrderBookDeltas` parsing across adapters - Refined parsing candles for dYdX (#2148), thanks @davidsblom - Refined imports for type hints in Bybit (#2149), thanks @sunlei - Refined private WebSocket message processing for Bybit (#2170), thanks @sunlei - Refined WebSocket client re-subscribe log for Bybit (#2179), thanks @sunlei - Refined margin balance report for dYdX (#2154), thanks @davidsblom - Enhanced `lotSizeFilter` field for Bybit (#2166), thanks @sunlei - Renamed WebSocket private client for Bybit (#2180), thanks @sunlei - Added unit tests for custom dYdX types (#2163), thanks @davidsblom - Allow bar aggregators to persist after `request_aggregated_bars` (#2144), thanks @faysou - Handle directory and live streams to catalog (#2153), thanks @limx0 - Use timeout when initializing account for dYdX (#2169), thanks @davidsblom - Use retry manager when sending websocket messages for dYdX (#2196), thanks @davidsblom - Refined error logs when sending pong for dYdX (#2184), thanks @davidsblom - Optimized message bus topic `is_matching` (#2151), thanks @ryantam626 - Added tests for `bar_adaptive_high_low_ordering` (#2197), thanks @faysou - Ported `OrderManager` to Rust (#2161), thanks @Pushkarm029 - Ported trailing stop logic to Rust (#2174), thanks @DeevsDeevs - Ported `FeeModel` to Rust (#2191), thanks @filipmacek - Implemented IDs generator for `OrderMatchingEngine` in Rust (#2193), thanks @filipmacek - Upgraded Cython to v3.1.0a1 - Upgraded `tokio` crate to v1.43.0 - Upgraded `datafusion` crate to v44.0.0 ### Fixes - Fixed type check for `DataClient` on requests to support clients other than `MarketDataClient` - Fixed processing trade ticks from bars in `OrderMatchingEngine` - that could result in zero-size trades, thanks for reporting @stefansimik - Fixed `instrument is None` check flows for `DataEngine` and `PolymarketExecutionClient` - Fixed instrument updates in `BetfairDataClient` (#2152), thanks @limx0 - Fixed processing of time events on backtest completion when they occur after the final data timestamp - Fixed missing enum member `CANCELED_MARKET_RESOLVED` for `PolymarketOrderStatus` - Fixed missing `init_id` field from some order `.to_dict()` representations - Fixed writing `DYDXOraclePrice` to catalog (#2158), thanks @davidsblom - Fixed account balance for dYdX (#2167), thanks @davidsblom - Fixed markets schema for dYdX (#2190), thanks @davidsblom - Fixed missing `OrderEmulated` and `OrderReleased` Arrow schemas - Fixed websocket public channel reconnect for Bybit (#2176), thanks @sunlei - Fixed execution report parsing for Binance Spot (client order ID empty string now becomes a UUID4 string) - Fixed docs typo for `fill_order` function in `OrderMatchingEngine` (#2189), thanks @filipmacek ### Documentation Updates - Added docs for `Cache`, slippage and spread handling in backtesting (#2162), thanks @stefansimik - Added docs for `FillModel` and bar based execution (#2187), thanks @stefansimik - Added docs for choosing data (cost vs. accuracy) and bars OHLC processing (#2195), thanks @stefansimik - Added docs for bar processing in backtests (#2198), thanks @stefansimik - Added docs for timestamp and UUID specs