Hi there,
I just want to Local trade with Lean CLI.
But when I want to run the bot Live. I get the error messages.
- It says that the portfolio balance is 0. But that isn't true. The usd balance is 0 but the BTC balance isn't.
The account Currency is SetAccountCurrency("BTC");
2. Error getting cash balance from brokerage.
20210730 15:11:51.918 ERROR:: BrokerageSetupHandler.LoadCashBalance(): System.Exception: BinanceBrokerage.GetCashBalance: request failed: [400] Bad Request, Content: {"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."},
ErrorMessage:
at QuantConnect.Brokerages.Binance.BinanceRestApiClient.GetCashBalance() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Brokerages/Binance/BinanceRestApiClient.cs:line 122
at QuantConnect.Brokerages.Binance.BinanceBrokerage.GetCashBalance() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Brokerages/Binance/BinanceBrokerage.cs:line 182
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.LoadCashBalance(IBrokerage brokerage, IAlgorithm algorithm) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BrokerageSetupHandler.cs:line 369
20210730 15:11:51.930 ERROR:: FitnessScore.Initialize(): fitness score will not be calculated because the algorithms starting portfolio value is 0.
20210730 15:11:52.074 ERROR:: Engine.Run(): During the algorithm initialization, the following exception has occurred: Error getting cash balance from brokerage: BinanceBrokerage.GetCashBalance: request failed: [400] Bad Request, Content:
{"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."}, ErrorMessage: BinanceBrokerage.GetCashBalance: request failed: [400] Bad Request, Content: {"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."},
ErrorMessage:
How can this be solved?
Thanks in advance!!
Greetings,
David
Vronghel
I can see in powershell that it see the amounts on my Binance account. So connecting with my binance account is not the problem
20210801 16:55:52.370 TRACE:: BrokerageSetupHandler.Setup(): Fetching cash balance from brokerage...
20210801 16:55:52.786 TRACE:: BrokerageSetupHandler.Setup(): Setting BTC cash to *************** (* because non of your busines :-))
20210801 16:55:52.786 TRACE:: BrokerageSetupHandler.Setup(): Setting LTC cash to ***************
20210801 16:55:52.787 TRACE:: BrokerageSetupHandler.Setup(): Setting USDT cash to *************
20210801 16:55:52.796 TRACE:: BrokerageSetupHandler.Setup(): Fetching open orders from brokerage...
20210801 16:55:53.160 TRACE:: BrokerageSetupHandler.Setup(): Fetching holdings from brokerage...
20210801 16:55:53.169 TRACE:: Brokerage.GetAccountHoldings(): sourcing holdings from provided brokerage data, found 0
entries
ERROR:
20210801 16:55:53.202 ERROR:: FitnessScore.Initialize(): fitness score will not be calculated because the
algorithms starting portfolio value is 0.
20210801 16:55:53.371 ERROR:: Engine.Run(): During the algorithm initialization, the following
exception has occurred: System.ArgumentException: Symbol can't be found in the Symbol Properties Database: BTCUSD
at QuantConnect.Securities.SecurityService.CreateSecurity(Symbol symbol, List`1 subscriptionDataConfigList, Decimal
leverage, Boolean addToSymbolCache, Security underlying) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Securities/SecurityService.cs:line 82
at QuantConnect.Securities.SecurityManager.CreateSecurity(Symbol symbol, List`1 subscriptionDataConfigList, Decimal
leverage, Boolean addToSymbolCache, Security underlying) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Securities/SecurityManager.cs:line 303
at QuantConnect.Algorithm.QCAlgorithm.AddSecurity[T](SecurityType securityType, String ticker, Nullable`1
resolution, String market, Boolean fillDataForward, Decimal leverage, Boolean extendedMarketHours) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Algorithm/QCAlgorithm.cs:line 2269
at QuantConnect.Algorithm.QCAlgorithm.AddCrypto(String ticker, Nullable`1 resolution, String market, Boolean
fillDataForward, Decimal leverage) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Algorithm/QCAlgorithm.cs:line 1850
at QuantConnect.Algorithm.CSharp.VentralTransdimensionalChamber.Initialize()
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.<>c__DisplayClass29_0.<Setup>b__1() in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BrokerageSetupHandler.cs:line 282Symbol can't be
found in the Symbol Properties Database: BTCUSD,During the algorithm initialization, the following exception has
occurred: System.ArgumentException: Symbol can't be found in the Symbol Properties Database: BTCUSD
at QuantConnect.Securities.SecurityService.CreateSecurity(Symbol symbol, List`1 subscriptionDataConfigList, Decimal
leverage, Boolean addToSymbolCache, Security underlying) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Securities/SecurityService.cs:line 82
at QuantConnect.Securities.SecurityManager.CreateSecurity(Symbol symbol, List`1 subscriptionDataConfigList, Decimal
leverage, Boolean addToSymbolCache, Security underlying) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Securities/SecurityManager.cs:line 303
at QuantConnect.Benchmarks.SecurityBenchmark.CreateInstance(SecurityManager securities, Symbol symbol) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Benchmarks/SecurityBenchmark.cs:line 62
at QuantConnect.Brokerages.BinanceBrokerageModel.GetBenchmark(SecurityManager securities) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Common/Brokerages/BinanceBrokerageModel.cs:line 78
at QuantConnect.Algorithm.QCAlgorithm.PostInitialize() in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Algorithm/QCAlgorithm.cs:line 557
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.Setup(SetupHandlerParameters parameters) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BrokerageSetupHandler.cs:line 317Symbol can't be
found in the Symbol Properties Database: BTCUSD
Is this cause binance isn't possible to local live trade for the moment and is still under development? Cause there was said that all the symbols in the list would be tradeable i remember.
Thanks in advance,
David
Varad Kabade
Hi Vronghel,
For issues with live trading, please contact support@quantconnect.com with the live deployment attached.
Best,
Varad Kabade
Vronghel
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!