QuantConnect / lean-cli

CLI for running the LEAN engine locally and in the cloud
https://www.lean.io/cli
Apache License 2.0
196 stars 100 forks source link

Binance Futures Should Use BinanceFuturesBrokerage+BinanceBrokerage As Data Proider #417

Open AlexCatarino opened 8 months ago

AlexCatarino commented 8 months ago

When we deploy to Binance Futures, we set:

2024-02-07T14:59:29.7055425Z TRACE:: CompositeDataQueueHandler.SetJob(): will use [
  "BinanceFuturesBrokerage"
]

so the algorithm doesn't get data of spot data. The algorithm needs spot data to set the conversion rate, otherwise we get this runtime error:

System.ArgumentException: The conversion rate for BNB is not available.
   at QuantConnect.Securities.CashBook.Convert(Decimal sourceQuantity, String sourceCurrency, String destinationCurrency) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Securities/CashBook.cs:line 167