Binance WebSocket, Chain Downloader, Custom Option Pricing

These are the LEAN release notes for versions 17540 to 17552. We expanded live trading and brokerage integrations by adding a dedicated 'binance-orders-websocket-url' configuration, improving combo-order routing and pre-submission validation, and refining support for WEX and Wolverine order properties. We also added one-time warnings for untracked manual brokerage orders and daily consolidation edge cases to reduce surprises in live deployments.

We strengthened data access and history workflows with a CanonicalDataDownloaderDecorator for option/future chain selection, generic 'DownloadData' deserialization extensions, single-contract downloads in 'DownloaderProvider', and a mapped synchronizing history provider for ticker changes. We improved symbol mapping via periodic reloads and added tests for consistent tick history retrieval.

We enhanced options modeling with custom price model support, a new indicator-based option price model, and Python improvements, while fixing Theta Greeks overflow, time/warmup alignment, universe selection lag, trade drawdown math, result and order streaming, logging clarity, memory behavior, and CI reliability.

Thank you AhmedAli58, creatidy, and AdalyatNazirov for improving combo order handling, preventing resubmissions, enhancing decimal JSON parsing, and fixing Bybit minimum order-size checks.

Features

  • Shipped (#9308): Feat: add 'binance-orders-websocket-url' to config.json: We added 'binance-orders-websocket-url' to config for a dedicated Binance order WebSocket endpoint, simplifying initialization.
  • Shipped (#9299): Feat: 'CanonicalDataDownloaderDecorator' for chain support: We added a canonical data downloader decorator to select available option/future contracts per date range via universes and data providers.
  • Shipped (#9286): Add generic DownloadData extension methods for deserialization: We added generic DownloadData extensions to deserialize HTTP responses directly into type T.
  • Shipped (#9285): Feat: support downloading single contract in 'DownloaderProvider': We added DownloaderProvider support to download a single contract for futures and options, enabling contract-specific historical data downloads.
  • Shipped (#9278): feat: warn on manual brokerage orders not tracked by Lean: We warn on unrecognized manual brokerage orders once, guiding users to handle or ignore them via custom message handler.
  • Shipped (#9277): Add Python overload for OptionPriceModelResult: We added a Python constructor overload for OptionPriceModelResult, validated through unit tests.
  • Shipped (#9270): Adds support for custom option pricing models: We added SetPriceModel with a Python wrapper, enabling custom option pricing models beyond QuantLib; validated via regression algorithms.
  • Shipped (#9264): Add WEX optional locate broker order property: We added an optional WEX broker order property to support locate requirements during order submission.
  • Shipped (#9257): Wolverine order properties allow specifying PositionSize : We enabled Wolverine order properties to precisely specify PositionSize for orders, improving position sizing control.
  • Shipped (#9256): feat: add MappedSynchronizingHistoryProvider base class: We added a MappedSynchronizingHistoryProvider base using IMapFileProvider for ticker changes and synchronized GetHistory mapped retrieval.
  • Shipped (#9254): Add one time warning for daily consolidation: We added a one-time warning when extended hours are enabled but daily consolidation excludes them, preventing unexpected data omission.
  • Shipped (#9237): Implement indicator-based option price model: We implemented an indicator-driven option pricing model using implied volatility and Greeks, validated with unit and regression tests.
  • Shipped (#9234): Enable trades results streaming: We enabled streaming of trade result packets and fixed first-day live result file trade additions without waiting daily sampling.

Bug Fixes

  • Fixed issue (#9307): We fixed Theta Greeks indicator calculation overflow.
  • Fixed issue (#9306): We periodically reload symbol mapper to detect new symbols.
  • Fixed issue (#9304): We set OptionStrategy leg symbols during creation.
  • Fixed issue (#9301): We reject unsupported 4-leg IB combo orders pre-submission.
  • Fixed issue (#9300): We compute session working bar time from last consolidated bar.
  • Fixed issue (#9298): We fixed CI by quoting environment variables in workflows.
  • Fixed issue (#9293): We route combo orders by group ID, preventing resubmissions.
  • Fixed issue (#9291): We added JsonConverter parsing decimals, supporting scientific notation.
  • Fixed issue (#9284): We delay AdvanceTime until initialization, aligning warmup and times.
  • Fixed issue (#9282): We stream orders associated with closed trades.
  • Fixed issue (#9281): We improved VBaseSignalExport weight calculations for accurate signal exports.
  • Fixed issue (#9267): We stopped forcing full garbage collection during memory reduction.
  • Fixed issue (#9265): We fixed asynchronous universe selection time lag regression.
  • Fixed issue (#9261): We fixed Bybit minimum order-size comparison to allow exact minimum.
  • Fixed issue (#9255): We fixed Security.Fundamental direct-access timestamps, updating regression assertions.
  • Fixed issue (#9251): We fixed CI with dash-separated timestamps in backtest names.
  • Fixed issue (#9249): We fixed Trade.EndTradeDrawdown calculation; validated with unit tests.

Updates

  • Fixed issue (#9303): We updated pythonnet to version 2.0.53.
  • Fixed issue (#9297): We refined error and log messages for clearer diagnostics.
  • Fixed issue (#9288): We replaced deprecated Docker action with manual container execution.
  • Fixed issue (#9274): We apply DefaultOrderProperties to OrderCommand submit requests.
  • Fixed issue (#9263): We added tests ensuring consistent tick history retrieval.
  • Fixed issue (#9252): We improved Wolverine brokerage model limitations.