DeviaVir / zenbot

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

Cannot read property 'toString' of undefined #90

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello, I'm am constantly getting the following errors after invoking ./run.sh:

master ~/Development/gitClones/zenbot> ./run.sh
12/28/2016 08:35:59 AM  [    launcher] cmd `launch` booting
12/28/2016 08:36:01 AM  [    launcher] cmd `map` booting
12/28/2016 08:36:01 AM  [    launcher] cmd `run` booting
12/28/2016 08:36:01 AM  [      runner] starting
12/28/2016 08:36:01 AM  [    launcher] cmd `reduce` booting
12/28/2016 08:36:01 AM  [    launcher] cmd `server` booting
12/28/2016 08:36:01 AM  [      server] zenbot/3.5.16 booted!
12/28/2016 08:36:01 AM  [      server] open http://localhost:3013/?secret=34f15d78a8f88e90 to see a live graph.
12/28/2016 08:36:01 AM  [        gdax]    m24715655     100 trades. 12/28/2016 08:35:50 AM  SELL        21.710 at       $965.01 BTC/USD
(node:31590) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
12/28/2016 08:36:21 AM  [        gdax]    m24715656      22 trades. 12/28/2016 08:36:20 AM  SELL        82.198 at       $962.01 BTC/USD
12/28/2016 08:36:42 AM  [        gdax]    m24715656      70 trades. 12/28/2016 08:36:31 AM  SELL        16.986 at       $957.90 BTC/USD
{ message: 'Forbidden' }
12/28/2016 08:37:01 AM  [ERROR] non-200 status from exchange: 403
/home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1111
        var parts = x.toString().split('.');
                     ^

TypeError: Cannot read property 'toString' of undefined
    at multiplier (/home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1111:22)
    at /home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1127:22
    at Array.reduce (native)
    at correctionFactor (/home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1125:21)
    at cback (/home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1230:34)
    at Array.reduce (native)
    at Numbro.divide (/home/$USER/Development/gitClones/zenbot/node_modules/numbro/numbro.js:1233:48)
    at /home/$USER/Development/gitClones/zenbot/default_logic.js:165:43
    at Immediate.doNext (/home/$USER/Development/gitClones/zenbot/node_modules/zenbrain/utils/apply_funcs.js:10:12)
    at runCallback (timers.js:651:20)

Am I missing anything? I followed the installation steps from the README.

ghost commented 7 years ago

Okay this was user error... I blindly added my gdax API credentials without bothering to add any permissions to those credentials. It seems to be working now. test post, please ignore.

blakem17 commented 7 years ago

What were permissions that you set?