bitrich-info / xchange-stream

XChange-stream is a Java library providing a simple and consistent streaming API for interacting with Bitcoin and other crypto currency exchanges via WebSocket protocol. It is build on top of of XChange library providing new interfaces for streaming API. User can subscribe for live updates via reactive streams of RxJava library.
Apache License 2.0
413 stars 222 forks source link

Kraken websocket not working #485

Open atiqkhan26 opened 4 years ago

atiqkhan26 commented 4 years ago

Hi experts,

I am trying to test the public channel of Kraken's beta environment and keep getting this error. Has anyone got it working for Kraken?

10:01:18.444 [nioEventLoopGroup-2-1] INFO info.bitrich.xchangestream.kraken.KrakenStreamingService - Connecting to wss://beta-ws.kraken.com 10:01:19.340 [nioEventLoopGroup-2-2] INFO info.bitrich.xchangestream.service.netty.WebSocketClientHandler - WebSocket Client connected! 10:01:19.340 [nioEventLoopGroup-2-2] WARN info.bitrich.xchangestream.kraken.KrakenStreamingService - Resubscribing channels 10:01:19.344 [nioEventLoopGroup-2-2] INFO info.bitrich.xchangestream.kraken.KrakenStreamingService - System status: KrakenSystemStatus{connectionID='9183671655362526710', event='systemStatus', status='online', version='0.3.0'} 10:01:19.548 [nioEventLoopGroup-2-2] ERROR info.bitrich.xchangestream.kraken.KrakenStreamingService - Channel ticker-LTC/USD has been failed: Public channels not available in this endpoint 10:01:45.826 [nioEventLoopGroup-2-2] ERROR info.bitrich.xchangestream.kraken.KrakenStreamingService - Channel ticker-LTC/USD has been failed: Subscription Not Found

Any help resolving this will be highly appreciated.

Thanks

badgerwithagun commented 4 years ago

@mdvx ?

atiqkhan26 commented 4 years ago

Although Kraken documentation says beta-ws.kraken.com can work with both public and private channels, it doesn't seem to be the case. I have to get the public channels from ws.kraken.com and private ones from beta-ws.kraken.com

Am I missing something which might be behaving differently for me.

mdvx commented 4 years ago

I have not tried to connect to the beta channel yet, only provided a method to so in PR #457. There is also the Futures channel, which I want to implement too. @atiqkhan26 @badgerwithagun

mdvx commented 4 years ago

Just rememebered, with Kraken the Api keys can get broken after which I get continual Invalid nonce errors. My solution is to create a new API key.

Speculation: I think maybe the server remembers the last nonce across sessions, and if you sent a big one up, you just set a high water mark.

mdvx commented 4 years ago

I stopped getting invalid nonces errors, after I got multiple keys for multiple processes - now dev has a key, QA has one as does UAT

mdvx commented 4 years ago

can we close this @atiqkhan26 @badgerwithagun