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

Proposal: Handle FetchError #347

Open
bennycode opened this issue Feb 19, 2021 · 3 comments
Open

Proposal: Handle FetchError #347

bennycode opened this issue Feb 19, 2021 · 3 comments

Comments

@bennycode
Copy link
Contributor

Recently my application stopped working because the Binance API was under stress and failed to respond in time. Because of this "binance-api-node" failed with the following error:

FetchError: request to https://api.binance.com/api/v3/klines?interval=1m&endTime=1613606340000&limit=1000&startTime=1613001600000&symbol=BTCUSDT failed, reason: connect ETIMEDOUT 52.84.150.39:443 at ClientRequest. (/home/runner/work/lambot-1/lambot-1/node_modules/node-fetch/index.js:133:11)

It would be nice if we could add a retry mechanism. In my own projects (like coinbase-pro-node), I am using axios-retry which works very well. I think there is something similar for isomorphic-fetch. What's your thought on that, @balthazar?

@balthazar
Copy link
Member

Yeah definitely could have that feature in considering the recent surge on Binance servers

@hp8wvvvgnj6asjm7
Copy link
Contributor

Thinking about adding a websocket status checker too.

@bennycode
Copy link
Contributor Author

@hp8wvvvgnj6asjm7 the "binance-api-node" already uses the reconnecting-websocket package, so what would you like to add to check the WebSocket connection?

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

No branches or pull requests

3 participants