Releases: nautechsystems/nautilus_trader
NautilusTrader 1.219.0 Beta
NautilusTrader 1.219.0 Beta
Released on 5th July 2025 (UTC).
Enhancements
- Added
graceful_shutdown_on_exceptionconfig option for live engines (defaultFalseto retain intended hard crash on unexpected system exceptions) - Added
purge_from_databaseconfig option forLiveExecEngineConfigto support cache backing database management - Added support for data download during backtest (#2652), thanks @faysou
- Added delete data range to catalog (#2744), thanks @faysou
- Added consolidate catalog by period (#2727), thanks @faysou
- Added
fire_immediatelyflag parameter for timers where a time event will be fired at thestartinstant and then every interval thereafter (defaultFalseto retain current behavior) (#2600), thanks for the idea @stastnypremysl - Added
time_bars_build_delayconfig option forDataEngineConfig(#2676), thanks @faysou - Added immediate firing capability for time alerts and corresponding test (#2745), thanks @stastnypremysl
- Added missing serialization mappings for some instruments (#2702), thanks @faysou
- Added support for DEX swaps for blockchain adapter (#2683), thanks @filipmacek
- Added support for Pool liquidity updates for blockchain adapter (#2692), thanks @filipmacek
- Added fill report reconciliation warning when discrepancy with existing fill (#2706), thanks @faysou
- Added optional metadata function for custom data query (#2724), thanks @faysou
- Added support for order-list submission in the sandbox execution client (#2714), thanks @petioptrv
- Added hidden order support for IBKR (#2739), thanks @sunlei
- Added
subscribe_order_book_deltassupport for IBKR (#2749), thanks @sunlei - Added
bid_levelsandask_levelsforOrderBook.pprint - Added
accepted_buffer_nsfilter param forCache.own_bid_orders(...)andCache.own_ask_orders(...) - Added trailing stop orders
activation_pricesupport in Rust (#2750), thanks @nicolad
Breaking Changes
- Renamed catalog
instrument_idsfilter param toidentifiersto more accurately describe strings which can represent either instrument IDs or bar types - Changed behavior of timers
allow_past=Falseto permitstarttimes in the past if the next event time is still in the future - Changed Databento DBN upgrade policy to default v3
- Removed problematic negative balance check for margin accounts (cash account negative balance check remains unchanged)
- Removed support for Databento DBN v1 schemas (migrate to DBN v2 or v3, see DBN Changelog)
Internal Improvements
- Added logging macros for custom component and color in Rust
- Added Cython-level parameter validation for timer operations to prevent Rust panics and provide clearer Python error messages
- Added property-based testing for
Price,Quantity,Moneyvalue types in Rust - Added property-based testing for
UnixNanosin Rust - Added property-based testing for
OrderBookin Rust - Added property-based testing for
TestTimerin Rust - Added property-based testing for
networkcrate in Rust - Added chaos testing with
turmoilfor socket clients in Rust - Added
check_positive_decimalcorrectness function and use for instrument validations (#2736), thanks @nicolad - Added
check_positive_moneycorrectness function and use for instrument validations (#2738), thanks @nicolad - Ported data catalog refactor to Rust (#2681, #2720), thanks @faysou
- Optimized
TardisCSVDataLoaderperformance (~90% memory usage reduction, ~60-70% faster) - Consolidated the clocks and timers v2 feature from @twitu
- Consolidated on pure Rust cryptography crates with no dependencies on native certs or openssl
- Consolidated on
aws-lc-rscryptography for FIPS compliance - Confirmed parity between Cython and Rust indicators (#2700, #2710, #2713), thanks @nicolad
- Implemented
From<Pool>->CurrencyPair&InstrumentAny(#2693), thanks @nicolad - Updated
Makefileto use new docker compose syntax (#2746), thanks @stastnypremysl - Updated Tardis exchange mappings
- Improved live engine message processing to ensure exceptions result in a crash rather than continuing without the queue processing messages
- Improved live reconciliation robustness and testing
- Improved listen key error handling and recovery for Binance
- Improved handling of negative balances in backtests (#2730), thanks @ms32035
- Improved robustness of cash and margin account locked balance calculations to avoid negative free balance
- Improved robustness of fill price parsing for Betfair
- Improved implementation, validations and testing for Rust instruments (#2723, #2733), thanks @nicolad
- Improved
Currencyequality to usestrcmpto avoid C pointer comparison issues withustrstring interning - Improved unsubscribe cleanup(s) for Bybit adapter
- Improved
Makefileto be self-documenting (#2741), thanks @sunlei - Refactored IB adapter (#2647), thanks @faysou
- Refactored data catalog (#2652, #2740), thanks @faysou
- Refined Rust data catalog (#2734), thanks @faysou
- Refined logging subsystem lifecycle management and introduce global log sender
- Refined signal serialization and tests (#2705), thanks @faysou
- Refined CI/CD and build system (#2707), thanks @stastnypremysl
- Upgraded Rust (MSRV) to 1.88.0
- Upgraded Cython to v3.1.2
- Upgraded
databentocrate to v0.28.0 - Upgraded
datafusioncrate to v48.0.0 - Upgraded
pyo3andpyo3-async-runtimescrates to v0.25.1 - Upgraded
rediscrate to v0.32.3 - Upgraded
tokiocrate to v1.46.1 - Upgraded
tokio-tungstenitecrate to v0.27.0
Fixes
- Fixed
AccountBalancemutation inAccountStateevents (#2701), thanks for reporting @DeirhX - Fixed order book cache consistency in update and remove operations (found through property-based testing)
- Fixed order status report generation for Polymarket where
venue_order_idwas unbounded - Fixed data request identifier attribute access for
LiveDataClient - Fixed
generate_order_modify_rejectedtypo in Binance execution client (#2682), thanks for reporting @etiennepar - Fixed order book depth handling in subscriptions for Binance
- Fixed potential
IndexErrorwith empty bars requests for Binance - Fixed GTD-GTC time in force conversion for Binance
- Fixed incorrect logging of trigger type for Binance
- Fixed trade ticks unsubscribe for Binance which was not differentiating aggregated trades
- Fixed pending update hot cache cleanup for Betfair execution client
- Fixed invalid session information on account update for Betfair execution client
- Fixed order book snapshots unsubscribe for Tardis data client
- Fixed Arrow schema registration for
BinanceBar - Fixed gRPC server shutdown warning when running dYdX integration tests
- Fixed registration of encoder and decoder for
BinanceBar, thanks for reporting @miller-moore - Fixed spot and futures sandbox for Binance (#2687), thanks @petioptrv
- Fixed
cleananddistcleanmake targets entering.venvand corrupting the Python virtual env, thanks @faysou - Fixed catalog identifier matching to exact match (#2732), thanks @faysou
- Fixed last value updating for RSI indicator (#2703), thanks @bartlaw
- Fixed gateway/TWS reconnect process for IBKR (#2710), thanks @bartlaw
- Fixed Interactive Brokers options chain issue (#2711), thanks @FGU1
- Fixed partially filled bracket order and SL triggered for IBKR (#2704, #2717), thanks @bartlaw
- Fixed instrument message decoding when no
exchangevalue for Databento US equities - Fixed fetching single-instrument trading fees for
Binance, thanks @petioptrv - Fixed IB-TWS connection issue with international languages (#2726), thanks @DracheShiki
- Fixed bar requests for Bybit where pagination was incorrect which limited bars being returned
- Fixed Bybit Unknown Error (#2742), thanks @DeevsDeevs
- Fixed margin balance parsing for Bybit
- Restored task error logs for IBKR (#2716), thanks @bartlaw
Documentation Updates
- Updated IB adapter documentation (#2729), thanks @faysou
- Improved reconciliation docs in live concept guide
Deprecations
- Deprecated
Portfolio.set_specific_venue(...), to be removed in a future release; useCache.set_specific_venue(...)instead
NautilusTrader 1.218.0 Beta
NautilusTrader 1.218.0 Beta
Released on 31st May 2025 (UTC).
Enhancements
- Added convenience re-exports for Betfair adapter (constants, configs, factories, types)
- Added convenience re-exports for Binance adapter (constants, configs, factories, loaders, types)
- Added convenience re-exports for Bybit adapter (constants, configs, factories, loaders, types)
- Added convenience re-exports for Coinbase International adapter (constants, configs, factories)
- Added convenience re-exports for Databento adapter (constants, configs, factories, loaders, types)
- Added convenience re-exports for dYdX adapter (constants, configs, factories)
- Added convenience re-exports for Polymarket adapter (constants, configs, factories)
- Added convenience re-exports for Tardis adapter (constants, configs, factories, loaders)
- Added support for
FillModel,LatencyModelandFeeModelin BacktestNode (#2601), thanks @faysou - Added bars caching from
request_aggregated_bars(#2649), thanks @faysou - Added
BacktestDataIteratorto backtest engine to provide on-the-fly data loading (#2545), thanks @faysou - Added support for
MarkPriceUpdatestreaming from catalog (#2582), thanks @bartolootrit - Added support for Binance Futures margin type (#2660), thanks @bartolootrit
- Added support for mark price stream across all markets for Binance (#2670), thanks @sunlei
- Added
bars_timestamp_on_closeconfig option for Databento which defaults toTrueto consistently align with Nautilus conventions - Added
activation_pricesupport for trailing stop orders (#2610), thanks @hope2see - Added trailing stops for OrderFactory bracket orders (#2654), thanks @hope2see
- Added
raise_exceptionconfig option forBacktestRunConfig(defaultFalseto retain current behavior) which will raise exceptions to interrupt a nodes run process - Added
UnixNanos::is_zero()convenience method to check for a zero/epoch value - Added SQL schema, model, and query for
OrderCancelRejected - Added SQL schema, model, and query for
OrderModifyRejected - Added HyperSync client to blockchain adapter (#2606), thanks @filipmacek
- Added support for DEXs, pools, and tokens to blockchain adapter (#2638), thanks @filipmacek
Breaking Changes
- Changed trailing stops to use
activation_pricerather thantrigger_pricefor Binance to more closely match the Binance API conventions
Internal Improvements
- Added
activation_pricestr and repr tests for trailing stop orders (#2620), thanks @hope2see - Added condition check for order
contingency_typeandlinked_order_idswhere a contingency should have associated linked order IDs - Improved robustness of socket client reconnects and disconnects to avoid state race conditions
- Improved error handling for socket clients, will now raise Python exceptions on send errors rather than logging with
tracingonly - Improved error handling for Databento adapter by changing many unwraps to instead log or raise Python exceptions (where applicable)
- Improved error handling for Tardis adapter by changing many unwraps to instead log or raise Python exceptions (where applicable)
- Improved fill behavior for limit orders in
L1_MBPbooks, will now fill entire size when marketable asTAKERor market moves through limit asMAKER - Improved account state event generation for margin accounts, avoiding the generation of redundant intermediate account states for the same execution event
- Improved ergonomics of messaging topics, patterns, and endpoints in Rust (#2658), thanks @twitu
- Improved development debug builds with cranelift backend for Rust (#2640), thanks @twitu
- Improved validations for
LimitOrderin Rust (#2613), thanks @nicolad - Improved validations for
LimitIfTouchedOrderin Rust (#2533), thanks @nicolad - Improved validations for
MarketIfTouchedOrderin Rust (#2577), thanks @nicolad - Improved validations for
MarketToLimitOrderin Rust (#2584), thanks @nicolad - Improved validations for
StopLimitOrderin Rust (#2593), thanks @nicolad - Improved validations for
StopMarketOrderin Rust (#2596), thanks @nicolad - Improved validations for
TrailingStopMarketOrderin Rust (#2607), thanks @nicolad - Improved orders initialize and display tests in Rust (#2617), thanks @nicolad
- Improved testing for Rust orders module (#2578), thanks @dakshbtc
- Improved Cython-Rust indicator parity for
AdaptiveMovingAverage(AMA) (#2626), thanks @nicolad - Improved Cython-Rust indicator parity for
DoubleExponentialMovingAverage(DEMA) (#2633), thanks @nicolad - Improved Cython-Rust indicator parity for
ExponentialMovingAverage(EMA) (#2642), thanks @nicolad - Improved Cython-Rust indicator parity for
HullMovingAverage(HMA) (#2648), thanks @nicolad - Improved Cython-Rust indicator parity for
LinearRegression(#2651), thanks @nicolad - Improved Cython-Rust indicator parity for
WilderMovingAverage(RMA) (#2653), thanks @nicolad - Improved Cython-Rust indicator parity for
VariableIndexDynamicAverage(VIDYA) (#2659), thanks @nicolad - Improved Cython-Rust indicator parity for
SimpleMovingAverage(SMA) (#2655), thanks @nicolad - Improved Cython-Rust indicator parity for
VolumeWeightedAveragePrice(VWAP) (#2661), thanks @nicolad - Improved Cython-Rust indicator parity for
WeightedMovingAverage(WMA) (#2662), thanks @nicolad - Improved Cython-Rust indicator parity for
ArcherMovingAveragesTrends(AMAT) (#2669), thanks @nicolad - Improved zero size trade logging for Binance Futures (#2588), thanks @bartolootrit
- Improved error handling on API key authentication errors for Polymarket
- Improved execution client debug logging for Polymarket
- Improved exception on deserializing order from cache database
- Improved
Nonecondition checks for value types, which now raise aTypeErrorinstead of an obscureAttributeError - Changed
VecDequefor fixed-capacityArrayDequein SMA indicator (#2666), thanks @nicolad - Changed
VecDequefor fixed-capacityArrayDequein LinearRegression (#2667), thanks @nicolad - Implemented remaining Display for orders in Rust (#2614), thanks @nicolad
- Implemented
_subscribe_instrumentfor dYdX and Bybit (#2636), thanks @davidsblom - Untangled
ratelimiterquota frompythonflag (#2595), thanks @twitu - Refined
BacktestDataIteratorcorrectness (#2591), thanks @faysou - Refined formatting of IB adapter files (#2639), thanks @faysou
- Optimized message bus topic-matching logic in Rust by 100× (#2634), thanks @twitu
- Changed to faster message bus pattern matching logic from Rust (#2643), thanks @twitu
- Upgraded Rust (MSRV) to 1.87.0
- Upgraded Cython to v3.1.0 (now stable)
- Upgraded
databentocrate to v0.26.0 - Upgraded
rediscrate to v0.31.0 - Upgraded
sqlxcrate to v0.8.6 - Upgraded
tokiocrate to v1.45.1
Fixes
- Fixed portfolio account updates leading to incorrect balances (#2632, #2637), thanks for reporting @bartolootrit and @DeirhX
- Fixed portfolio handling of
OrderExpiredevents not updating state (margin requirements may change) - Fixed event handling for
ExecutionEngineso it fully updates thePortfoliobefore to publishing execution events (#2513), thanks for reporting @stastnypremysl - Fixed PnL calculation for margin account on position flip (#2657), thanks for reporting @Egisess
- Fixed notional value pre-trade risk check when order using quote quantity (#2628), thanks for reporting @DeevsDeevs
- Fixed position snapshot cache access for
ExecutionEngine - Fixed position snapshot
SystemErrorcallingcopy.deepcopy()by simply using apickleround trip to copy the position instance - Fixed event purging edge cases for account and position where at least one event must be guaranteed
- Fixed authentication for Redis when password provided with no username
- Fixed various numpy and pandas FutureWarning(s)
- Fixed sockets exponential backoff immediate reconnect value on reset (this prevented immediate reconnects on the next reconnect sequence)
- Fixed message bus subscription matching logic in Rust (#2646), thanks @twitu
- Fixed trailing stop market fill behavior when top-level exhausted to align with market orders (#2540), thanks for reporting @stastnypremysl
- Fixed stop limit fill behavior on initial trigger where the limit order was continuing to fill as a taker beyond available liquidity, thanks for reporting @hope2see
- Fixed matching engine trade processing when aggressor side is
NO_AGGRESSOR(we can still update the matching core) - Fixed modifying and updating trailing stop orders (#2619), thanks @hope2see
- Fixed processing activated trailing stop update when no trigger price, thanks for reporting @hope2see
- Fixed terminating backtest on
AccountErrorwhen streaming, the exception needed to be reraised to interrupt the streaming of chunks (#2546), thanks for reporting @stastnypremysl - Fixed HTTP batch order operations for Bybit (#2627), thanks @sunlei
- Fixed
reduce_onlyattribute access in batch place order for Bybit - Fixed quote tick parsing for one-sided books on Polymarket
- Fixed order fill handling for limit orders with
MAKERliquidity side on Polymarket - Fixed currency parsing for
BinaryOptionon Polymarket to consistently use USDC.e (PoS USDC on Polygon) - Fixed identity error handling during keep-alive for Betfair, will now reconnect
- Updated
BinanceFuturesEventTypeenum with additional variants, thanks for reporting @miller-moore
Documentation Updates
- Added capability matrices for integration guides
- Added content to Architecture concept guide
- Added content to Live Trading concept guide
- Added content to Developer Guide
- Added errors and panics docs for most crates
- Added errors and panics docs for most crates
- Improved the clarity of various concept guides
- Fixed several errors in concept guides
Deprecations
- Deprecated support for ...
NautilusTrader 1.217.0 Beta
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
NautilusTrader 1.216.0 Beta
NautilusTrader 1.216.0 Beta
Released on 13th April 2025 (UTC).
This release adds support for Python 3.13 (not yet compatible with free-threading),
and introduces support for linux on ARM64 architecture.
Enhancements
- Added
allow_pastboolean flag forClock.set_timer(...)to control behavior with start times in the past (defaultTrueto allow start times in the past) - Added
allow_pastboolean flag forClock.set_time_alert(...)to control behavior with alert times in the past (defaultTrueto fire immediate alert) - Added risk engine check for GTD order expire time, which will deny if expire time is already in the past
- Added instrument updating for exchange and matching engine
- Added additional price and quantity precision validations for matching engine
- Added log file rotation with additional config options
max_file_sizeandmax_backup_count(#2468), thanks @xingyanan and @twitu - Added
bars_timestamp_on_closeconfig option forBybitDataClientConfig(defaultTrueto match Nautilus conventions) - Added
BetfairSequenceCompletedcustom data type for Betfair to mark the completion of a sequence of messages - Added Arrow schema for
MarkPriceUpdatein Rust - Added Arrow schema for
IndexPriceUpdatein Rust - Added Arrow schema for
InstrumentClosein Rust - Added
BookLevel.sideproperty - Added
Position.closing_order_side()instance method - Improved robustness of in-flight order check for
LiveExecutionEngine, once exceeded query retries will resolve submitted orders as rejected and pending orders as canceled - Improved logging for
BacktestNodecrashes with full stack trace and prettier config logging
Breaking Changes
- Changed external bar requests
ts_eventtimestamping from on open to on close for Bybit
Internal Improvements
- Added handling and warning for Betfair zero sized fills
- Improved WebSocket error handling for dYdX (#2499), thanks @davidsblom
- Ported
GreeksCalculatorto Rust (#2493, #2496), thanks @faysou - Upgraded Cython to v3.1.0b1
- Upgraded
rediscrate to v0.29.5 - Upgraded
tokiocrate to v1.44.2
Fixes
- Fixed setting component clocks to backtest start time
- Fixed overflow error in trailing stop calculations
- Fixed missing
SymbolFilterTypeenum member for Binance (#2495), thanks @sunlei - Fixed
ts_eventfor Bybit bars (#2502), thanks @davidsblom - Fixed position ID handling for Binance Futures in hedging mode with execution algorithm order (#2504), thanks for reporting @Oxygen923
Documentation Updates
- Removed obsolete bar limitations in portfolio docs (#2501), thanks @stefansimik
Deprecations
None
NautilusTrader 1.215.0 Beta
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_minsconfig option forLiveExecEngineConfig - Added
purge_closed_orders_buffer_minsconfig option forLiveExecEngineConfig - Added
purge_closed_positions_interval_minsconfig option forLiveExecEngineConfig - Added
purge_closed_positions_buffer_minsconfig option forLiveExecEngineConfig - Added
purge_account_events_interval_minsconfig option forLiveExecEngineConfig - Added
purge_account_events_lookback_minsconfig option forLiveExecEngineConfig - Added
Order.ts_closedproperty - Added
instrument_idsandbar_typesforBacktestDataConfigto improve catalog query efficiency (#2478), thanks @faysou - Added
venue_dataset_mapconfig option forDatabentoDataConfigto override the default dataset used for a venue (#2483, #2485), thanks @faysou
Breaking Changes
None
Internal Improvements
- Added
Position.purge_events_for_order(...)for purgingOrderFilledevents andTradeIds associated with a client order ID - Added
ConsumerforWebSocketClient(#2488), thanks @twitu - Improved instrument parsing for Tardis with consistent
effectivetimestamp filtering, settlement currency, increments and fees changes - Improved error logging for Betfair
update_account_statetask 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
pyo3crate 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
PolymarketTickSizeChangedmessage - Fixed parsing spot instruments for Tardis where
size_incrementwas 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
- Clarified partial fills in backtesting concept guide (#2481), thanks @stefansimik
Deprecations
- Deprecated strategies written in Cython and removed
ema_cross_cythonstrategy example
NautilusTrader 1.214.0 Beta
NautilusTrader 1.214.0 Beta
Released on 28th March 2025 (UTC).
Enhancements
- Added Coinbase International Exchange initial integration adapter
- Added
time_in_forceparameter forStrategy.close_position(...) - Added
time_in_forceparameter forStrategy.close_all_positions(...) - Added
MarkPriceUpdatedata type - Added
IndexPriceUpdatedata 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_msconfig for Bybit WebSocket order client (#2466), thanks @sunlei - Enhanced
UnixNanosstring 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)toadd_mark_price(self, MarkPriceUpdate mark_price)
Internal Improvements
- Improved
WebSocketClientandSocketClientdesign 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_venueforBacktestEnginein Rust (#2457), thanks @filipmacek - Ported
add_instrumentforBacktestEnginein Rust (#2469), thanks @filipmacek - Upgraded
rediscrate to v0.29.2
Fixes
- Fixed race condition on multiple reconnect attempts for
WebSocketClientandSocketClient - Fixed position state snapshot
ts_snapshotvalue, which was alwaysts_lastinstead of timestamp when the snapshot was taken - Fixed instrument parsing for Tardis, now correctly applies changes and filters by
effective - Fixed
OrderStatusReportfor conditional orders of dYdX (#2467), thanks @davidsblom - Fixed submitting stop market orders for dYdX (#2471), thanks @davidsblom
- Fixed retrying HTTP calls on
DecodeErrorfor dYdX (#2472), thanks @davidsblom - Fixed
LIMIT_IF_TOUCHEDorder type enum parsing for Bybit - Fixed
MARKETorder 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
Deprecations
None
NautilusTrader 1.213.0 Beta
NautilusTrader 1.213.0 Beta
Released on 16th March 2025 (UTC).
Enhancements
- Added
CryptoOptioninstrument, 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_idsconfig option forStrategyConfig - Added catalog consolidation functions of several parquet files into one (#2421), thanks @faysou
- Added FDUSD (First Digital USD) crypto
Currencyconstant - Added initial leverage,
margin_modeandposition_modeconfig options for Bybit (#2441), thanks @sunlei - Updated parquet catalog in Rust with recent features (#2442), thanks @faysou
Breaking Changes
None
Internal Improvements
- Added
timeout_secsparameter toHttpClientfor default timeouts - Added additional precision validations for
OrderMatchingEngine - Added symmetric comparison impls between
u64andUnixNanos - Improved
InstrumentProvidererror 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
pyo3andpyo3-async-runtimescrates to v0.24.0 - Upgraded
tokiocrate 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
Strategycustomstrategy_ids - Fixed unbound variable for Bybit (#2433), thanks @sunlei
Documentation Updates
- Clarify docs for timestamp properties in
Data(#2450), thanks @stefansimik - Updated environment setup document (#2452), thanks @faysou
Deprecations
None
NautilusTrader 1.212.0 Beta
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
OwnOrderBookandOwnBookOrderto track own orders and prevent self-trades in market making - Added
manage_own_order_booksconfig option forExecEngineConfigto enable own order tracking - Added
Cache.own_order_book(...),Cache.own_bid_orders(...)andCache.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, whereprice_precisionandsize_precisionare now optional - Added
Order.ts_acceptedproperty - Added
Order.ts_submittedproperty - Added
UnixNanos::to_datetime_utc()in Rust - Added
Markvariant forPriceTypeenum - Added mark price handling for
Cache - Added mark exchange rate handling for
Cache - Added
PortfolioConfigfor configuration settings specific to thePortfolio - Added
use_mark_prices,use_mark_xratesandconvert_to_account_base_currencyoptions forPortfolioConfig - 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
BarSpecificationto msgspec encoding and decoding hooks (#2373), thanks @pierianeagle - Added
ignore_external_ordersconfig option forBetfairExecClientConfig, defaultFalseto 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 withget_exchange_rate(...)function implemented in Rust - Replaced
ForexSessionenum with equivalent from PyO3 - Replaced
ForexSessionFilterwith equivalent functions from PyO3 - Renamed
InterestRateDatatoYieldCurveData - Renamed
Cache.add_interest_rate_curvetoadd_yield_curve - Renamed
Cache.interest_rate_curvetoyield_curve - Renamed
OrderBook.counttoupdate_countfor clarity - Moved
ExecEngineConfig.portfolio_bar_updatesconfig option toPortfolioConfig.bar_updates
Internal Improvements
- Added initial
Cachebenchmarking for orders (#2341), thanks @filipmacek - Added support for
CARGO_BUILD_TARGETenvironment variable inbuild.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_typeforStrategyConfigwhich now correctly handles theOmsTypeenum - 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
OrderListto check all orders are for the same instrument ID - Improved
Controllerfunctionality with ability to create actors and strategies from configs (#2322), thanks @faysou - Improved
Controllercreation 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
OrderMatchingEnginebetween 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_groupto work withupdate_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_instrumentsgranularity for Databento (#2347), thanks @faysou - Refined Rust date functions (#2356), thanks @faysou
- Refined parsing of IB symbols (#2388), thanks @faysou
- Refined
base_templatebehaviour 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_backinstead oflastfor identifier tag functions (#2414), thanks @twitu - Refined and optimized
OrderBookin Rust - Cleaned up PyO3 migration artifacts (#2326), thanks @twitu
- Ported
StreamingFeatherWriterto Rust (#2292), thanks @twitu - Ported
update_limit_orderforOrderMatchingEnginein Rust (#2301), thanks @filipmacek - Ported
update_stop_market_orderforOrderMatchingEnginein Rust (#2310), thanks @filipmacek - Ported
update_stop_limit_orderforOrderMatchingEnginein Rust (#2314), thanks @filipmacek - Ported market-if-touched order handling for
OrderMatchingEnginein Rust (#2329), thanks @filipmacek - Ported limit-if-touched order handling for
OrderMatchingEnginein Rust (#2333), thanks @filipmacek - Ported market-to-limit order handling for
OrderMatchingEnginein Rust (#2354), thanks @filipmacek - Ported trailing stop order handling for
OrderMatchingEnginein Rust (#2366, #2376), thanks @filipmacek - Ported contingent orders handling for
OrderMatchingEnginein Rust (#2404), thanks @filipmacek - Updated Databento
publishers.jsonmappings file(s) - Upgraded
nautilus-ibapito 10.30.1 with necessary changes for Interactive Brokers (#2420), thanks @FGU1 - Upgraded Rust to 1.85.0 and 2024 edition
- Upgraded
arrowandparquetcrates to v54.2.1 - Upgraded
databentocrate to v0.20.0 (upgrades thedbncrate to v0.28.0) - Upgraded
datafusioncrate to v46.0.0 - Upgraded
pyo3crate to v0.23.5 - Upgraded
tokiocrate to v1.44.0
Fixes
- Fixed large difference between
Dataenum variants (#2315), thanks @twitu - Fixed
startandendrange filtering forTardisHttpClientto 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
effectivetimestamp filtering forTardisHttpClientto now only retain latest version at or beforeeffective - Fixed contract
activationfor Binance Futures, now based on theonboardDatefield - 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_instrumentsignature (#2332), thanks @faysou - Fixed composite bars subscription (#2337), thanks @faysou
- Fixed sub command issue in some adapters (#2343), thanks @faysou
- Fixed
bypass_loggingfixture to keep log guard alive for entire test session - Fixed time parsing for IB adapter (#2360), thanks @faysou
- Fixed bad
ts_initvalue 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_baraggregation function to guarantee high and low price invariants (#2430), thanks @hjander and @faysou
Documentation Updates
- Added documentation for messaging styles (#2410), thanks @stefansimik
- Added backtest clock and timers example (#2327), thanks @stefansimik
- Added backtest bar aggregation example (#2340), thanks @stefansimik
- Added backtest portfolio example (#2362), thanks @stefansimik
- Added backtest cache example (#2370), thanks @stefansimik
- Added backtest cascaded indicators example (#2398), thanks @stefansimik
- Added backtest custom event with msgbus example (#2400), thanks @stefansimik
- Added backtest messaging with msgbus example (#2406), thanks @stefansimik
- Added backtest messaging with actor & data example (#2407), thanks @stefansimik
- Added backtest messaging with actor & signal example (#2408), thanks @stefansimik
- Added indicators example (#2396), thanks @stefansimik
- Added documentation for debugging with Rust (#2325), thanks @faysou
- Added MRE strategy example (#2352), thanks @stefansimik
- Added data catalog example (#2353), thanks @stefansimik
- Improved and expandd bar aggregation docs (#2384), thanks @stefansimik
- Improved
emulation_triggerparameter description in docstrings (#2313), thanks @stefansimik - Improved docs for emulated orders (#2316), thanks ...
NautilusTrader 1.211.0 Beta
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-precisionmode for 128-bit integer backed value types (#2072), thanks @twitu - Added instrument definitions range requests for
TardisHttpClientwith optionalstartandendfilter parameters - Added
quote_currency,base_currency,instrument_type,contract_type,active,startandendfilters forTardisInstrumentProvider - Added
log_commandsconfig option forActorConfig,StrategyConfig,ExecAlgorithmConfigfor more efficient log filtering - Added additional limit parameters for
BettingInstrumentconstructor - Added
venue_position_idparameter forOrderStatusReport - Added bars update support for
PortfolioPnLs (#2239), thanks @faysou - Added optional
paramsforStrategyorder management methods (symmetry withActordata methods) (#2251), thanks @faysou - Added heartbeats for Betfair clients to keep streams alive (more robust when initial subscription delays)
- Added
timeout_shutdownconfig option forNautilusKernelConfig - Added IOC time in force mapping for Betfair orders
- Added
min_market_start_timeandmax_market_start_timetime range filtering forBetfairInstrumentProviderConfig - Added
default_min_notionalconfig option forBetfairInstrumentProviderConfig - Added
stream_conflate_msconfig option forBetfairDataClientConfig - Added
recv_window_msconfig option forBybitDataClientConfigandBybitExecClientConfig - Added
open_check_open_onlyconfig option forLiveExecEngineConfig - Added
BetSideenum (to supportBetandBetPosition) - Added
BetandBetPositionfor betting market risk and PnL calculations - Added
total_pnlandtotal_pnlsmethods forPortfolio - Added optional
priceparameter forPortfoliounrealized PnL and net exposure methods
Breaking Changes
- Renamed
OptionsContractinstrument toOptionContractfor more technically correct terminology (singular) - Renamed
OptionsSpreadinstrument toOptionSpreadfor more technically correct terminology (singular) - Renamed
options_contractmodules tooption_contract(see above) - Renamed
options_spreadmodules tooption_spread(see above) - Renamed
InstrumentClass.FUTURE_SPREADtoInstrumentClass.FUTURES_SPREADfor more technically correct terminology - Renamed
event_loggingconfig option tolog_events - Renamed
BetfairExecClientConfig.request_account_state_periodtorequest_account_state_secs - Moved SQL schema directory to
schemas/sql(reinstall the Nautilus CLI withmake install-cli) - Changed
OrderBookDeltaArrow schema to useFixedSizeBinaryfields to support the new precision modes - Changed
OrderBookDepth10Arrow schema to useFixedSizeBinaryfields to support the new precision modes - Changed
QuoteTickArrow schema to useFixedSizeBinaryfields to support the new precision modes - Changed
TradeTickArrow schema to useFixedSizeBinaryfields to support the new precision modes - Changed
BarArrow schema to useFixedSizeBinaryfields to support the new precision modes - Changed
BettingInstrumentdefaultmin_notionaltoNone - Changed meaning of
ws_connection_delay_secsfor PolymarketDataClientConfig to be non-initial delay (#2271) - Changed
GATEIOTardis venue toGATE_IOfor consistency withCRYPTO_COMandBLOCKCHAIN_COM - Removed
max_ws_reconnection_triesfor dYdX configs (no longer applicable with infinite retries and exponential backoff) - Removed
max_ws_reconnection_triesfor Bybit configs (no longer applicable with infinite retries and exponential backoff) - Removed remaining
max_ws_reconnection_triesfor Bybit configs (#2290), thanks @sunlei
Internal Improvements
- Added
ThrottledEnqueuerfor more efficient and robust live engines queue management and logging - Added
OrderBookDeltaTestBuilderin Rust to improve testing (#2234), thanks @filipmacek - Added custom certificate loading for
SocketClientTLS - Added
check_nonempty_stringfor string validation in Rust - Improved Polymarket WebSocket subscription handling by configurable delay (#2271), thanks @ryantam626
- Improved
WebSocketClientwith state management, error handling, timeouts and robust reconnects with exponential backoff - Improved
SocketClientwith state management, error handling, timeouts and robust reconnects with exponential backoff - Improved
TradingNodeshutdown when running withasyncio.run()(more orderly handling of event loop) - Improved
NautilusKernelpending tasks cancellation on shutdown - Improved
TardisHttpClientrequests and error handling - Improved log file writer to strip ANSI escape codes and unprintable chars
- Improved
cleanmake target behavior and addeddistcleanmake target (#2286), @demonkoryu - Refined
Currencynameto 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
moldas the linker in CI (#2254), thanks @sunlei - Ported market order processing for
OrderMatchingEnginein Rust (#2202), thanks @filipmacek - Ported limit order processing for
OrderMatchingEnginein Rust (#2212), thanks @filipmacek - Ported stop limit order processing for
OrderMatchingEnginein Rust (#2225), thanks @filipmacek - Ported
CancelOrderprocessing forOrderMatchingEnginein Rust (#2231), thanks @filipmacek - Ported
CancelAllOrdersprocessing forOrderMatchingEnginein Rust (#2253), thanks @filipmacek - Ported
BatchCancelOrdersprocessing forOrderMatchingEnginein Rust (#2256), thanks @filipmacek - Ported expire order processing for
OrderMatchingEnginein Rust (#2259), thanks @filipmacek - Ported modify order processing for
OrderMatchingEnginein Rust (#2261), thanks @filipmacek - Ported generate fresh account state for
SimulatedExchangein Rust (#2272), thanks @filipmacek - Ported adjust account for SimulatedExchange in Rust (#2273), thanks @filipmacek
- Continued porting
RiskEngineto Rust (#2210), thanks @pushkarm029 - Continued porting
ExecutionEngineto Rust (#2214), thanks @pushkarm029 - Continued porting
OrderEmulatorto Rust (#2219, #2226), thanks @pushkarm029 - Moved
modelcrate stubs into defaults (#2235), thanks @fhill2 - Upgraded
pyo3crate to v0.23.4 - Upgraded
pyo3-async-runtimescrate to v0.23.0
Fixes
- Fixed
LiveTimerimmediate 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
actionvssize) - 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
CustomDataimport inDataEngine(#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
InstrumentProviderinitialization behavior whenreloadflagTrue, thanks @ryantam626 - Fixed handling of Binance HTTP error messages (not always JSON-parsable, leading to
msgspec.DecodeError) - Fixed
CARGO_TARGET_DIRenvironment variable for build script (#2228), thanks @sunlei - Fixed typo in
delta.rsdoc comment (#2230), thanks @eltociear - Fixed memory leak in network PyO3 layer caused by the
gil-refsfeature (#2229), thanks for reporting @davidsblom - Fixed reconnect handling for Betfair (#2232, #2288, #2289), thanks @limx0
- Fixed
instrument.idnull dereferences in error logs (#2237), thanks for reporting @ryantam626 - Fixed schema for listing markets of dYdX (#2240), thanks @davidsblom
- Fixed realized pnl calculation in
Portfoliowhere flat positions were not included in cumulative sum (#2243), thanks @faysou - Fixed update order in
Cachefor 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
deltascannot be empty panicking) - Fixed
Cache.bar_typesaggregation_sourcefiltering, was incorrectly usingprice_type(#2269), thanks @faysou - Fixed missing
comboinstrument type for Tardis integration - Fixed quote tick processing from bars in
OrderMatchingEngineresulting in sizes below the minimum increment (#2275), thanks for...
NautilusTrader 1.210.0 Beta
NautilusTrader 1.210.0 Beta
Released on 10th January 2025 (UTC).
Enhancements
- Added
PerContractFeeModel, thanks @stefansimik - Added
DYDXInternalErrorandDYDXOraclaPricedata types for dYdX (#2155), thanks @davidsblom - Added proper
OrderBookDeltasflags parsing for Betfair - Added Binance TradeLite message support (#2156), thanks @DeevsDeevs
- Added
DataEngineConfig.time_bars_skip_first_non_full_barconfig option (#2160), thanks @faysou - Added
execution.fastsupport for Bybit (#2165), thanks @sunlei - Added catalog helper functions to export data (#2135), thanks @twitu
- Added additional timestamp properties for
NautilusKernel - Added
event_loggingconfig option forStrategyConfig(#2183), thanks @sunlei - Added
bar_adaptive_high_low_orderingtoBacktestVenueConfig(#2188), thanks @faysou and @stefansimik
Breaking Changes
- Removed optional
valueparam fromUUID4(useUUID4.from_str(...)instead), aligns with Nautilus PyO3 API - Changed
unix_nanos_to_iso8601to output an ISO 8601 (RFC 3339) format string with nanosecond precision - Changed
format_iso8601to output ISO 8601 (RFC 3339) format string with nanosecond precision - Changed
format_iso8601dtparameter to enforcepd.Timestamp(which has nanosecond precision) - Changed
TradingNode.is_builtfrom a property to a method.is_built() - Changed
TradingNode.is_runningfrom a property to a method.is_running() - Changed
OrderInitializedArrow schema (linked_order_idsandtagsdata types changed fromstringtobinary) - Changed order dictionary representation field types for
avg_pxandslippagefromstrtofloat(as out of alignment with position events) - Changed
aggregation_sourcefilter parameter forCache.bar_types(...)to optional with default ofNone
Internal Improvements
- Improved market order handling when no size available in book (now explicitly rejects)
- Improved validation for
TradeTickby ensuringsizeis always positive - Improved validation for
OrderBookDeltaby ensuringorder.sizeis positive whenactionis eitherADDorUPDATE - Improved validation for
BarSpecificationby ensuringstepis always positive - Standardized ISO 8601 timestamps to RFC 3339 spec with nanosecond precision
- Standardized flags for
OrderBookDeltasparsing 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
lotSizeFilterfield 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
OrderManagerto Rust (#2161), thanks @pushkarm029 - Ported trailing stop logic to Rust (#2174), thanks @DeevsDeevs
- Ported
FeeModelto Rust (#2191), thanks @filipmacek - Implemented IDs generator for
OrderMatchingEnginein Rust (#2193), thanks @filipmacek - Upgraded Cython to v3.1.0a1
- Upgraded
tokiocrate to v1.43.0 - Upgraded
datafusioncrate to v44.0.0
Fixes
- Fixed type check for
DataClienton requests to support clients other thanMarketDataClient - Fixed processing trade ticks from bars in
OrderMatchingEngine- that could result in zero-size trades, thanks for reporting @stefansimik - Fixed
instrument is Nonecheck flows forDataEngineandPolymarketExecutionClient - 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_RESOLVEDforPolymarketOrderStatus - Fixed missing
init_idfield from some order.to_dict()representations - Fixed writing
DYDXOraclePriceto catalog (#2158), thanks @davidsblom - Fixed account balance for dYdX (#2167), thanks @davidsblom
- Fixed markets schema for dYdX (#2190), thanks @davidsblom
- Fixed missing
OrderEmulatedandOrderReleasedArrow 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_orderfunction inOrderMatchingEngine(#2189), thanks @filipmacek
Documentation Updates
- Added docs for
Cache, slippage and spread handling in backtesting (#2162), thanks @stefansimik - Added docs for
FillModeland 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