jazzonaut / IntelliTrader

Intelligent Cryptocurrency Trading Bot

Home Page:http://intellitrader.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when Binance is down

Rob-bb opened this issue · comments

commented

Hi, I am getting this error tonight while Binnace is in maintenance mod.

/opt/it/bot1/Publish$ ./IntelliTrader.sh
Welcome to IntelliTrader, The Intelligent Cryptocurrency Trading Bot.
Always use Enter/Return key to exit the program to avoid corrupting the data.
19:57:40 [INF] Start Core service (Version: 0.9.9.9)...
19:57:40 [INF] Start Health Check service...
19:57:40 [INF] Health Check service started
19:57:40 [INF] Start Trading service (Virtual: True)...
19:57:40 [INF] Start Binance Exchange service...
19:57:40 [INF] Get initial ticker values...
19:57:41 [ERR] Unhandled exception occured - ExchangeSharp.APIException: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>

   at ExchangeSharp.APIRequestMaker.MakeRequestAsync(String url, String baseUrl, Dictionary`2 payload, String method) in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/APIRequestMaker.cs:line 130
   at ExchangeSharp.BaseAPI.MakeJsonRequestAsync[T](String url, String baseUrl, Dictionary`2 payload, String requestMethod) in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/BaseAPI.cs:line 388
   at ExchangeSharp.ExchangeBinanceAPI.OnGetTickersAsync() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeBinanceAPI.cs:line 264
   at ExchangeSharp.ExchangeAPI.GetTickersAsync() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeAPI.cs:line 689
   at ExchangeSharp.ExchangeAPI.GetTickers() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeAPI.cs:line 680
   at IntelliTrader.Exchange.Binance.BinanceExchangeService.Start(Boolean virtualTrading) in /opt/it/bot1/IntelliTrader.Exchange.Binance/Services/BinanceExchangeService.cs:line 50
   at IntelliTrader.Trading.TradingService.Start() in /opt/it/bot1/IntelliTrader.Trading/Services/TradingService.cs:line 74
   at IntelliTrader.Core.CoreService.Start() in /opt/it/bot1/IntelliTrader.Core/Services/CoreService.cs:line 68
   at IntelliTrader.Program.StartCoreService() in /opt/it/bot1/IntelliTrader/Program.cs:line 37
   at IntelliTrader.Program.Main(String[] args) in /opt/it/bot1/IntelliTrader/Program.cs:line 31

Unhandled Exception: ExchangeSharp.APIException: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>

   at ExchangeSharp.APIRequestMaker.MakeRequestAsync(String url, String baseUrl, Dictionary`2 payload, String method) in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/APIRequestMaker.cs:line 130
   at ExchangeSharp.BaseAPI.MakeJsonRequestAsync[T](String url, String baseUrl, Dictionary`2 payload, String requestMethod) in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/BaseAPI.cs:line 388
   at ExchangeSharp.ExchangeBinanceAPI.OnGetTickersAsync() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeBinanceAPI.cs:line 264
   at ExchangeSharp.ExchangeAPI.GetTickersAsync() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeAPI.cs:line 689
   at ExchangeSharp.ExchangeAPI.GetTickers() in /opt/it/bot1/Submodules/ExchangeSharp/ExchangeSharp/API/Exchanges/ExchangeAPI.cs:line 680
   at IntelliTrader.Exchange.Binance.BinanceExchangeService.Start(Boolean virtualTrading) in /opt/it/bot1/IntelliTrader.Exchange.Binance/Services/BinanceExchangeService.cs:line 50
   at IntelliTrader.Trading.TradingService.Start() in /opt/it/bot1/IntelliTrader.Trading/Services/TradingService.cs:line 74
   at IntelliTrader.Core.CoreService.Start() in /opt/it/bot1/IntelliTrader.Core/Services/CoreService.cs:line 68
   at IntelliTrader.Program.StartCoreService() in /opt/it/bot1/IntelliTrader/Program.cs:line 37
   at IntelliTrader.Program.Main(String[] args) in /opt/it/bot1/IntelliTrader/Program.cs:line 31
./IntelliTrader.sh: line 4: 16160 Aborted                 (core dumped) /usr/share/dotnet/dotnet /opt/it/bot1/Publish/bin/IntelliTrader.dll
./IntelliTrader.sh: line 5: syntax error near unexpected token `0'
./IntelliTrader.sh: line 5: `exit(0)'

commented

It's only crashing when you start the bot and Binance is down, which is working as intended. If the bot is already running and Binance API goes down, the bot will continue running.

commented

Actually that is the restart correct, but I restarted as I was getting a bad gateway on the web interface, so it appeared to have crashed