cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
199 stars 78 forks source link

Not enough COIN error when transferring between exchanges #34

Open Scorpic1 opened 6 years ago

Scorpic1 commented 6 years ago

With pl-rewrite branch still have problem with re-balance coins to exchange like in #11 SC coin. Now bot make transfer all coin SYS to other exchange. I did not know why bot did it.

I noticed this only after an error below:

21:13:24: Calculated P&L: -0.00000028
21:13:25: Transfering 23.54035660 SYS POLONIEX => BITTREX
21:13:25: Deposit address: SUz8D2kpDBYgY9xBGDZ2UbQUYFFWEBQErt
21:13:25: Error during main loop: [POLONIEX] API error response: Not enough SYS.
#0 /var/www/arbitrage-bot/bot/xchange/Poloniex.php(521): Poloniex->queryAPI()
#1 /var/www/arbitrage-bot/bot/xchange/Poloniex.php(64): Poloniex->queryWithdraw()
#2 /var/www/arbitrage-bot/bot/CoinManager.php(760): Poloniex->withdraw()
#3 /var/www/arbitrage-bot/bot/Arbitrator.php(387): CoinManager->withdraw()
#4 /var/www/arbitrage-bot/bot/Arbitrator.php(203): Arbitrator->trade()
#5 /var/www/arbitrage-bot/bot/Arbitrator.php(152): Arbitrator->checkAndTrade()
#6 /var/www/arbitrage-bot/bot/Arbitrator.php(142): Arbitrator->testOrderbooks()
#7 /var/www/arbitrage-bot/bot/Arbitrator.php(108): Arbitrator->checkPairAt()
#8 /var/www/arbitrage-bot/bot/Arbitrator.php(86): Arbitrator->checkOpportunitiesAt()
#9 /var/www/arbitrage-bot/bot/Arbitrator.php(55): Arbitrator->checkOpportunities()
#10 /var/www/arbitrage-bot/bot/Arbitrator.php(472): Arbitrator->loop()
#11 /var/www/arbitrage-bot/main.php(112): Arbitrator->run()
#12 {main}
21:13:26: Refreshing wallets...

Maybe problem in logic re-balance bot. Maybe problem in logic re-balance bot.

Why get this is error? 21:13:25: Error during main loop: [POLONIEX] API error response: Not enough SYS.

cryptoeax commented 6 years ago

The actual problem here isn't fixed at all. I'm going to delete the off-topic comments to make things clearer.

cryptoeax commented 6 years ago

I suspect #39 may be the underlying bug that causes some of these errors to occur...