DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.23k stars 2.04k forks source link

Bitfinex is very unstable after switch to use Websocket #495

Closed phongtt3 closed 7 years ago

phongtt3 commented 7 years ago

WebSockets Warning: Authentication FAILED (Reason: "apikey: invalid"). Retrying in 300 seconds. Either your API key is invalid or you tried reconnecting to quickly. Wait and/or check your API keys.

I tried with 2 difference key, the bot is running well in 30 min, and then this error always occur

cirrusdex commented 7 years ago

Bitfinex just crashed WebSockets Error: Connection closed. Retrying every 10 seconds. Then reconnected. Then crashed permanently:

WebSockets Warning: No message on channel 'trade' within 60 seconds, reconnecting...

WebSockets Error: Connection closed. Retrying every 10 seconds. /zenbot/node_modules/ws/lib/WebSocket.js:355 else throw new Error('not opened'); ^

Error: not opened at WebSocket.send (/zenbot/node_modules/ws/lib/WebSocket.js:355:18) at BitfinexWS2.send (/zenbot/node_modules/bitfinex-api-node/ws2.js:190:13) at BitfinexWS2.auth (/zenbot/node_modules/bitfinex-api-node/ws2.js:247:10) at Timeout._onTimeout (/zenbot/extensions/exchanges/bitfinex/exchange.js:184:19) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5)`

phongtt3 commented 7 years ago

pls, revert to normal REST api, we can't run unstable bot

crubb commented 7 years ago

Please test #491, these issues should be fixed.

cirrusdex commented 7 years ago

recommend this issue be closed

phongtt3 commented 7 years ago

is there any commit to pull? i see no change and last commit was 4 days ago

sniper7kills commented 7 years ago

@phongtt3 there is a pull request #491 while it hasn't been merged to the master branch yet it looks like those who tested had success.

phongtt3 commented 7 years ago

Pls merge this PR because i can't check out

androng commented 7 years ago

This is still happening. How do we handle broken connections?

nedievas commented 7 years ago

No it's not. I don't see any brake: capture

crubb commented 7 years ago

@androng Please show the exact error message and please make sure you have the very latest master!

androng commented 7 years ago

I apologize, I meant to put this issue in the bitfinex-api-node library. Zenbot seems to have it covered.