dparlevliet / node.bittrex.api

Node Bittrex API is an asynchronous node.js library for the Bittrex API, the data can be received either via GET request or Stream.
MIT License
253 stars 100 forks source link

is web sockets having troubles last few days? #156

Closed denigada closed 6 years ago

denigada commented 6 years ago

My apps connect to web sockets after like 30 minutes. They started usually not working. Is everyone having the same issue?

aloysius-pgast commented 6 years ago

Take a look at https://github.com/dparlevliet/node.bittrex.api/issues/153#comment-373899585 (comment). Adding extra headers to CloudScraper helped improve connection delay on my side.

denigada commented 6 years ago

@aloysius-pgast Oh I did not notice that post thank you. I looked in the code but couldnt understand adding the headers. I am not that experienced. Is there any chance you can break it down a little bit?

alexus2005 commented 6 years ago

Why is this closed? This is still an issue and there is no way to pass headers via options.

denigada commented 6 years ago

You need to add https://github.com/dparlevliet/node.bittrex.api/issues/153#comment-373899585 as a third argument in the cloudscraper.get function

alexus2005 commented 6 years ago

Thank you, but that's not a fix - that's a hack. What happens when a new version is out... it should be a parameter of some sort that we were able to pass. I did it and it worked, but I had to directly alter the code of the module which is never a good idea.