Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnecting-websocket options not working? #635

Open
dasbts opened this issue Jun 30, 2023 · 1 comment
Open

Reconnecting-websocket options not working? #635

dasbts opened this issue Jun 30, 2023 · 1 comment

Comments

@dasbts
Copy link

dasbts commented Jun 30, 2023

Hi,

I'm having the same issue as all the closed reconnecting-websocket problems, and in #621 it was mentioned to pass options. I investigated and could not find any possible way to add options to miniticker. Is this something that can be looked into?

I checked at node_modules/binance-api-node/index.d.ts and (correct me if I'm wrong but) the code as far as I understand it takes a symbol pair, and then you choose where to get the callback to.

miniTicker: (
      pair: string | string[],
      callback: (ticker: MiniTicker) => void,
    ) => ReconnectingWebSocketHandler

If there is some way to add options such as connectionTimeout to the miniticker already that I don't know about?

@dasbts
Copy link
Author

dasbts commented Jan 4, 2024

Still wondering about this one, tried so many ways. Anyone know? @balthazar previously refered to using connectionTimeout but idk how to pass it in. Had half a year of disconnecting websockets. :(

For some context, I get same issue as this: #655

I have tried using the clean() approach, so I assign my ws to a variable[symbol] and then try to call variablesymbol to close it. I have investigated the index.ts and tried to make something to somehow override/input the options into the ReconnectingWebSocketHandler but really can't figure this out and it's making me mad.

Might make a try and remake the ws functionality this weekend, maybe that's the best approach, some custom library for just the websockets, and this library for the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant