Sub-calls of SubscribeToUserDataUpdatesAsync function not coming (positionchange)
See original GitHub issueAll 5 calls (leverageupdate, marginupdate, etc.) in the SubscribeToUserDataUpdatesAsync function do not work. Although I am in the position, userdataupdate data is not coming. As an example, I placed an order and canceled it. There was no trigger orderupdate. where am i doing wrong.
var apiAyar = new BinanceApiCredentials(GenelAyar.Default.ApiKey, GenelAyar.Default.SecretKey); _soket = new BinanceSocketClient(new BinanceSocketClientOptions() { ApiCredentials = apiAyar,LogLevel=LogLevel.Debug }); var key = await _istemci.CoinFuturesApi.Account.StartUserStreamAsync(); if (key.Success) await _soket.CoinFuturesStreams.SubscribeToUserDataUpdatesAsync(key.Data, CoinMKaldıraçOlayı, CoinMMarginÇağrısı, CoinMHesapGüncellemesi, CoinMSiparişGüncellemesi, CoinMKeySüreDoldu, soketİptal);
Issue Analytics
- State:
- Created 5 months ago
- Comments:8 (3 by maintainers)
I solved my issue above by simply updating to Binance.Net 8.6.0. It looks like SocketClient.SpotStreams moved to SocketCilent.SpotApi.Account; and other refactors within the namespace. Also the json serialization based errors disappeared with the update.
I’m having a similar issue, and can offer some more insight, but not yet a solution. I am subscribed to user data updates on both usdm futures, as well as spot. I am getting order, position, and asset updates perfectly in usdm futures. In spot, I am getting balance updates just fine. But I am getting absolutely no order updates in spot.
I ran the trace, and see this in the immediate window, when the order update is supposed to come thru (send new buy order -1% below bid price). This problem is because of field “V” in the orderupdate executionReport. Please see below. What is the fix to get this orderupdate on spot to work? Thank you!
2023/05/08 15:05:41:348 | Warning | Binance | Couldn’t deserialize data received from order stream: : Deserialize JsonSerializationException: Error converting value “NONE” to type ‘System.Nullable`1[System.Int64]’. Path ‘data.V’, line 37, position 15. data: { “e”: “executionReport”, “E”: 1683558340130, “s”: “ETHUSDT”, “c”: “23050854269–0”, “S”: “BUY”, “o”: “LIMIT”, “f”: “GTC”, “q”: “0.01100000”, “p”: “1848.88000000”, “P”: “0.00000000”, “F”: “0.00000000”, “g”: -1, “C”: “”, “x”: “NEW”, “X”: “NEW”, “r”: “NONE”, “i”: 13375317883, “l”: “0.00000000”, “z”: “0.00000000”, “L”: “0.00000000”, “n”: “0”, “N”: null, “T”: 1683558340126, “t”: -1, “I”: 27872231469, “w”: true, “m”: false, “M”: false, “O”: 1683558340126, “Z”: “0.00000000”, “Y”: “0.00000000”, “Q”: “0.00000000”, “W”: 1683558340126, “V”: “NONE” }