Skip to content

Releases: nautechsystems/nautilus_trader

NautilusTrader 1.215.0 Beta

05 Apr 01:33
Compare
Choose a tag to compare

NautilusTrader 1.215.0 Beta

Released on 5th April 2025 (UTC).

Enhancements

  • Added Cache.purge_closed_order(...)
  • Added Cache.purge_closed_orders(...)
  • Added Cache.purge_closed_position(...)
  • Added Cache.purge_closed_positions(...)
  • Added Cache.purge_account_events(...)
  • Added Account.purge_account_events(...)
  • Added purge_closed_orders_interval_mins config option for LiveExecEngineConfig
  • Added purge_closed_orders_buffer_mins config option for LiveExecEngineConfig
  • Added purge_closed_positions_interval_mins config option for LiveExecEngineConfig
  • Added purge_closed_positions_buffer_mins config option for LiveExecEngineConfig
  • Added purge_account_events_interval_mins config option for LiveExecEngineConfig
  • Added purge_account_events_lookback_mins config option for LiveExecEngineConfig
  • Added Order.ts_closed property
  • Added instrument_ids and bar_types for BacktestDataConfig to improve catalog query efficiency (#2478), thanks @faysou
  • Added venue_dataset_map config option for DatabentoDataConfig to override the default dataset used for a venue (#2483, #2485), thanks @faysou

Breaking Changes

None

Internal Improvements

  • Added Position.purge_events_for_order(...) for purging OrderFilled events and TradeIds associated with a client order ID
  • Added Consumer for WebSocketClient (#2488), thanks @twitu
  • Improved instrument parsing for Tardis with consistent effective timestamp filtering, settlement currency, increments and fees changes
  • Improved error logging for Betfair update_account_state task by logging the full stack trace on error
  • Improved logging for Redis cache database operations
  • Standardized unexpected exception logging to include full stack trace
  • Refined type handling for backtest configs
  • Refined databento venue dataset mapping and configuration (#2483), thanks @faysou
  • Refined usage of databento use_exchange_as_venue (#2487), thanks @faysou
  • Refined time initialization of components in backtest (#2490), thanks @faysou
  • Upgraded Rust MSRV to 1.86.0
  • Upgraded pyo3 crate to v0.24.1

Fixes

  • Fixed MBO feed handling for Databento where an initial snapshot was decoding a trade tick with zero size (#2476), thanks for reporting @JackWCollins
  • Fixed position state snapshots for closed positions where these snapshots were being incorrectly filtered
  • Fixed handling of PolymarketTickSizeChanged message
  • Fixed parsing spot instruments for Tardis where size_increment was zero, now inferred from base currency
  • Fixed default log colors for Rust (#2489), thanks @filipmacek
  • Fixed sccache key for uv in CI (#2482), thanks @davidsblom

Documentation Updates

Deprecations

  • Deprecated strategies written in Cython and removed ema_cross_cython strategy example

NautilusTrader 1.214.0 Beta

28 Mar 13:10
Compare
Choose a tag to compare

NautilusTrader 1.214.0 Beta

Released on 28th March 2025 (UTC).

Enhancements

  • Added Coinbase International Exchange initial integration adapter
  • Added time_in_force parameter for Strategy.close_position(...)
  • Added time_in_force parameter for Strategy.close_all_positions(...)
  • Added MarkPriceUpdate data type
  • Added IndexPriceUpdate data type
  • Added Actor.subscribe_mark_prices(...)
  • Added Actor.subscribe_index_prices(...)
  • Added Actor.unsubscribe_mark_prices(...)
  • Added Actor.unsubscribe_index_prices(...)
  • Added Actor.on_mark_price(...)
  • Added Actor.on_index_price(...)
  • Added Cache.mark_price(...)
  • Added Cache.index_price(...)
  • Added Cache.mark_prices(...)
  • Added Cache.index_prices(...)
  • Added Cache.mark_price_count(...)
  • Added Cache.index_price_count(...)
  • Added Cache.has_mark_prices(...)
  • Added Cache.has_index_prices(...)
  • Added UnixNanos.to_rfc3339() for ISO 8601 (RFC 3339) strings
  • Added recv_window_ms config for Bybit WebSocket order client (#2466), thanks @sunlei
  • Enhanced UnixNanos string parsing to support YYYY-MM-DD date format (interpreted as midnight UTC)

Breaking Changes

  • Changed Cache.add_mark_price(self, InstrumentId instrument_id, Price price) to add_mark_price(self, MarkPriceUpdate mark_price)

Internal Improvements

  • Improved WebSocketClient and SocketClient design with dedicated writer task and message channel
  • Completed global message bus design in Rust (#2460), thanks @filipmacek
  • Refactored enum dispatch (#2461), thanks @filipmacek
  • Refactored data interfaces to messages in Rust
  • Refined catalog file operations in Rust (#2454), thanks @faysou
  • Refined quote ticks and klines for Bybit (#2465), thanks @davidsblom
  • Standardized use of anyhow::bail (#2459), thanks @faysou
  • Ported add_venue for BacktestEngine in Rust (#2457), thanks @filipmacek
  • Ported add_instrument for BacktestEngine in Rust (#2469), thanks @filipmacek
  • Upgraded redis crate to v0.29.2

Fixes

  • Fixed race condition on multiple reconnect attempts for WebSocketClient and SocketClient
  • Fixed position state snapshot ts_snapshot value, which was always ts_last instead of timestamp when the snapshot was taken
  • Fixed instrument parsing for Tardis, now correctly applies changes and filters by effective
  • Fixed OrderStatusReport for conditional orders of dYdX (#2467), thanks @davidsblom
  • Fixed submitting stop market orders for dYdX (#2471), thanks @davidsblom
  • Fixed retrying HTTP calls on DecodeError for dYdX (#2472), thanks @davidsblom
  • Fixed LIMIT_IF_TOUCHED order type enum parsing for Bybit
  • Fixed MARKET order type enum parsing for Bybit
  • Fixed quote ticks for Polymarket to only emit new quote ticks when the top-of-book changes
  • Fixed error on cancel order for IB (#2475), thanks @FGU1

Documentation Updates

  • Improved custom data documentation (#2470), thanks @faysou

Deprecations

None

NautilusTrader 1.213.0 Beta

16 Mar 09:56
Compare
Choose a tag to compare

NautilusTrader 1.213.0 Beta

Released on 16th March 2025 (UTC).

Enhancements

  • Added CryptoOption instrument, supporting inverse and fractional sizes
  • Added Cache.prices(...) to return a map of latest price per instrument for a price type
  • Added use_uuid_client_order_ids config option for StrategyConfig
  • Added catalog consolidation functions of several parquet files into one (#2421), thanks @faysou
  • Added FDUSD (First Digital USD) crypto Currency constant
  • Added initial leverage, margin_mode and position_mode config options for Bybit (#2441), thanks @sunlei
  • Updated parquet catalog in Rust with recent features (#2442), thanks @faysou

Breaking Changes

None

Internal Improvements

  • Added timeout_secs parameter to HttpClient for default timeouts
  • Added additional precision validations for OrderMatchingEngine
  • Added symmetric comparison impls between u64 and UnixNanos
  • Improved InstrumentProvider error handling when loading (#2444), thanks @davidsblom
  • Improved order denied reason message for balance impact
  • Handle BybitErrors when updating instruments for ByBit (#2437), thanks @davidsblom
  • Handle unexpected errors when fetching order books for dYdX (#2445), thanks @davidsblom
  • Retry if HttpError is raised for dYdX (#2438), thanks @davidsblom
  • Refactored some Rust logs to use named parameters in format strings (#2443), thanks @faysou
  • Some minor performance optimizations for Bybit and dYdX adapters (#2448), thanks @sunlei
  • Ported backtest engine and kernel to Rust (#2449), thanks @filipmacek
  • Upgraded pyo3 and pyo3-async-runtimes crates to v0.24.0
  • Upgraded tokio crate to v1.44.1

Fixes

  • Fixed source distribution (sdist) packaging
  • Fixed Clock.timer_names() memory issue resulting in an empty list
  • Fixed underflow panic when setting a time alert in the past (#2446), thanks for reporting @uxbux
  • Fixed logger name for Strategy custom strategy_ids
  • Fixed unbound variable for Bybit (#2433), thanks @sunlei

Documentation Updates

Deprecations

None

NautilusTrader 1.212.0 Beta

11 Mar 04:50
Compare
Choose a tag to compare

NautilusTrader 1.212.0 Beta

Released on 11th March 2025 (UTC).

This release introduces uv as the Python project and dependency management tool.

Enhancements

  • Added OwnOrderBook and OwnBookOrder to track own orders and prevent self-trades in market making
  • Added manage_own_order_books config option for ExecEngineConfig to enable own order tracking
  • Added Cache.own_order_book(...), Cache.own_bid_orders(...) and Cache.own_ask_orders(...) for own order tracking
  • Added optional beta weighting and percent option greeks (#2317), thanks @faysou
  • Added pnl information to greeks data (#2378), thanks @faysou
  • Added precision inference for TardisCSVDataLoader, where price_precision and size_precision are now optional
  • Added Order.ts_accepted property
  • Added Order.ts_submitted property
  • Added UnixNanos::to_datetime_utc() in Rust
  • Added Mark variant for PriceType enum
  • Added mark price handling for Cache
  • Added mark exchange rate handling for Cache
  • Added PortfolioConfig for configuration settings specific to the Portfolio
  • Added use_mark_prices, use_mark_xrates and convert_to_account_base_currency options for PortfolioConfig
  • Added mark price calculations and xrate handling for Portfolio
  • Added Rust debugging support and refined cargo nextest usage (#2335, #2339), thanks @faysou
  • Added catalog write mode options (#2365), thanks @faysou
  • Added BarSpecification to msgspec encoding and decoding hooks (#2373), thanks @pierianeagle
  • Added ignore_external_orders config option for BetfairExecClientConfig, default False to retain current behavior
  • Added requests for order book snapshots with HTTP for dYdX (#2393), thanks @davidsblom

Breaking Changes

  • Removed talib subpackage (see deprecations for v1.211.0)
  • Removed internal ExchangeRateCalculator, replaced with get_exchange_rate(...) function implemented in Rust
  • Replaced ForexSession enum with equivalent from PyO3
  • Replaced ForexSessionFilter with equivalent functions from PyO3
  • Renamed InterestRateData to YieldCurveData
  • Renamed Cache.add_interest_rate_curve to add_yield_curve
  • Renamed Cache.interest_rate_curve to yield_curve
  • Renamed OrderBook.count to update_count for clarity
  • Moved ExecEngineConfig.portfolio_bar_updates config option to PortfolioConfig.bar_updates

Internal Improvements

  • Added initial Cache benchmarking for orders (#2341), thanks @filipmacek
  • Added support for CARGO_BUILD_TARGET environment variable in build.py (#2385), thanks @sunlei
  • Added test for time-bar aggregation (#2391), thanks @stefansimik and @faysou
  • Implemented actor framework and message bus v3 (#2402), thanks @twitu
  • Implemented latency modeling for SimulatedExchange in Rust (#2423), thanks @filipmacek
  • Implemented exchange rate calculations in Rust
  • Improved handling of oms_type for StrategyConfig which now correctly handles the OmsType enum
  • Improved Binance websocket connections management to allow more than 200 streams (#2369), thanks @lidarbtc
  • Improved log event timestamping to avoid clock or time misalignments when events cross to the logging thread
  • Improved error logging for live engines to now include stacktrace for easier debugging
  • Improved logging initialization error handling to avoid panicking in Rust
  • Improved Redis cache database queries, serialization, error handling and connection management (#2295, #2308, #2318), thanks @Pushkarm029
  • Improved validation for OrderList to check all orders are for the same instrument ID
  • Improved Controller functionality with ability to create actors and strategies from configs (#2322), thanks @faysou
  • Improved Controller creation for more streamlined trader registration, and separate clock for timer namespacing (#2357), thanks @faysou
  • Improved build by adding placeholders to avoid unnecessary rebuilds (#2336), thanks @bartolootrit
  • Improved consistency of OrderMatchingEngine between Cython and Rust and fix issues (#2350), thanks @filipmacek
  • Removed obsolete reconnect guard for dYdX (#2334), thanks @davidsblom
  • Refactored data request interfaces into messages (#2260), thanks @faysou
  • Refactored data subscribe interfaces into messages (#2280), thanks @faysou
  • Refactored reconciliation interface into messages (#2375), thanks @faysou
  • Refactored _handle_query_group to work with update_catalog (#2412), thanks @faysou
  • Refactored execution message handling in Rust (#2291), thanks @filipmacek
  • Refactored repetitive code in backtest examples (#2387, #2395), thanks @stefansimik
  • Refined yield curve data (#2300), thanks @faysou
  • Refined bar aggregators in Rust (#2311), thanks @faysou
  • Refined greeks computation (#2312), thanks @faysou
  • Refined underlying filtering in portfolio_greeks (#2382), thanks @faysou
  • Refined request_instruments granularity for Databento (#2347), thanks @faysou
  • Refined Rust date functions (#2356), thanks @faysou
  • Refined parsing of IB symbols (#2388), thanks @faysou
  • Refined base_template behaviour in parquet write_data (#2389), thanks @faysou
  • Refined mixed catalog client requests (#2405), thanks @faysou
  • Refined update catalog docstring (#2411), thanks @faysou
  • Refined to use next_back instead of last for identifier tag functions (#2414), thanks @twitu
  • Refined and optimized OrderBook in Rust
  • Cleaned up PyO3 migration artifacts (#2326), thanks @twitu
  • Ported StreamingFeatherWriter to Rust (#2292), thanks @twitu
  • Ported update_limit_order for OrderMatchingEngine in Rust (#2301), thanks @filipmacek
  • Ported update_stop_market_order for OrderMatchingEngine in Rust (#2310), thanks @filipmacek
  • Ported update_stop_limit_order for OrderMatchingEngine in Rust (#2314), thanks @filipmacek
  • Ported market-if-touched order handling for OrderMatchingEngine in Rust (#2329), thanks @filipmacek
  • Ported limit-if-touched order handling for OrderMatchingEngine in Rust (#2333), thanks @filipmacek
  • Ported market-to-limit order handling for OrderMatchingEngine in Rust (#2354), thanks @filipmacek
  • Ported trailing stop order handling for OrderMatchingEngine in Rust (#2366, #2376), thanks @filipmacek
  • Ported contingent orders handling for OrderMatchingEngine in Rust (#2404), thanks @filipmacek
  • Updated Databento publishers.json mappings file(s)
  • Upgraded nautilus-ibapi to 10.30.1 with necessary changes for Interactive Brokers (#2420), thanks @FGU1
  • Upgraded Rust to 1.85.0 and 2024 edition
  • Upgraded arrow and parquet crates to v54.2.1
  • Upgraded databento crate to v0.20.0 (upgrades the dbn crate to v0.28.0)
  • Upgraded datafusion crate to v46.0.0
  • Upgraded pyo3 crate to v0.23.5
  • Upgraded tokio crate to v1.44.0

Fixes

  • Fixed large difference between Data enum variants (#2315), thanks @twitu
  • Fixed start and end range filtering for TardisHttpClient to use API query params
  • Fixed built-in data type Arrow schemas for StreamingFeatherWriter, thanks for reporting @netomenoci
  • Fixed memory allocation performance issue for TardisCSVDataLoader
  • Fixed effective timestamp filtering for TardisHttpClient to now only retain latest version at or before effective
  • Fixed contract activation for Binance Futures, now based on the onboardDate field
  • Fixed hard-coded signature type for PolymarketExecutionClient
  • Fixed unsubscribing from quotes for dYdX (#2331), thanks @davidsblom
  • Fixed docstrings for dYdX factories (#2415), thanks @davidsblom
  • Fixed incorrect type annotations in _request_instrument signature (#2332), thanks @faysou
  • Fixed composite bars subscription (#2337), thanks @faysou
  • Fixed sub command issue in some adapters (#2343), thanks @faysou
  • Fixed bypass_logging fixture to keep log guard alive for entire test session
  • Fixed time parsing for IB adapter (#2360), thanks @faysou
  • Fixed bad ts_init value in IB weekly and monthly bar (#2355), thanks @Endura2024
  • Fixed bar timestamps for IB (#2380), thanks @Endura2024
  • Fixed backtest example load bars from custom CSV (#2383), thanks @hanksuper
  • Fixed subscribe composite bars (#2390), thanks @faysou
  • Fixed invalid link in IB docs (#2401), thanks @stefansimik
  • Fixed cache index loading to ensure persisted data remains available after startup, thanks for reporting @Saransh-28
  • Fixed bars pagination, ordering and limit for Bybit
  • Fixed update_bar aggregation function to guarantee high and low price invariants (#2430), thanks @hjander and @faysou

Documentation Updates

Read more

NautilusTrader 1.211.0 Beta

09 Feb 18:59
Compare
Choose a tag to compare

NautilusTrader 1.211.0 Beta

Released on 9th February 2025 (UTC).

This release introduces high-precision mode, where value types such as Price, Quantity and Money are now backed by 128-bit integers (instead of 64-bit), thereby increasing maximum precision to 16, and vastly expanding the allowable value ranges.

This will address precision and value range issues experienced by some crypto users, alleviate higher timeframe bar volume limitations, as well as future proofing the platform.

See the RFC for more details. For an explanation on compiling with or without high-precision mode, see the precision-mode section of the installation guide.

For migrating data catalogs due to the breaking changes, see the data migrations guide.

This release will be the final version that uses Poetry for package and dependency management.

Enhancements

  • Added high-precision mode for 128-bit integer backed value types (#2072), thanks @twitu
  • Added instrument definitions range requests for TardisHttpClient with optional start and end filter parameters
  • Added quote_currency, base_currency, instrument_type, contract_type, active, start and end filters for TardisInstrumentProvider
  • Added log_commands config option for ActorConfig, StrategyConfig, ExecAlgorithmConfig for more efficient log filtering
  • Added additional limit parameters for BettingInstrument constructor
  • Added venue_position_id parameter for OrderStatusReport
  • Added bars update support for Portfolio PnLs (#2239), thanks @faysou
  • Added optional params for Strategy order management methods (symmetry with Actor data methods) (#2251), thanks @faysou
  • Added heartbeats for Betfair clients to keep streams alive (more robust when initial subscription delays)
  • Added timeout_shutdown config option for NautilusKernelConfig
  • Added IOC time in force mapping for Betfair orders
  • Added min_market_start_time and max_market_start_time time range filtering for BetfairInstrumentProviderConfig
  • Added default_min_notional config option for BetfairInstrumentProviderConfig
  • Added stream_conflate_ms config option for BetfairDataClientConfig
  • Added recv_window_ms config option for BybitDataClientConfig and BybitExecClientConfig
  • Added open_check_open_only config option for LiveExecEngineConfig
  • Added BetSide enum (to support Bet and BetPosition)
  • Added Bet and BetPosition for betting market risk and PnL calculations
  • Added total_pnl and total_pnls methods for Portfolio
  • Added optional price parameter for Portfolio unrealized PnL and net exposure methods

Breaking Changes

  • Renamed OptionsContract instrument to OptionContract for more technically correct terminology (singular)
  • Renamed OptionsSpread instrument to OptionSpread for more technically correct terminology (singular)
  • Renamed options_contract modules to option_contract (see above)
  • Renamed options_spread modules to option_spread (see above)
  • Renamed InstrumentClass.FUTURE_SPREAD to InstrumentClass.FUTURES_SPREAD for more technically correct terminology
  • Renamed event_logging config option to log_events
  • Renamed BetfairExecClientConfig.request_account_state_period to request_account_state_secs
  • Moved SQL schema directory to schemas/sql (reinstall the Nautilus CLI with make install-cli)
  • Changed OrderBookDelta Arrow schema to use FixedSizeBinary fields to support the new precision modes
  • Changed OrderBookDepth10 Arrow schema to use FixedSizeBinary fields to support the new precision modes
  • Changed QuoteTick Arrow schema to use FixedSizeBinary fields to support the new precision modes
  • Changed TradeTick Arrow schema to use FixedSizeBinary fields to support the new precision modes
  • Changed Bar Arrow schema to use FixedSizeBinary fields to support the new precision modes
  • Changed BettingInstrument default min_notional to None
  • Changed meaning of ws_connection_delay_secs for PolymarketDataClientConfig to be non-initial delay (#2271)
  • Changed GATEIO Tardis venue to GATE_IO for consistency with CRYPTO_COM and BLOCKCHAIN_COM
  • Removed max_ws_reconnection_tries for dYdX configs (no longer applicable with infinite retries and exponential backoff)
  • Removed max_ws_reconnection_tries for Bybit configs (no longer applicable with infinite retries and exponential backoff)
  • Removed remaining max_ws_reconnection_tries for Bybit configs (#2290), thanks @sunlei

Internal Improvements

  • Added ThrottledEnqueuer for more efficient and robust live engines queue management and logging
  • Added OrderBookDeltaTestBuilder in Rust to improve testing (#2234), thanks @filipmacek
  • Added custom certificate loading for SocketClient TLS
  • Added check_nonempty_string for string validation in Rust
  • Improved Polymarket WebSocket subscription handling by configurable delay (#2271), thanks @ryantam626
  • Improved WebSocketClient with state management, error handling, timeouts and robust reconnects with exponential backoff
  • Improved SocketClient with state management, error handling, timeouts and robust reconnects with exponential backoff
  • Improved TradingNode shutdown when running with asyncio.run() (more orderly handling of event loop)
  • Improved NautilusKernel pending tasks cancellation on shutdown
  • Improved TardisHttpClient requests and error handling
  • Improved log file writer to strip ANSI escape codes and unprintable chars
  • Improved clean make target behavior and added distclean make target (#2286), @demonkoryu
  • Refined Currency name to accept non-ASCII characters (common for foreign currencies)
  • Refactored CI with composite actions (#2242), thanks @sunlei
  • Refactored Option Greeks feature (#2266), thanks @faysou
  • Changed validation to allow zero commission for PerContractFeeModel (#2282), thanks @stefansimik
  • Changed to use mold as the linker in CI (#2254), thanks @sunlei
  • Ported market order processing for OrderMatchingEngine in Rust (#2202), thanks @filipmacek
  • Ported limit order processing for OrderMatchingEngine in Rust (#2212), thanks @filipmacek
  • Ported stop limit order processing for OrderMatchingEngine in Rust (#2225), thanks @filipmacek
  • Ported CancelOrder processing for OrderMatchingEngine in Rust (#2231), thanks @filipmacek
  • Ported CancelAllOrders processing for OrderMatchingEngine in Rust (#2253), thanks @filipmacek
  • Ported BatchCancelOrders processing for OrderMatchingEngine in Rust (#2256), thanks @filipmacek
  • Ported expire order processing for OrderMatchingEngine in Rust (#2259), thanks @filipmacek
  • Ported modify order processing for OrderMatchingEngine in Rust (#2261), thanks @filipmacek
  • Ported generate fresh account state for SimulatedExchange in Rust (#2272), thanks @filipmacek
  • Ported adjust account for SimulatedExchange in Rust (#2273), thanks @filipmacek
  • Continued porting RiskEngine to Rust (#2210), thanks @Pushkarm029
  • Continued porting ExecutionEngine to Rust (#2214), thanks @Pushkarm029
  • Continued porting OrderEmulator to Rust (#2219, #2226), thanks @Pushkarm029
  • Moved model crate stubs into defaults (#2235), thanks @fhill2
  • Upgraded pyo3 crate to v0.23.4
  • Upgraded pyo3-async-runtimes crate to v0.23.0

Fixes

  • Fixed LiveTimer immediate fire when start time zero (#2270), thanks for reporting @bartolootrit
  • Fixed order book action parsing for Tardis (ensures zero sizes in snapshots work with the tighter validation for action vs size)
  • Fixed PnL calculations for betting instruments in Portfolio
  • Fixed net exposure for betting instruments in Portfolio
  • Fixed backtest start and end time validation assertion (#2203), thanks @davidsblom
  • Fixed CustomData import in DataEngine (#2207), thanks @graceyangfan and @faysou
  • Fixed databento helper function (#2208), thanks @faysou
  • Fixed live reconciliation of generated order fills to use the venue_position_id (when provided), thanks for reporting @sdk451
  • Fixed InstrumentProvider initialization behavior when reload flag True, thanks @ryantam626
  • Fixed handling of Binance HTTP error messages (not always JSON-parsable, leading to msgspec.DecodeError)
  • Fixed CARGO_TARGET_DIR environment variable for build script (#2228), thanks @sunlei
  • Fixed typo in delta.rs doc comment (#2230), thanks @eltociear
  • Fixed memory leak in network PyO3 layer caused by the gil-refs feature (#2229), thanks for reporting @davidsblom
  • Fixed reconnect handling for Betfair (#2232, #2288, #2289), thanks @limx0
  • Fixed instrument.id null dereferences in error logs (#2237), thanks for reporting @ryantam626
  • Fixed schema for listing markets of dYdX (#2240), thanks @davidsblom
  • Fixed realized pnl calculation in Portfolio where flat positions were not included in cumulative sum (#2243), thanks @faysou
  • Fixed update order in Cache for Rust (#2248), thanks @filipmacek
  • Fixed websocket schema for market updates of dYdX (#2258), thanks @davidsblom
  • Fixed handling of empty book messages for Tardis (resulted in deltas cannot be empty panicking)
  • Fixed Cache.bar_types aggregation_source filtering, was incorrectly using price_type (#2269), thanks @faysou
  • Fixed missing combo instrument type for Tardis integration
  • Fixed quote tick processing from bars in OrderMatchingEngine resulting in sizes below the minimum increment (#2275), thanks for...
Read more

NautilusTrader 1.210.0 Beta

10 Jan 04:22
Compare
Choose a tag to compare

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

NautilusTrader 1.209.0 Beta

25 Dec 12:19
Compare
Choose a tag to compare

NautilusTrader 1.209.0 Beta

Released on 25th December 2024 (UTC).

Enhancements

  • Added WebSocket API trading support for Bybit (#2129), thanks @sunlei
  • Added BybitOrderBookDeltaDataLoader with tutorial for Bybit backtesting (#2131), thanks @DeevsDeevs
  • Added margin and commission docs (#2128), thanks @stefansimik
  • Added optional depth param for some OrderBook methods
  • Added trade execution support where trades are processed by the matching engine (can be useful backtesting with throttled book and trades data)
  • Refactored to use exchange MIC code as venue for instrument IDs with Databento GLBX dataset (#2108, #2121, #2124, #2126), thanks @faysou
  • Refactored to use self.config attributes consistently (#2120), thanks @stefansimik

Internal Improvements

  • Optimized UUID4::new() avoiding unnecessary string allocation, achieving a ~2.8x performance improvement (added benches)
  • Upgraded v4-proto for dYdX (#2136), thanks @davidsblom
  • Upgraded databento crate to v0.17.0

Breaking Changes

  • Moved BinanceOrderBookDeltaDataLoader from nautilus_trader.persistence.loaders to nautilus_trader.adapters.binance.loaders

Fixes

  • Fixed multi-threaded monotonicity for AtomicTime in real-time mode
  • Fixed timeout error code for Bybit (#2130), thanks @sunlei
  • Fixed instruments info retrieval for Bybit (#2134), thanks @sunlei
  • Fixed request_aggregated_bars metadata handling (#2137), thanks @faysou
  • Fixed demo notebook backtest_high_level.ipynb (#2142), thanks @stefansimik

NautilusTrader 1.208.0 Beta

15 Dec 13:41
Compare
Choose a tag to compare

NautilusTrader 1.208.0 Beta

Released on 15th December 2024 (UTC).

Enhancements

  • Added specific params for data subscriptions and requests which supports Databento bbo-1s and bbo-1m quotes (#2083, #2094), thanks @faysou
  • Added support for STOP_LIMIT entry order type for OrderFactory.bracket(...)
  • Added .group_bids(...) and .group_asks(...) for OrderBook
  • Added .bids_to_dict() and .asks_to_dict() for OrderBook
  • Added ShutdownSystem command and shutdown_system(...) method for components (system-wide shutdown for backtest, sandbox, or live environments)
  • Added max_ws_reconnection_tries to BybitDataClientConfig (#2100), thanks @sunlei
  • Added additional API functionality for Bybit (#2102), thanks @sunlei
  • Added position and execution.fast subscriptions for Bybit (#2104), thanks @sunlei
  • Added max_ws_reconnection_tries to BybitExecClientConfig (#2109), thanks @sunlei
  • Added margin_init, margin_maint, maker_fee, taker_fee params and attributes for FuturesContract
  • Added margin_init, margin_maint, maker_fee, taker_fee params and attributes for FuturesSpread
  • Added margin_init, margin_maint, maker_fee, taker_fee params and attributes for OptionsContract
  • Added margin_init, margin_maint, maker_fee, taker_fee params and attributes for OptionsSpread
  • Improved Databento symbology support for Interactive Brokers (#2113), thanks @rsmb7z
  • Improved support of STOP_MARKET and STOP_LIMIT orders for dYdX (#2069), thanks @Saransh-Bhandari
  • Improved timer validation for interval_ns (avoids panicking from Rust)

Internal Improvements

  • Added .bids_as_map() and .asks_as_map() for OrderBook in Rust
  • Added type stubs for core subpackage
  • Added type stubs for common and model enums
  • Added type stubs for common.messages
  • Added re-exports and module declarations to enhance code ergonomics and improve import discoverability
  • Added subscriptions for block height websocket messages for dYdX (#2085), thanks @davidsblom
  • Added sccache in CI (#2093), thanks @sunlei
  • Refined BybitWebSocketClient private channel authentication (#2101), thanks @sunlei
  • Refined BybitWebSocketClient subscribe and unsubscribe (#2105), thanks @sunlei
  • Refined place order class definitions for Bybit (#2106), thanks @sunlei
  • Refined BybitEnumParser (#2107), thanks @sunlei
  • Refined batch cancel orders for Bybit (#2111), thanks @sunlei
  • Upgraded tokio crate to v1.42.0

Breaking Changes

  • Renamed Level to BookLevel (standardizes order book type naming conventions)
  • Renamed Ladder to BookLadder (standardizes order book type naming conventions)
  • Changed FuturesContract Arrow schema (added margin_init, margin_maint, maker_fee, taker_fee)
  • Changed FuturesSpread Arrow schema (added margin_init, margin_maint, maker_fee, taker_fee)
  • Changed OptionsContract Arrow schema (added margin_init, margin_maint, maker_fee, taker_fee)
  • Changed OptionsSpread Arrow schema (added margin_init, margin_maint, maker_fee, taker_fee)

Fixes

  • Fixed data requests when specifying end with no catalog registered (comparison between pd.Timestamp and NoneType)
  • Fixed BEST_EFFORT_CANCELED order status report for dYdX (#2082), thanks @davidsblom
  • Fixed order handling for BEST_EFFORT_CANCELED messages of dYdX (#2095), thanks @davidsblom
  • Fixed specifying price for market orders on dYdX (#2088), thanks @davidsblom
  • Fixed interest rate curve custom data and interpolation (#2090), thanks @gcheshkov
  • Fixed BybitHttpClient error handling when not a JSON string (#2096), thanks @sunlei
  • Fixed BybitWebSocketClient private channel reconnect (#2097), thanks @sunlei
  • Fixed incorrect order side use in BybitExecutionClient (#2098), thanks @sunlei
  • Fixed default http_base_url for Bybit (#2110), thanks @sunlei

NautilusTrader 1.207.0 Beta

29 Nov 11:35
Compare
Choose a tag to compare

NautilusTrader 1.207.0 Beta

Released on 29th November 2024 (UTC).

Enhancements

  • Implemented mixed catalog data requests with catalog update (#2043), thanks @faysou
  • Added Databento symbology support for Interactive Brokers (#2073), thanks @rsmb7z
  • Added metadata parameter for data requests (#2043), thanks @faysou
  • Added STOP_MARKET and STOP_LIMIT order support for dYdX (#2066), thanks @davidsblom
  • Added max_reconnection_tries to data client config for dYdX (#2066), thanks @davidsblom
  • Added wallet subscription for Bybit (#2076), thanks @sunlei
  • Added docs clarity on loading historical bars (#2078), thanks @dodofarm
  • Added price_precision optional parameter for DatabentoDataLoader methods
  • Improved Cache behavior when adding more recent quotes, trades, or bars (now adds to cache)

Internal Improvements

  • Ported Portfolio and AccountManager to Rust (#2058), thanks @Pushkarm029
  • Implemented AsRef<str> for Price, Money, and Currency
  • Improved expired timer cleanup in clocks (#2064), thanks @twitu
  • Improved live engines error logging (will now log all exceptions rather than just RuntimeError)
  • Improved symbol normalization for Tardis
  • Improved historical bar request performance for Tardis
  • Improved TradeId Debug implementation to display value as proper UTF-8 string
  • Refined HttpClient for use directly from Rust
  • Refined Databento decoder (removed currency hard coding and use of unsafe)
  • Upgraded datafusion crate to v43.0.0 (#2056), thanks @twitu

Breaking Changes

  • Renamed TriggerType.LAST_TRADE to LAST_PRICE (more conventional terminology)

Fixes

  • Fixed missing venue -> exchange mappings for Tardis integration
  • Fixed account balance and order status parsing for dYdX (#2067), thanks @davidsblom
  • Fixed parsing best effort opened order status for dYdX (#2068), thanks @davidsblom
  • Fixed occasionally incorrect price_precision, multiplier and lot_size decoding for Databento instruments
  • Fixed missing Arrow schemas for instrument deserialization
  • Reconcile order book for dYdX when inconsistent (#2077), thanks @davidsblom

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