ExodusMovement/cryptocompare

Will it support Web Socket?

ProgrammingLife opened this issue · 4 comments

Will it support subs via web sockets? We are really need it :)

01dr commented

@ProgrammingLife Hi! Looks like this wrapper doesn't support WS.
You may use WS API directly. Check docs https://www.cryptocompare.com/api/#-api-web-socket-

Amazing-Space-Invader, I've just tried this example: https://github.com/cryptoqween/cryptoqween.github.io/blob/master/streamer/current/index.html
I don't know what a work it do but this code:

	var subscription = [ "2~BitTrex~BTC~USD", "2~Bittrex~ETH~USD", "2~Poloniex~BTC~USD" ];
	socket.emit("SubAdd", { subs: subscription });
	socket.on("m", function(message) {
		console.log( message );
	});

returns me very old ticks from those exchanges (latency is about 30secs-2mins). It doesn't work for getting current ticks.

01dr commented

@ProgrammingLife, I do not have much time to research this issue in more detail, but perhaps the delay is connected with updating the database of the service.

It is better to create a topic on a stackoverflow or here coz ur question concerns the api itself, and not this wrapper.

Good luck

Closing as per @Amazing-Space-Invader