node.bittrex.api icon indicating copy to clipboard operation
node.bittrex.api copied to clipboard

listen() not working again

Open thechile opened this issue 7 years ago • 6 comments

Hi again

It seems #88 is back again :(

    wsclient.serviceHandlers.connected = function () {

        console.log('Bittrex Websocket connected !')

        bittrex.websockets.listen(function(data, client) {
            if (data.M === 'updateSummaryState') {
                data.A.forEach(function(data_for) {
                    data_for.Deltas.forEach(function(marketsDelta) {
                        console.log('Ticker Update for '+ marketsDelta.MarketName, marketsDelta)
                    })
                })
            }else{
                console.log(`data.M: ${data.M}`)
            }
        })
}

Just gives me

Bittrex Websocket connected !
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined
data.M: undefined

And if i try the previous fix i.e.

wsclient.call('CoreHub', 'querySummaryState').done(function (err, result) {

Then it only gives me back the summaries info but no socket feed.

Anyone else have this failure ?

thechile avatar Jan 28 '18 07:01 thechile

can you run the examples/bittrex.websockets.listen.example.js file?

dparlevliet avatar Jan 28 '18 15:01 dparlevliet

tried but doesn't work.. no data received. Only if i subscribe to individual coin pairs do i get anything. Seems the allTicker feed is broken or has been removed completely.

Anyone confirm ?

thechile avatar Jan 29 '18 02:01 thechile

I cannot confirm. I have bots running and receiving data fine and all of the examples work fine.

Can you double check to make sure you're a) running the right library (not the old one) and b) using the right version? That's really all I can offer you atm, sorry.

dparlevliet avatar Jan 29 '18 10:01 dparlevliet

ok thanks, very odd. I run the listen example and it connects but no data. npm version is latest and is correct version homepage: 'https://github.com/dparlevliet/node.bittrex.api',

thechile avatar Jan 29 '18 14:01 thechile

+1; 0.8.2 introduced a breaking change preventing the callback in websockets.listen from being fired.

nivonova avatar Feb 09 '18 03:02 nivonova

I think I was able to replicate this issue and I think I have resolved it in the next release. Not 100% sure, but I ran in to an issue while testing. Stay tuned then you can test again.

dparlevliet avatar Feb 17 '18 01:02 dparlevliet