ErrorMessage: Cross Margin Trading not yet supported by the selected coin
2024-03-05T15:05:00.7146835Z ERROR:: BrokerageTransactionHandler.HandleSubmitOrderRequest(): System.Exception: ByBitApiClient request failed: [200] OK, Content: {"retCode":170037,"retMsg":"Cross Margin Trading not yet supported by the selected coin","result":{},"retExtInfo":{},"time":1709651100616}, ErrorCode: 170037 ErrorMessage: Cross Margin Trading not yet supported by the selected coin
at QuantConnect.Brokerages.Bybit.Api.BybitTradeApiEndpoint.PlaceOrder(BybitProductCategory category, Order order, Boolean useMargin)
at QuantConnect.Brokerages.Bybit.BybitBrokerage.g.d()
at QuantConnect.Brokerages.BrokerageConcurrentMessageHandler`1.WithLockedStream(Action code) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/LeanEnterprise/Brokerages/BrokerageConcurrentMessageHandler.cs:line 82
at QuantConnect.Brokerages.Bybit.BybitBrokerage.PlaceOrder(Order order)
The user should receive that error message instead of "Brokerage failed to place orders" or as a Brokerage Message.
Potential Solution
N/A
Reproducing the Problem
SetHolding("BTCUSDT", 1);
then
SetHolding("BTCUSDT", 0);
Checklist
[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues
[x] I have provided detailed steps to reproduce the issue
Expected Behavior
Users are informed of the cause of invalid orders.
Actual Behavior
The algorithm received the following information
and we don't know why.
When we inpect the syslog, we can read:
The user should receive that error message instead of "Brokerage failed to place orders" or as a Brokerage Message.
Potential Solution
N/A
Reproducing the Problem
SetHolding("BTCUSDT", 1);
thenSetHolding("BTCUSDT", 0);
Checklist
master
branch