Hello,
when the bot is left running for some time very often an error is received deep into python request libraries:
Traceback (most recent call last):
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 323, in
orders, last_price, volume = buy()
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 190, in buy
volume, last_price = convert_volume()
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 154, in convert_volume
volatile_coins, number_of_coins, last_price = wait_for_price()
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 132, in wait_for_price
last_price = get_price()
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 107, in get_price
prices = client.get_all_tickers()
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 568, in get_all_tickers
return self._get('ticker/price', version=self.PRIVATE_API_VERSION)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 365, in _get
return self._request_api('get', path, signed, version, **kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 328, in _request_api
return self._request(method, uri, signed, **kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\binance\client.py", line 308, in _request
self.response = getattr(self.session, method)(uri, **kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Evgeni\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
In such occasions the bot must be manually started again. Perhaps there can be a try/catch or something smarter to handle it :)