kucoin-java-sdk icon indicating copy to clipboard operation
kucoin-java-sdk copied to clipboard

WS api quickly running into issues.

Open Swoorup opened this issue 3 years ago • 3 comments

I quickly run into exception such as follows when using the ws client.

    val kucoinPublicWSClient = builder.buildPublicWSClient()
    kucoinPublicWSClient.onMatchExecutionData(trade => println(trade), "XRP-USDT")
03:08:58.050 [OkHttp https://push-private.kucoin.com/...] ERROR c.k.s.w.l.KucoinPublicWebsocketListener - Error on private socket
java.io.EOFException: null
        at okio.RealBufferedSource.require(RealBufferedSource.java:61)
        at okio.RealBufferedSource.readByte(RealBufferedSource.java:74)
        at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:117)
        at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101)
        at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
        at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Swoorup avatar Apr 07 '21 17:04 Swoorup

#41 resolves this

Parker7123 avatar Apr 19 '21 15:04 Parker7123

Hi, please try to apply my PR https://github.com/Kucoin/kucoin-java-sdk/pull/56

denistorresan avatar Jun 11 '22 12:06 denistorresan

@denistorresan, great answer, thanks!

Wayruha avatar Nov 14 '22 20:11 Wayruha