You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am using V5PrivateApi.SubscribeToOrderUpdatesAsync to listen for changes to orders, and noticed a log error message:
Cannot map enum value. EnumType: StopLossTakeProfitMode, Value: UNKNOWN, Known values: Full, Partial. If you think UNKNOWN should added please open an issue on the Github repo
I had my program listening for orders, while I placed an order without any SL/TP using the ByBit website. However if a place an order with a SL/TP, the error does not show.
Note that the order is still received via web socket, with the TpSlMode property set to null. The message is just a logged warning and doesn't impact the API in any way (low priority).
The text was updated successfully, but these errors were encountered:
Started using Trailing Stops via the SetTradingStop() method and I am also receiving this error message;
Cannot map enum value. EnumType: StopOrderType, Value: TrailingProfit, Known values: TakeProfit, StopLoss, TrailingStop, Stop, PartialStopLoss, PartialTakeProfit, tpslOrder, OcoOrder, MmRateClose, BidirectionalTpslOrder. If you think TrailingProfit should added please open an issue on the Github repo
It appears to be pseudonym for TrailingStop, or just a typo from the API itself. It appears in the websocket feed for orders when a trailing stop is entered. As a result, the order is received as a Market Sell order as the StopOrderType field cannot be parsed.
A workaround appears to be to check the CreateType field for "CreateByTrailingProfit" to identify the order as a Take Profit order.
After working with the API and trailing stops I have found the following:
A "TrailingProfit" order is essentially a TrailingStop order that has not yet reached it's activation price. Once a TrailingProfit order is activated, it is converted to a TrailingStop.
As mentioned above, this can be confirmed by checking the "CreateType" field:
CreateType = "CreateByTrailingProfit" and StopOrderType = null - this is a TrailingProfit order (not-yet-activated)
CreateType = "CreateByTrailingStop" and StopOrderType = TrailingStop - this is a TrailingStop order (activated)
Please add TrailingProfit to the enums for StopOrderType.
Hi. I am using V5PrivateApi.SubscribeToOrderUpdatesAsync to listen for changes to orders, and noticed a log error message:
Cannot map enum value. EnumType: StopLossTakeProfitMode, Value: UNKNOWN, Known values: Full, Partial. If you think UNKNOWN should added please open an issue on the Github repo
I had my program listening for orders, while I placed an order without any SL/TP using the ByBit website. However if a place an order with a SL/TP, the error does not show.
Note that the order is still received via web socket, with the TpSlMode property set to null. The message is just a logged warning and doesn't impact the API in any way (low priority).
The text was updated successfully, but these errors were encountered: