diff --git a/Binance.Net/Objects/Sockets/Subscriptions/BinanceSpotUserDataSubscription.cs b/Binance.Net/Objects/Sockets/Subscriptions/BinanceSpotUserDataSubscription.cs index 9d20c068..ddeada78 100644 --- a/Binance.Net/Objects/Sockets/Subscriptions/BinanceSpotUserDataSubscription.cs +++ b/Binance.Net/Objects/Sockets/Subscriptions/BinanceSpotUserDataSubscription.cs @@ -84,15 +84,29 @@ public BinanceSpotUserDataSubscription( public override CallResult DoHandleMessage(SocketConnection connection, DataEvent message) { if (message.Data is BinanceCombinedStream positionUpdate) + { + positionUpdate.Data.ListenKey = positionUpdate.Stream; _positionHandler?.Invoke(message.As(positionUpdate.Data, positionUpdate.Stream, null, SocketUpdateType.Update)); + } else if (message.Data is BinanceCombinedStream balanceUpdate) + { + balanceUpdate.Data.ListenKey = balanceUpdate.Stream; _balanceHandler?.Invoke(message.As(balanceUpdate.Data, balanceUpdate.Stream, null, SocketUpdateType.Update)); + } else if (message.Data is BinanceCombinedStream orderUpdate) + { + orderUpdate.Data.ListenKey = orderUpdate.Stream; _orderHandler?.Invoke(message.As(orderUpdate.Data, orderUpdate.Stream, orderUpdate.Data.Symbol, SocketUpdateType.Update)); + } else if (message.Data is BinanceCombinedStream orderListUpdate) + { + orderListUpdate.Data.ListenKey = orderListUpdate.Stream; _orderListHandler?.Invoke(message.As(orderListUpdate.Data, orderListUpdate.Stream, null, SocketUpdateType.Update)); + } else if (message.Data is BinanceCombinedStream listenKeyExpired) + { _listenKeyExpiredHandler?.Invoke(message.As(listenKeyExpired.Data, listenKeyExpired.Stream, null, SocketUpdateType.Update)); + } return new CallResult(null); }