Releases: nautechsystems/nautilus_trader
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
NautilusTrader 1.209.0 Beta
NautilusTrader 1.209.0 Beta
Released on 25th December 2024 (UTC).
Enhancements
- Added WebSocket API trading support for Bybit (#2129), thanks @sunlei
- Added
BybitOrderBookDeltaDataLoaderwith tutorial for Bybit backtesting (#2131), thanks @DeevsDeevs - Added margin and commission docs (#2128), thanks @stefansimik
- Added optional
depthparam for someOrderBookmethods - 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
exchangeMIC code asvenuefor instrument IDs with Databento GLBX dataset (#2108, #2121, #2124, #2126), thanks @faysou - Refactored to use
self.configattributes 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
databentocrate to v0.17.0
Breaking Changes
- Moved
BinanceOrderBookDeltaDataLoaderfromnautilus_trader.persistence.loaderstonautilus_trader.adapters.binance.loaders
Fixes
- Fixed multi-threaded monotonicity for
AtomicTimein real-time mode - Fixed timeout error code for Bybit (#2130), thanks @sunlei
- Fixed instruments info retrieval for Bybit (#2134), thanks @sunlei
- Fixed
request_aggregated_barsmetadata handling (#2137), thanks @faysou - Fixed demo notebook
backtest_high_level.ipynb(#2142), thanks @stefansimik
NautilusTrader 1.208.0 Beta
NautilusTrader 1.208.0 Beta
Released on 15th December 2024 (UTC).
Enhancements
- Added specific
paramsfor data subscriptions and requests which supports Databentobbo-1sandbbo-1mquotes (#2083, #2094), thanks @faysou - Added support for
STOP_LIMITentry order type forOrderFactory.bracket(...) - Added
.group_bids(...)and.group_asks(...)forOrderBook - Added
.bids_to_dict()and.asks_to_dict()forOrderBook - Added
ShutdownSystemcommand andshutdown_system(...)method for components (system-wide shutdown for backtest, sandbox, or live environments) - Added
max_ws_reconnection_triestoBybitDataClientConfig(#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_triestoBybitExecClientConfig(#2109), thanks @sunlei - Added
margin_init,margin_maint,maker_fee,taker_feeparams and attributes forFuturesContract - Added
margin_init,margin_maint,maker_fee,taker_feeparams and attributes forFuturesSpread - Added
margin_init,margin_maint,maker_fee,taker_feeparams and attributes forOptionsContract - Added
margin_init,margin_maint,maker_fee,taker_feeparams and attributes forOptionsSpread - Improved Databento symbology support for Interactive Brokers (#2113), thanks @rsmb7z
- Improved support of
STOP_MARKETandSTOP_LIMITorders 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()forOrderBookin Rust - Added type stubs for
coresubpackage - Added type stubs for
commonandmodelenums - 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
BybitWebSocketClientprivate channel authentication (#2101), thanks @sunlei - Refined
BybitWebSocketClientsubscribe 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
tokiocrate to v1.42.0
Breaking Changes
- Renamed
LeveltoBookLevel(standardizes order book type naming conventions) - Renamed
LaddertoBookLadder(standardizes order book type naming conventions) - Changed
FuturesContractArrow schema (addedmargin_init,margin_maint,maker_fee,taker_fee) - Changed
FuturesSpreadArrow schema (addedmargin_init,margin_maint,maker_fee,taker_fee) - Changed
OptionsContractArrow schema (addedmargin_init,margin_maint,maker_fee,taker_fee) - Changed
OptionsSpreadArrow schema (addedmargin_init,margin_maint,maker_fee,taker_fee)
Fixes
- Fixed data requests when specifying
endwith no catalog registered (comparison betweenpd.TimestampandNoneType) - Fixed
BEST_EFFORT_CANCELEDorder status report for dYdX (#2082), thanks @davidsblom - Fixed order handling for
BEST_EFFORT_CANCELEDmessages 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
BybitHttpClienterror handling when not a JSON string (#2096), thanks @sunlei - Fixed
BybitWebSocketClientprivate channel reconnect (#2097), thanks @sunlei - Fixed incorrect order side use in
BybitExecutionClient(#2098), thanks @sunlei - Fixed default
http_base_urlfor Bybit (#2110), thanks @sunlei
NautilusTrader 1.207.0 Beta
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
metadataparameter for data requests (#2043), thanks @faysou - Added
STOP_MARKETandSTOP_LIMITorder support for dYdX (#2066), thanks @davidsblom - Added
max_reconnection_triesto 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_precisionoptional parameter forDatabentoDataLoadermethods - Improved
Cachebehavior when adding more recent quotes, trades, or bars (now adds to cache)
Internal Improvements
- Ported
PortfolioandAccountManagerto Rust (#2058), thanks @pushkarm029 - Implemented
AsRef<str>forPrice,Money, andCurrency - 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
TradeIdDebug implementation to display value as proper UTF-8 string - Refined
HttpClientfor use directly from Rust - Refined Databento decoder (removed currency hard coding and use of
unsafe) - Upgraded
datafusioncrate to v43.0.0 (#2056), thanks @twitu
Breaking Changes
- Renamed
TriggerType.LAST_TRADEtoLAST_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,multiplierandlot_sizedecoding 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
NautilusTrader 1.206.0 Beta
Released on 17th November 2024 (UTC).
Enhancements
- Added
TardisDataClientproviding live data streams from a Tardis Machine WebSocket server - Added
TardisInstrumentProviderproviding 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
WebSocketClientreconnection retries (#2044), thanks @davidsblom - Implemented
OrderCancelRejectedevent generation for Binance and Bybit - Implemented
OrderModifyRejectedevent generation for Binance and Bybit - Improved
OrderRejectedhandling ofreasonstring (Noneis now allowed which will become the string'None') - Improved
OrderCancelRejectedhandling ofreasonstring (Noneis now allowed which will become the string'None') - Improved
OrderModifyRejectedhandling ofreasonstring (Noneis now allowed which will become the string'None')
Internal Improvements
- Ported
RiskEngineto Rust (#2035), thanks @pushkarm029 and @twitu - Ported
ExecutionEngineto 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
Fromtrait impls - Refined
InstrumentProviderinitialization behavior and logging - Refined
LiveTimercancel and performance testing - Simplified
LiveTimercancellation model (#2046), thanks @twitu - Refined Bybit HMAC authentication signatures (now using Rust implemented function)
- Refined Tardis instrument ID parsing
- Removed Bybit
msgspecredundant import alias (#2050), thanks @sunlei - Upgraded
databentocrate 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_pxfor 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_CANCELEDstatus orders - Fixed Polymarket size precision for
BinaryOptioninstruments (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
BacktestEnginewhen running withuse_pyo3logging config - Fixed in-flight orders check and improve error handling (#2053), thanks @davidsblom
- Fixed dYdX handling for liquidated fills (#2052), thanks @davidsblom
- Fixed
BybitResponse.timefield as optionalint(#2051), thanks @sunlei - Fixed single instrument requests for
DatabentoDataClient(was incorrectly calling_handle_instrumentsinstead of_handle_instrument), thanks for reporting @Emsu - Fixed
fsspecrecursive globbing behavior to ensure only file paths are included, and bumped dependency to version 2024.10.0 - Fixed jupyterlab url typo (#2057), thanks @Alsheh
NautilusTrader 1.205.0 Beta
NautilusTrader 1.205.0 Beta
Released on 3rd November 2024 (UTC).
Enhancements
- Added Tardis Machine and HTTP API integration in Python and Rust
- Added
LiveExecEngineConfig.open_check_interval_secsconfig option to actively reconcile open orders with the venue - Added aggregation of bars from historical data (#2002), thanks @faysou
- Added monthly and weekly bar aggregations (#2025), thanks @faysou
- Added
raise_exceptionoptional parameter toTradingNode.run(#2021), thanks @faysou - Added
OrderBook.get_avg_px_qty_for_exposurein Rust (#1893), thanks @elementace - Added timeouts to Interactive Brokers adapter configurations (#2026), thanks @rsmb7z
- Added optional time origins for time bar aggregation (#2028), thanks @faysou
- Added Polymarket position status reports and order status report generation based on fill reports
- Added USDC.e (PoS) currency (used by Polymarket) to internal currency map
- Upgraded Polymarket WebSocket API to new version
Internal Improvements
- Ported analysis subpackage to Rust (#2016), thanks @pushkarm029
- Improved Postgres testing (#2018), thanks @filipmacek
- Improved Redis version parsing to support truncated versions (improves compatibility with Redis-compliant databases)
- Refined Arrow serialization (record batch functions now also available in Rust)
- Refined core
BarAPI to remove unnecessary unwraps - Standardized network client logging
- Fixed all pyo3 deprecations for API breaking changes
- Fixed all clippy warning lints for PyO3 changes (#2030), thanks @pushkarm029
- PyO3 upgrade refactor and repair catalog tests (#2032), thanks @twitu
- Upgraded
pyo3crate to v0.22.5 - Upgraded
pyo3-async-runtimescrate to v0.22.0 - Upgraded
tokiocrate to v1.41.0
Breaking Changes
- Removed pyo3
DataTransformer(was being used for namespacing, so refactored to separate functions) - Moved
TEST_DATA_DIRconstant fromteststonautilus_traderpackage (#2020), thanks @faysou
Fixes
- Fixed use of Redis
KEYScommand which, is unsupported in cluster environments (replaced withSCANfor compatibility) - Fixed decoding fill HTTP messages for dYdX (#2022), thanks @davidsblom
- Fixed account balance report for dYdX (#2024), thanks @davidsblom
- Fixed Interactive Brokers market data client subscription log message (#2012), thanks @marcodambros
- Fixed Polymarket execution reconciliation (was not able to reconcile from closed orders)
- Fixed catalog query mem leak test (#2031), thanks @pushkarm029
- Fixed
OrderInitialized.to_dict()tagsvalue type tolist[str](was a concatenatedstr) - Fixed
OrderInitialized.to_dict()linked_order_idsvalue type tolist[str](was a concatenatedstr) - Fixed Betfair clients shutdown (#2037), thanks @limx0
NautilusTrader 1.204.0 Beta
NautilusTrader 1.204.0 Beta
Released on 22nd October 2024 (UTC).
Enhancements
- Added
TardisCSVDataLoaderfor loading data from Tardis format CSV files as either legacy Cython or PyO3 objects - Added
Clock.timestamp_us()method for UNIX timestamps in microseconds (μs) - Added support for
bbo-1sandbbo-1mquote schemas for Databento adapter (#1990), thanks @faysou - Added validation for venue
book_typeconfiguration vs data (prevents an issue where top-of-book data is used when order book data is expected) - Added
compute_effective_deltasconfig setting forPolymarketDataClientConfig, reducing snapshot size (Falseby default to maintain current behavior) - Added rate limiter for
WebSocketClient(#1994), thanks @pushkarm029 - Added in the money probability field to GreeksData (#1995), thanks @faysou
- Added
on_signal(signal)handler for custom signal data - Added
nautilus_trader.common.eventsmodule with re-exports forTimeEventand other system events - Improved usability of
OrderBookDepth10by filling partial levels with null orders and zero counts - Improved Postgres config (#2010), thanks @filipmacek
- Refined
DatabentoInstrumentProviderhandling of large bulks of instrument definitions (improved parent symbol support) - Standardized Betfair symbology to use hyphens instead of periods (prevents Betfair symbols being treated as composite)
- Integration guide docs fixes (#1991), thanks @FarukhS52
Internal Improvements
- Ported
Throttlerto Rust (#1988), thanks @pushkarm029 and @twitu - Ported
BettingInstrumentto Rust - Refined
RateLimiterforWebSocketClientand add tests (#2000), thanks @pushkarm029 - Refined
WebSocketClientto close existing tasks on reconnect (#1986), thanks @davidsblom - Remove mutable references in
CacheDatabaseAdaptertrait in Rust (#2015), thanks @filipmacek - Use Rust rate limiter for dYdX websockets (#1996, #1999), thanks @davidsblom
- Improved error logs for dYdX websocket subscriptions (#1993), thanks @davidsblom
- Standardized log and error message syntax in Rust
- Continue porting
SimulatedExchangeandOrderMatchingEngineto Rust (#1997, #1998, #2001, #2003, #2004, #2006, #2007, #2009, #2014), thanks @filipmacek
Breaking Changes
- Removed legacy
TardisQuoteDataLoader(now redundant with new Rust implemented loader) - Removed legacy
TardisTradeDataLoader(now redundant with new Rust implemented loader) - Custom signals are now passed to
on_signal(signal)instead ofon_data(data) - Changed
Position.to_dict()commissionsvalue type tolist[str](rather than an optionalstrof a list of strings) - Changed
Position.to_dict()avg_px_openvalue type tofloat - Changed
Position.to_dict()avg_px_closevalue type tofloat | None - Changed
Position.to_dict()realized_returnvalue type tofloat | None - Changed
BettingInstrumentArrow schema fieldsevent_open_dateandmarket_start_timefromstringtouint64
Fixes
- Fixed
SocketClientTLS implementation - Fixed
WebSocketClienterror handling on writer close, thanks for reporting @davidsblom - Fixed resubscribing to orderbook in batched mode for dYdX (#1985), thanks @davidsblom
- Fixed Betfair tests related to symbology (#1988), thanks @limx0
- Fixed check for
OmsTypeinOrderMatchingEngineposition ID processing (#2003), thanks @filipmacek - Fixed
TardisCSVDataLoadersnapshot5 and snapshot25 parsing (#2005), thanks @pushkarm029 - Fixed Binance clients venue assignment, we should use the
client_idparams (which match the custom clientname) to communicate with the clients, and use the same'BINANCE'venue identifiers - Fixed
OrderMatchingEngineincorrectly attempting to process monthly bars for execution (which will fail, as no reasonabletimedeltais available), thanks for reporting @frostRed - Fixed handling
MONTHaggregation forcache.bar_types()(sorting required an internal call for the bar intervalstimedelta), thanks for reporting @frostRed
NautilusTrader 1.203.0 Beta
NautilusTrader 1.203.0 Beta
Released on 5th October 2024 (UTC).
Enhancements
- Added
modeparameter toParquetDataCatalog.write_datato control data writing behavior (#1976), thanks @faysou - Added batch cancel for short terms orders of dYdX (#1978), thanks @davidsblom
- Improved OKX configuration (#1966), thanks @miller-moore
- Improved option greeks (#1964), thanks @faysou
Internal Improvements
- Implemented order book delta processing for
SimulatedExchange(#1975), thanks @filipmacek - Implemented bar processing for
SimulatedExchange(#1969), thanks @filipmacek - Implemented remaining getter functions in
SimulatedExchange(#1970), thanks @filipmacek - Implemented rate limiting for dYdX websocket subscriptions (#1977), thanks @davidsblom
- Refactored reconnection handling for dYdX (#1983), thanks @davidsblom
- Refined
DatabentoDataLoaderinternals to accommodate usage from Rust - Added initial large test data files download and caching capability
Breaking Changes
None
Fixes
- Fixed out of order row groups in DataFusion filter query (#1974), thanks @twitu
- Fixed
BacktestNodedata sorting regression causing clock non-decreasing time assertion error - Fixed circular imports for
Actor, thanks @limx0 - Fixed OKX HTTP client signatures (#1966), thanks @miller-moore
- Fixed resubscribing to orderbooks for dYdX (#1973), thanks @davidsblom
- Fixed generating cancel rejections for dYdX (#1982), thanks @davidsblom
- Fixed
WebSocketClienttask cleanup on disconnect (#1981), thanks @twitu - Fixed
Conditionmethod name collisions with Ctrueandfalsemacros, which occurred during compilation in profiling mode
NautilusTrader 1.202.0 Beta
NautilusTrader 1.202.0 Beta
Released on 27th September 2024 (UTC).
This will be the final release with support for Python 3.10.
The numpy version requirement has been relaxed to >= 1.26.4.
Enhancements
- Added Polymarket decentralized prediction market integration
- Added OKX crypto exchange integration (#1951), thanks @miller-moore
- Added
BinaryOptioninstrument (supports Polymarket integration) - Added
LiveExecutionEngine.inflight_check_retriesconfig option to limit in-flight order query attempts - Added
Symbol.root()method for obtaining the root of parent or composite symbols - Added
Symbol.topic()method for obtaining the subscription topic of parent or composite symbols - Added
Symbol.is_composite()method to determine if symbol is made up of parts with period (.) delimiters - Added
underlyingfilter parameter forCache.instruments(...)method - Added
reduce_onlyparameter forStrategy.close_position(...)method (Trueby default to maintain current behavior) - Added
reduce_onlyparameter forStrategy.close_all_positions(...)method (Trueby default to maintain current behavior) - Implemented flush with truncate Postgres function for
PostgresCacheDatabase(#1928), thanks @filipmacek - Implemented file rotation for
StreamingFeatherWriterwith internal improvements usingClockandCache(#1954, #1961), thanks @graceyangfan - Improved dYdX execution client to use
RetryManagerfor HTTP requests (#1941), thanks @davidsblom - Improved Interactive Brokers adapter to use a dynamic IB gateway
container_imagefrom config (#1940), thanks @rsmb7z - Improved
OrderBookDeltasstreaming and batching based on theF_LASTflag - Standardized underscore thousands separators for backtest logging
- Updated Databento
publishers.json
Internal Improvements
- Implemented
OrderTestBuilderto assist testing in Rust (#1952), thanks @filipmacek - Implemented quote tick processing for SimulatedExchange in Rust (#1956), thanks @filipmacek
- Implemented trade tick processing for SimulatedExchange in Rust (#1956), thanks @filipmacek
- Refined
Loggerto use unbuffered stdout/stderr writers (#1960), thanks @twitu
Breaking Changes
- Renamed
batch_size_bytestochunk_size(more accurate naming for number of data points to process per chunk in backtest streaming mode) - Standardized Stop-Loss (SL) and Take-Profit (TP) param ordering for
OrderFactory.bracket(...)including:tp_time_in_force,tp_exec_algorithm_params,tp_tags,tp_client_order_id
Fixes
- Fixed
LoggingConfigissue forlevel_filewhen used withuse_pyo3=True(was not passing through thelevel_filesetting), thanks for reporting @xt2014 - Fixed composite bar requests (#1923), thanks @faysou
- Fixed average price calculation for
ValueBarAggregator(#1927), thanks @faysou - Fixed breaking protobuf issue by pinning
protobufandgrpciofor dYdX (#1929), thanks @davidsblom - Fixed edge case where exceptions raised in
BacktestNodeprior to engine initialization would not produce logs, thanks for reporting @faysou - Fixed handling of internal server error for dYdX (#1938), thanks @davidsblom
- Fixed
BybitWebSocketClientprivate channel authentication on reconnect, thanks for reporting @miller-moore - Fixed
OrderFactory.bracket(...)param ordering forsl_time_in_forceandtp_time_in_force, thanks for reporting @marcodambros - Fixed
Cfdinstrument Arrow schema and serialization - Fixed bar subscriptions on TWS/GW restart for Interactive Brokers (#1950), thanks @rsmb7z
- Fixed Databento parent and continuous contract subscriptions (using new symbol root)
- Fixed Databento
FuturesSpreadandOptionsSpreadinstrument decoding (was not correctly handling price increments and empty underlyings) - Fixed
FuturesSpreadserialization - Fixed
OptionsSpreadserialization