askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.07k stars 3.94k forks source link

POLONIEX TRADER: TypeError: Cannot read property 'amount' of undefined #481

Closed Stoner19 closed 8 years ago

Stoner19 commented 8 years ago
2016-10-14 06:12:15 (INFO):     We have new trading advice!
2016-10-14 06:12:15 (INFO):              Position: long
2016-10-14 06:12:15 (INFO):              Market price: 0.00918998
2016-10-14 06:12:15 (INFO):              Based on market time: 2016-10-14 12:10:00

2016-10-14 06:12:15 (INFO):     (PROFIT REPORT) original simulated balance:      0.05992 BTC
2016-10-14 06:12:15 (INFO):     (PROFIT REPORT) current simulated balance:       0.06177 BTC
2016-10-14 06:12:15 (INFO):     (PROFIT REPORT) simulated profit:                0.00185 BTC (3.08102%)
/home/user/gekko/plugins/trader/portfolioManager.js:110
  return this.getFund(fund).amount;
                           ^

TypeError: Cannot read property 'amount' of undefined
    at Manager.getBalance (/home/user/gekko/plugins/trader/portfolioManager.js:110:28)
    at Manager.bound [as getBalance] (/home/user/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Manager.act (/home/user/gekko/plugins/trader/portfolioManager.js:138:23)
    at bound (/home/user/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at /home/user/gekko/node_modules/async/lib/async.js:232:13
    at /home/user/gekko/node_modules/async/lib/async.js:142:25
    at /home/user/gekko/node_modules/async/lib/async.js:229:17
    at /home/user/gekko/node_modules/async/lib/async.js:556:34
    at Manager.<anonymous> (/home/user/gekko/plugins/trader/portfolioManager.js:76:7)
    at Trader.<anonymous> (/home/user/gekko/exchanges/poloniex.js:67:5)
askmike commented 8 years ago

I updated the way Poloniex portfolio is set, I think this shouldn't happen anymore..

askmike commented 8 years ago

I am assuming this if fixed now (since d7eb86b80a1). If it's not, please re open!