burakoner / OKEx.Net

Open source .Net API wrapper for the @OKEx V5 Rest API and V5 Websocket API
MIT License
86 stars 48 forks source link

Cyclic Error by WebSocket #93

Closed VladyslavCode closed 1 year ago

VladyslavCode commented 1 year ago

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

burakoner commented 1 year ago

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

VladyslavCode commented 1 year ago

Thanks for your answer!