Closed Shimoli closed 3 years ago
Hi! I'm unable to replicate this issue. Appears to be an issue with ccxt at first glance.
Try updating your ccxt package to the latest version: https://pypi.org/project/ccxt/
The requirements.txt
file does not have version specification for packages, and the bot has been known to act up with older versions of it. Sometimes your env may install a lower package for compatibility, although I'm unsure of your environment.
If you have any steps to replicate let me know! It may also be helpful to include dependency package versions for what you're using, if you know how to do this.
No response, bug is not fatal, unable to replicate, ccxt versioning issue. Closing!
key': 'a331d60fe8e76f39d957d74d083b4191f61e7817c5b0ab25d1d89cc3ccc8cbb0', 'leverage': 19.0, 'logging_level': 0, 'market_stop_loss': False, 'max_markup': 0.01135, 'min_close_qty_multiplier': 0.15, 'min_markup': 0.00066, 'n_close_orders': 18.0, 'n_entry_orders': 8, 'stop_loss_liq_diff': 0.07, 'stop_loss_pos_price_diff': 0.9, 'stop_loss_pos_reduction': 0.01, 'symbol': 'BTCUSD'} 2021-03-17T19:30:44 wss://stream.bybit.com/realtime 2021-03-17T19:30:45 fetched trades BTCUSD 264746304 2021-03-17T16:30:44.566000 2021-03-17T19:30:51 fetched trades BTCUSD 264745304 2021-03-17T16:28:54.416000 Traceback (most recent call last): File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 121, in fetch http_response = await response.text() File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1076, in text await self.read() File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1032, in read self._body = await self.content.read() File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/streams.py", line 370, in read block = await self.readany() File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/streams.py", line 392, in readany await self._wait("readany") File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/streams.py", line 306, in _wait await waiter File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in exit raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "bybit.py", line 305, in
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "bybit.py", line 301, in main
await start_bot(bot)
File "/home/hotpoint/Bybit_bot/Passiv-X-main/Passiv-25/passivbot.py", line 955, in start_bot
await bot.start_websocket()
File "bybit.py", line 256, in start_websocket
await self.init_indicators()
File "/home/hotpoint/Bybit_bot/Passiv-X-main/Passiv-25/passivbot.py", line 865, in init_indicators
ticks = await self.fetch_ticks()
File "/home/hotpoint/Bybit_bot/Passiv-X-main/Passiv-25/passivbot.py", line 853, in fetch_ticks
additional_ticks = await asyncio.gather(
File "bybit.py", line 244, in fetch_trades
return await fetch_trades(self.cc, self.symbol, from_id)
File "bybit.py", line 85, in fetch_trades
fetched_trades = await cc.v2_public_get_trading_records(params=params)
File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 95, in fetch2
return await self.fetch(request['url'], request['method'], request['headers'], request['body'])
File "/home/hotpoint/Bybit_bot/env/lib/python3.8/site-packages/ccxt/async_support/base/exchange.py", line 143, in fetch
raise RequestTimeout(details) from e
ccxt.base.errors.RequestTimeout: bybit GET https://api.bybit.com/v2/public/trading-records?symbol=BTCUSD&limit=1000&from=264720304
bybit requires to release all resources with an explicit call to the .close() coroutine. If you are using the exchange instance with async coroutines, add exchange.close() to your code into a place when you're done with the exchange and don't need the exchange instance anymore (at the end of your async coroutine).
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7efdcc672b20>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7efdcc6a1d60>, 3587.278847999)]']
connector: <aiohttp.connector.TCPConnector object at 0x7efdcc6c6a60>
Bot stopped, attempting to restart in 13 seconds^C