Skip to content

Releases: nautechsystems/nautilus_trader

NautilusTrader 1.206.0 Beta

17 Nov 08:56
Compare
Choose a tag to compare

NautilusTrader 1.206.0 Beta

Released on 17th November 2024 (UTC).

Enhancements

  • Added TardisDataClient providing live data streams from a Tardis Machine WebSocket server
  • Added TardisInstrumentProvider providing instrument definitions from Tardis through the HTTP instrument metadata API
  • Added Portfolio.realized_pnl(...) method for per instrument realized PnL (based on positions)
  • Added Portfolio.realized_pnls(...) method for per venue realized PnL (based on positions)
  • Added configuration warning for InstrumentProvider (to warn when node starts with no instrument loading)
  • Implemented Tardis optional symbol normalization
  • Implemented WebSocketClient reconnection retries (#2044), thanks @davidsblom
  • Implemented OrderCancelRejected event generation for Binance and Bybit
  • Implemented OrderModifyRejected event generation for Binance and Bybit
  • Improved OrderRejected handling of reason string (None is now allowed which will become the string 'None')
  • Improved OrderCancelRejected handling of reason string (None is now allowed which will become the string 'None')
  • Improved OrderModifyRejected handling of reason string (None is now allowed which will become the string 'None')

Internal Improvements

  • Ported RiskEngine to Rust (#2035), thanks @Pushkarm029 and @twitu
  • Ported ExecutionEngine to Rust (#2048), thanks @twitu
  • Added globally shared data channels to send events from engines to Runner in Rust (#2042), thanks @twitu
  • Added LRU caching for dYdX HTTP client (#2049), thanks @davidsblom
  • Improved identifier constructors to take AsRef<str> for a cleaner more flexible API
  • Refined identifiers From trait impls
  • Refined InstrumentProvider initialization behavior and logging
  • Refined LiveTimer cancel and performance testing
  • Simplified LiveTimer cancellation model (#2046), thanks @twitu
  • Refined Bybit HMAC authentication signatures (now using Rust implemented function)
  • Refined Tardis instrument ID parsing
  • Removed Bybit msgspec redundant import alias (#2050), thanks @sunlei
  • Upgraded databento crate to v0.16.0

Breaking Changes

None

Fixes

  • Fixed loading specific instrument IDs for InstrumentProviderConfig
  • Fixed PyO3 instrument conversions for raw_symbol (was incorrectly using the normalized symbol)
  • Fixed reconcile open orders and account websocket message for dYdX (#2039), thanks @davidsblom
  • Fixed market order avg_px for Polymarket trade reports
  • Fixed Betfair clients keepalive (#2040), thanks @limx0
  • Fixed Betfair reconciliation (#2041), thanks @limx0
  • Fixed Betfair customer order ref limit to 32 chars
  • Fixed Bybit handling of PARTIALLY_FILLED_CANCELED status orders
  • Fixed Polymarket size precision for BinaryOption instruments (precision 6 to match USDC.e)
  • Fixed adapter instrument reloading (providers were not reloading instruments at the configured interval due to internal state flags)
  • Fixed static time logging for BacktestEngine when running with use_pyo3 logging config
  • Fixed in-flight orders check and improve error handling (#2053), thanks @davidsblom
  • Fixed dYdX handling for liquidated fills (#2052), thanks @davidsblom
  • Fixed BybitResponse.time field as optional int (#2051), thanks @sunlei
  • Fixed single instrument requests for DatabentoDataClient (was incorrectly calling _handle_instruments instead of _handle_instrument), thanks for reporting @Emsu
  • Fixed fsspec recursive globbing behavior to ensure only file paths are included, and bumped dependency to version 2024.10.0
  • Fixed jupyterlab url typo (#2057), thanks @Alsheh

NautilusTrader 1.205.0 Beta

03 Nov 17:50
Compare
Choose a tag to compare

NautilusTrader 1.205.0 Beta

Released on 3rd November 2024 (UTC).

Enhancements

  • Added Tardis Machine and HTTP API integration in Python and Rust
  • Added LiveExecEngineConfig.open_check_interval_secs config option to actively reconcile open orders with the venue
  • Added aggregation of bars from historical data (#2002), thanks @faysou
  • Added monthly and weekly bar aggregations (#2025), thanks @faysou
  • Added raise_exception optional parameter to TradingNode.run (#2021), thanks @faysou
  • Added OrderBook.get_avg_px_qty_for_exposure in Rust (#1893), thanks @elementace
  • Added timeouts to Interactive Brokers adapter configurations (#2026), thanks @rsmb7z
  • Added optional time origins for time bar aggregation (#2028), thanks @faysou
  • Added Polymarket position status reports and order status report generation based on fill reports
  • Added USDC.e (PoS) currency (used by Polymarket) to internal currency map
  • Upgraded Polymarket WebSocket API to new version

Internal Improvements

  • Ported analysis subpackage to Rust (#2016), thanks @Pushkarm029
  • Improved Postgres testing (#2018), thanks @filipmacek
  • Improved Redis version parsing to support truncated versions (improves compatibility with Redis-compliant databases)
  • Refined Arrow serialization (record batch functions now also available in Rust)
  • Refined core Bar API to remove unnecessary unwraps
  • Standardized network client logging
  • Fixed all pyo3 deprecations for API breaking changes
  • Fixed all clippy warning lints for PyO3 changes (#2030), thanks @Pushkarm029
  • PyO3 upgrade refactor and repair catalog tests (#2032), thanks @twitu
  • Upgraded pyo3 crate to v0.22.5
  • Upgraded pyo3-async-runtimes crate to v0.22.0
  • Upgraded tokio crate to v1.41.0

Breaking Changes

  • Removed pyo3 DataTransformer (was being used for namespacing, so refactored to separate functions)
  • Moved TEST_DATA_DIR constant from tests to nautilus_trader package (#2020), thanks @faysou

Fixes

  • Fixed use of Redis KEYS command which, is unsupported in cluster environments (replaced with SCAN for compatibility)
  • Fixed decoding fill HTTP messages for dYdX (#2022), thanks @davidsblom
  • Fixed account balance report for dYdX (#2024), thanks @davidsblom
  • Fixed Interactive Brokers market data client subscription log message (#2012), thanks @marcodambros
  • Fixed Polymarket execution reconciliation (was not able to reconcile from closed orders)
  • Fixed catalog query mem leak test (#2031), thanks @Pushkarm029
  • Fixed OrderInitialized.to_dict() tags value type to list[str] (was a concatenated str)
  • Fixed OrderInitialized.to_dict() linked_order_ids value type to list[str] (was a concatenated str)
  • Fixed Betfair clients shutdown (#2037), thanks @limx0

NautilusTrader 1.204.0 Beta

22 Oct 10:01
Compare
Choose a tag to compare

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

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

NautilusTrader 1.203.0 Beta

05 Oct 20:23
Compare
Choose a tag to compare

NautilusTrader 1.203.0 Beta

Released on 5th October 2024 (UTC).

Enhancements

  • Added mode parameter to ParquetDataCatalog.write_data to control data writing behavior (#1976), thanks @faysou
  • Added batch cancel for short terms orders of dYdX (#1978), thanks @davidsblom
  • Improved OKX configuration (#1966), thanks @miller-moore
  • Improved option greeks (#1964), thanks @faysou

Internal Improvements

  • Implemented order book delta processing for SimulatedExchange (#1975), thanks @filipmacek
  • Implemented bar processing for SimulatedExchange (#1969), thanks @filipmacek
  • Implemented remaining getter functions in SimulatedExchange (#1970), thanks @filipmacek
  • Implemented rate limiting for dYdX websocket subscriptions (#1977), thanks @davidsblom
  • Refactored reconnection handling for dYdX (#1983), thanks @davidsblom
  • Refined DatabentoDataLoader internals to accommodate usage from Rust
  • Added initial large test data files download and caching capability

Breaking Changes

None

Fixes

  • Fixed out of order row groups in DataFusion filter query (#1974), thanks @twitu
  • Fixed BacktestNode data sorting regression causing clock non-decreasing time assertion error
  • Fixed circular imports for Actor, thanks @limx0
  • Fixed OKX HTTP client signatures (#1966), thanks @miller-moore
  • Fixed resubscribing to orderbooks for dYdX (#1973), thanks @davidsblom
  • Fixed generating cancel rejections for dYdX (#1982), thanks @davidsblom
  • Fixed WebSocketClient task cleanup on disconnect (#1981), thanks @twitu
  • Fixed Condition method name collisions with C true and false macros, which occurred during compilation in profiling mode

NautilusTrader 1.202.0 Beta

27 Sep 12:12
Compare
Choose a tag to compare

NautilusTrader 1.202.0 Beta

Released on 27th September 2024 (UTC).

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

The numpy version requirement has been relaxed to >= 1.26.4.

Enhancements

  • Added Polymarket decentralized prediction market integration
  • Added OKX crypto exchange integration (#1951), thanks @miller-moore
  • Added BinaryOption instrument (supports Polymarket integration)
  • Added LiveExecutionEngine.inflight_check_retries config option to limit in-flight order query attempts
  • Added Symbol.root() method for obtaining the root of parent or composite symbols
  • Added Symbol.topic() method for obtaining the subscription topic of parent or composite symbols
  • Added Symbol.is_composite() method to determine if symbol is made up of parts with period (.) delimiters
  • Added underlying filter parameter for Cache.instruments(...) method
  • Added reduce_only parameter for Strategy.close_position(...) method (True by default to maintain current behavior)
  • Added reduce_only parameter for Strategy.close_all_positions(...) method (True by default to maintain current behavior)
  • Implemented flush with truncate Postgres function for PostgresCacheDatabase (#1928), thanks @filipmacek
  • Implemented file rotation for StreamingFeatherWriter with internal improvements using Clock and Cache (#1954, #1961), thanks @graceyangfan
  • Improved dYdX execution client to use RetryManager for HTTP requests (#1941), thanks @davidsblom
  • Improved Interactive Brokers adapter to use a dynamic IB gateway container_image from config (#1940), thanks @rsmb7z
  • Improved OrderBookDeltas streaming and batching based on the F_LAST flag
  • Standardized underscore thousands separators for backtest logging
  • Updated Databento publishers.json

Internal Improvements

  • Implemented OrderTestBuilder to assist testing in Rust (#1952), thanks @filipmacek
  • Implemented quote tick processing for SimulatedExchange in Rust (#1956), thanks @filipmacek
  • Implemented trade tick processing for SimulatedExchange in Rust (#1956), thanks @filipmacek
  • Refined Logger to use unbuffered stdout/stderr writers (#1960), thanks @twitu

Breaking Changes

  • Renamed batch_size_bytes to chunk_size (more accurate naming for number of data points to process per chunk in backtest streaming mode)
  • Standardized Stop-Loss (SL) and Take-Profit (TP) param ordering for OrderFactory.bracket(...) including: tp_time_in_force, tp_exec_algorithm_params, tp_tags, tp_client_order_id

Fixes

  • Fixed LoggingConfig issue for level_file when used with use_pyo3=True (was not passing through the level_file setting), thanks for reporting @xt2014
  • Fixed composite bar requests (#1923), thanks @faysou
  • Fixed average price calculation for ValueBarAggregator (#1927), thanks @faysou
  • Fixed breaking protobuf issue by pinning protobuf and grpcio for dYdX (#1929), thanks @davidsblom
  • Fixed edge case where exceptions raised in BacktestNode prior to engine initialization would not produce logs, thanks for reporting @faysou
  • Fixed handling of internal server error for dYdX (#1938), thanks @davidsblom
  • Fixed BybitWebSocketClient private channel authentication on reconnect, thanks for reporting @miller-moore
  • Fixed OrderFactory.bracket(...) param ordering for sl_time_in_force and tp_time_in_force, thanks for reporting @marcodambros
  • Fixed Cfd instrument Arrow schema and serialization
  • Fixed bar subscriptions on TWS/GW restart for Interactive Brokers (#1950), thanks @rsmb7z
  • Fixed Databento parent and continuous contract subscriptions (using new symbol root)
  • Fixed Databento FuturesSpread and OptionsSpread instrument decoding (was not correctly handling price increments and empty underlyings)
  • Fixed FuturesSpread serialization
  • Fixed OptionsSpread serialization

NautilusTrader 1.201.0 Beta

09 Sep 12:16
Compare
Choose a tag to compare

NautilusTrader 1.201.0 Beta

Released on 9th September 2024 (UTC).

Enhancements

  • Added order book deltas triggering support for OrderEmulator
  • Added OrderCancelRejected event generation for dYdX adapter (#1916), thanks @davidsblom
  • Refined handling of Binance private key types (RSA, Ed25519) and integrated into configs
  • Implemented cryptographic signing in Rust (replacing pycryptodome for Binance)
  • Removed the vendored tokio-tungstenite crate (#1902), thanks @VioletSakura-7

Breaking Changes

None

Fixes

  • Fixed BinanceFuturesEventType by adding new TRADE_LITE member, reflecting the Binance update on 2024-09-03 (UTC)

NautilusTrader 1.200.0 Beta

07 Sep 10:30
Compare
Choose a tag to compare

NautilusTrader 1.200.0 Beta

Released on 7th September 2024 (UTC).

Enhancements

  • Added dYdX integration (#1861, #1868, #1873, #1874, #1875, #1877, #1879, #1880, #1882, #1886, #1887, #1890, #1891, #1896, #1901, #1903, #1907, #1910, #1911, #1913, #1915), thanks @davidsblom
  • Added composite bar types, bars aggregated from other bar types (#1859, #1885, #1888, #1894, #1905), thanks @faysou
  • Added OrderBookDeltas.batch for batching groups of deltas based on record flags (batch until F_LAST)
  • Added OrderBookDeltas batching support for ParquetDataCatalog (use data_cls of OrderBookDeltas to batch with the same flags method as live adapters)
  • Added RetryManagerPool to abstract common retry functionality for all adapters
  • Added InstrumentClose functionality for OrderMatchingEngine, thanks @limx0
  • Added BacktestRunConfig.dispose_on_completion config setting to control post-run disposal behavior for each internal backtest engine (True by default to retain current behavior)
  • Added recv_window_ms config setting for BinanceExecClientConfig
  • Added sl_time_in_force and tp_time_in_force parameters to OrderFactory.bracket(...) method
  • Added custom client_order_id parameters to OrderFactory methods
  • Added support for Binance RSA and Ed25519 API key types (#1908), thanks @NextThread
  • Added multiplier parameter for CryptoPerpetual (default 1)
  • Implemented BybitExecutionClient retry logic for submit_order, modify_order, cancel_order and cancel_all_orders
  • Improved error modeling and handling in Rust (#1866), thanks @twitu
  • Improved HttpClient error handling and added HttpClientError exception for Python (#1872), thanks @twitu
  • Improved WebSocketClient error handling and added WebSocketClientError exception for Python (#1876), thanks @twitu
  • Improved WebSocketClient.send_text efficiency (now accepts UTF-8 encoded bytes, rather than a Python string)
  • Improved @customdataclass decorator with date field and refined __repr__ (#1900, #1906, #1909), thanks @faysou
  • Improved standardization of OrderBookDeltas parsing and records flags for crypto venues
  • Refactored RedisMessageBusDatabase to tokio tasks
  • Refactored RedisCacheDatabase to tokio tasks
  • Upgraded tokio crate to v1.40.0

Breaking Changes

  • Renamed heartbeat_interval to heartbeat_interval_secs (more explicitly indicates time units)
  • Moved heartbeat_interval_secs config setting to MessageBusConfig (the message bus handles external stream processing)
  • Changed WebSocketClient.send_text(...) to take data as bytes rather than str
  • Changed CryptoPerpetual Arrow schema to include multiplier field
  • Changed CryptoFuture Arrow schema to include multiplier field

Fixes

  • Fixed OrderBook memory deallocation in Python finalizer (memory was not being freed on object destruction), thanks for reporting @zeyuhuan
  • Fixed Order tags serialization (was not concatenating to a single string), thanks for reporting @DevRoss
  • Fixed types_filter serialization in MessageBusConfig during kernel setup
  • Fixed InstrumentProvider handling of load_ids_on_start when elements are already InstrumentIds
  • Fixed InstrumentProviderConfig hashing for filters field

NautilusTrader 1.199.0 Beta

19 Aug 18:00
Compare
Choose a tag to compare

NautilusTrader 1.199.0 Beta

Released on 19th August 2024 (UTC).

Enhancements

  • Added LiveExecEngineConfig.generate_missing_orders reconciliation config option to align internal and external position states
  • Added LogLevel::TRACE (only available in Rust for debug/development builds)
  • Added Actor.subscribe_signal(...) method and Data.is_signal(...) class method (#1853), thanks @faysou
  • Added Binance Futures support for HEDGE mode (#1846), thanks @DevRoss
  • Overhauled and refined error modeling and handling in Rust (#1849, #1858), thanks @twitu
  • Improved BinanceExecutionClient position report requests (can now filter by instrument and includes reporting for flat positions)
  • Improved BybitExecutionClient position report requests (can now filter by instrument and includes reporting for flat positions)
  • Improved LiveExecutionEngine reconciliation robustness and recovery when internal positions do not match external positions
  • Improved @customdataclass decorator constructor to allow more positional arguments (#1850), thanks @faysou
  • Improved @customdataclass documentation (#1854), thanks @faysou
  • Upgraded datafusion crate to v41.0.0
  • Upgraded tokio crate to v1.39.3
  • Upgraded uvloop to v0.20.0 (upgrades libuv to v1.48.0)

Breaking Changes

  • Changed VolumeWeightedAveragePrice calculation formula to use each bars "typical" price (#1842), thanks @evgenii-prusov
  • Changed OptionsContract constructor parameter ordering and Arrow schema (consistently group option kind and strike price)
  • Renamed snapshot_positions_interval to snapshot_positions_interval_secs (more explicitly indicates time units)
  • Moved snapshot_orders config setting to ExecEngineConfig (can now be used for all environment contexts)
  • Moved snapshot_positions config setting to ExecEngineConfig (can now be used for all environment contexts)
  • Moved snapshot_positions_interval_secs config setting to ExecEngineConfig (can now be used for all environment contexts)

Fixes

  • Fixed Position exception type on duplicate fill (should be KeyError to align with the same error for Order)
  • Fixed Bybit position report parsing when position is flat (BybitPositionSide now correctly handles the empty string)

NautilusTrader 1.198.0 Beta

09 Aug 12:19
Compare
Choose a tag to compare

NautilusTrader 1.198.0 Beta

Released on 9th August 2024 (UTC).

Enhancements

  • Added @customdata decorator to reduce need for boiler plate implementing custom data types (#1828), thanks @faysou
  • Added timeout for HTTP client in Rust (#1835), thanks @davidsblom
  • Added catalog conversion function of streamed data to backtest data (#1834), thanks @faysou
  • Upgraded Cython to v3.0.11

Breaking Changes

None

Fixes

  • Fixed creation of instrumend_id folder when writing PyO3 bars in catalog (#1832), thanks @faysou
  • Fixed StreamingFeatherWriter handling of include_types option (#1833), thanks @faysou
  • Fixed BybitExecutionClient position reports error handling and logging
  • Fixed BybitExecutionClient order report handling to correctly process external orders

NautilusTrader 1.197.0 Beta

02 Aug 22:04
53eea6a
Compare
Choose a tag to compare

NautilusTrader 1.197.0 Beta

Released on 2nd August 2024 (UTC).

Enhancements

  • Added Databento Status schema support for loading and live trading
  • Added options on futures support for Interactive Brokers (#1795), thanks @rsmb7z
  • Added documentation for option greeks custom data example (#1788), thanks @faysou
  • Added MarketStatusAction enum (support Databento status schema)
  • Added ignore_quote_tick_size_updates config option for Interactive Brokers (#1799), thanks @sunlei
  • Implemented MessageBus v2 in Rust (#1786), thanks @twitu
  • Implemented DataEngine v2 in Rust (#1785), thanks @twitu
  • Implemented FillModel in Rust (#1801), thanks @filipmacek
  • Implemented FixedFeeModel in Rust (#1802), thanks @filipmacek
  • Implemented MakerTakerFeeModel in Rust (#1803), thanks @filipmacek
  • Implemented Postgres native enum mappings in Rust (#1797, #1806), thanks @filipmacek
  • Refactored order submission error handling for Interactive Brokers (#1783), thanks @rsmb7z
  • Improved live reconciliation robustness (will now generate inferred orders necessary to align external position state)
  • Improved tests for Interactive Brokers (#1776), thanks @mylesgamez
  • Upgraded tokio crate to v1.39.2
  • Upgraded datafusion crate to v40.0.0

Breaking Changes

  • Removed VenueStatus and all associated methods and schemas (redundant with InstrumentStatus)
  • Renamed QuoteTick.extract_volume(...) to .extract_size(...) (more accurate terminology)
  • Changed InstrumentStatus params (support Databento status schema)
  • Changed InstrumentStatus arrow schema
  • Changed OrderBook FFI API to take data by reference instead of by value

Fixes

  • Fixed rounding errors in accounting calculations for large values (using decimal.Decimal internally)
  • Fixed multi-currency account commission handling with multiple PnL currencies (#1805), thanks for reporting @dpmabo
  • Fixed DataEngine unsubscribing from order book deltas (#1814), thanks @davidsblom
  • Fixed LiveExecutionEngine handling of adapter client execution report causing None mass status (#1789), thanks for reporting @faysou
  • Fixed InteractiveBrokersExecutionClient handling of instruments not found when generating execution reports (#1789), thanks for reporting @faysou
  • Fixed Bybit parsing of trade and quote ticks for websocket messages (#1794), thanks @davidsblom