burakoner/OKEx.Net

Cyclic Error by WebSocket

Closed this issue · 2 comments

Hi,
I am creating the Okx websocket and subscribe:

        sample_pairs.Add(ExchangeSetting.Currency);
        // Tickers (Public)
        foreach (var pair in sample_pairs)
        {
            var subscription = socketapi.SubscribeToTickers(pair, (Ticker) =>
            {
               Some code...
            });
        }

And after that i have cyclic messages:
2023.03.18 13:57:45:349 | Error | OKX Websocket Api | Deserialize JsonReaderException: Unexpected character encountered while parsing value: p. Path '', line 0, position 0., Path: , LineNumber: 0, LinePosition: 0. Data: pong
2023.03.18 13:57:45:354 | Warning | OKX Websocket Api | Socket 1 Message not handled: pong

It's related with CryptoExchange.Net library. I recommend you to migrate OKX.Api repo https://github.com/burakoner/OKX.Api

Thanks for your answer!