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

Cannot read property 'status' of undefined error while trading on Bitfinex #498

Open tjoin opened 7 years ago

tjoin commented 7 years ago

Hi, i got exception after ~24 hours of uinterruptable work I use slightly modified exchange.js https://github.com/carlos8f/zenbot/pull/491 which solve https://github.com/carlos8f/zenbot/issues/480

Here is stack trace (line numbers may be a little bit different) /bitfinex/exchange.js:490 if (order.status === 'rejected' && order.reject_reason === 'post only') { ^ TypeError: Cannot read property 'status' of undefined at Object.getOrder (/home/vad/zenbot/extensions/exchanges/bitfinex/exchange.js:490:16) at Timeout.checkOrder (/home/vad/zenbot/lib/engine.js:281:24) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

https://github.com/crubb/zenbot/blob/c53cfdf2cce1a7bab9fa0969f571923ce09148e5/extensions/exchanges/bitfinex/exchange.js#L469

Maybe it could be solved by adding extra check whether order is undefined?

crubb commented 7 years ago

Is this still occuring after the latest updates with an unmodified exchanges.js?

Froelund commented 7 years ago

I just had the same issue today. I updated to latest version of master two days ago.

nedievas commented 6 years ago

It is recurring. Need retry getOrder on this error.

jackynguyen93 commented 6 years ago

I also get this error after run stable few days

darland commented 6 years ago

I got the same error.

LoneWolf345 commented 6 years ago

Are you still experiencing this problem? If not, consider closing this.