DeviaVir / zenbot

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

Bitfinex issue #1777

Open leozzo opened 5 years ago

leozzo commented 5 years ago

System information

Describe the problem

The zenbot doesn't work anymore with Bitfinex since October 2018+ version. Since API 2.0 was implemented (in the zenbot) it doesnt work anymore, give tons of errors. Please can you fix it? Thank you

felpasl commented 5 years ago

same here, for last version, --paper works, but not able to get balance to start real trade

Luehrsen commented 4 years ago

I have spent some time debugging this. This is what I've found so far:


https://github.com/DeviaVir/zenbot/blob/6e855d06099962f90fabfbf1193385e43de307f9/extensions/exchanges/bitfinex/exchange.js#L165

The if-statement above is never false, therefore the ws.open() is never called. ws_connecting is set to true here, but the whole variable does not make much sense to me.

https://github.com/DeviaVir/zenbot/blob/6e855d06099962f90fabfbf1193385e43de307f9/extensions/exchanges/bitfinex/exchange.js#L222


https://github.com/DeviaVir/zenbot/blob/6e855d06099962f90fabfbf1193385e43de307f9/extensions/exchanges/bitfinex/exchange.js#L235

The ws and wu events are never fired. (But they do arrive on the message event.)


So I believe that v2.0 is less compatible with v1.x than the Bitfinex repo states. So we either have to rewrite the exchange.js or downgrade to v1.2.1.

anon1335 commented 4 years ago

Hi, thanks for exploring this @Luehrsen , is there any simple way to downgrade to v1.2.1?