cryptoeax / arbbot

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

Binance Branch: Invalid Orderbook after Trades #159

Open gthom9 opened 6 years ago

gthom9 commented 6 years ago

After each Binance trade I begin to receive the error below in the log files when looking for profitable trades. Also, the exchange balances seem to get disconnected from the web UI.

Received invalid orderbook from target exchange. Skipping...

The temporary fix is to restart the main.php and allow it to reconnect to Binance. Please let me know if there is any other information that would be useful.

gthom9 commented 6 years ago

A little more information to add. It appears that the Bot is not reading transaction balances after making a trade on Binance and these trades correspond to the Bot breaking as described above. See trade history below..

screen shot 2018-02-12 at 8 17 41 pm
gthom9 commented 6 years ago

Here is the error spit out immediately after the Bot breaks.

screen shot 2018-02-12 at 8 46 50 pm
ak9250 commented 6 years ago

@cryptoeax any idea what could be causing this issue?

prusso commented 6 years ago

I have been getting this error fairly frequently:

23:28:22: Checking XLM_BTC at BITTREX -> BINANCE... 23:28:27: Error during main loop: binance fetchDepositAddress failed => {"msg":"{\"code\":-1021,\"msg\":\"Timestamp for this request is outside of the recvWindow.\"}","success":false}

0 /var/www/html/arbbot/bot/CCXTAdapter.php(160): ccxt\binance->fetch_deposit_address()

1 /var/www/html/arbbot/bot/Arbitrator.php(217): CCXTAdapter->getDepositAddress()

2 /var/www/html/arbbot/bot/Arbitrator.php(202): Arbitrator->checkAndTrade()

3 /var/www/html/arbbot/bot/Arbitrator.php(188): Arbitrator->testOrderbooks()

4 /var/www/html/arbbot/bot/Arbitrator.php(116): Arbitrator->checkPairAt()

5 /var/www/html/arbbot/bot/Arbitrator.php(92): Arbitrator->checkOpportunitiesAt()

6 /var/www/html/arbbot/bot/Arbitrator.php(59): Arbitrator->checkOpportunities()

7 /var/www/html/arbbot/bot/Arbitrator.php(747): Arbitrator->loop()

8 /var/www/html/arbbot/bot/Arbitrator.php(22): Arbitrator->innerRun()

9 (): Closure$Arbitrator::__construct()

10 /var/www/html/arbbot/lib/composer/vendor/react/event-loop/src/Timer/Timers.php(90): call_user_func()

11 /var/www/html/arbbot/lib/composer/vendor/react/event-loop/src/StreamSelectLoop.php(177): React\EventLoop\Timer\Timers->tick()

12 /var/www/html/arbbot/bot/Arbitrator.php(740): React\EventLoop\StreamSelectLoop->run()

13 /var/www/html/arbbot/main.php(177): Arbitrator->run()

14 {main}

And I've also noticed that my reported balances appear to be off (possibly/probably because of this issue?). For example: if I manually add up all of my BTC and the value of all my altcoins (in BTC) across all of the exchanges, it comes out to be about 0.0010638 BTC less than what Unrealized P&L reports is should be.

@cryptoeax any insight? thanks.

igladun commented 6 years ago

@gthom9 did you resolve this issue? I have the same issue, with the same coin (VIA)

gthom9 commented 6 years ago

@igladun no resolution yet. I will start looking further into a solution in the near future.

crypto-maniac commented 6 years ago

hello , any update on this fix please? thanks you very much