evgrmn / tmatic

Tmatic is a cryptocurrency platform designed for automated trading on the Bitmex, Bybit and Deribit crypto exchanges.
https://www.tmatic.org
GNU General Public License v3.0
25 stars 6 forks source link

Some sporadic error while initial launching #334

Closed nikolayromenskiy closed 3 days ago

nikolayromenskiy commented 1 week ago

2024-09-12 05:41:01,138 - root - INFO -

hello

2024-09-12 05:41:01,699 - api.api - INFO - Bybit - Requesting all active instruments. 2024-09-12 05:41:01,699 - api.api - INFO - Deribit - Requesting all active instruments. 2024-09-12 05:41:01,700 - api.api - INFO - Bitmex - Requesting all active instruments. 2024-09-12 05:41:02,203 - api.api - INFO - Bitmex - Requesting open orders. 2024-09-12 05:41:02,302 - api.bitmex.ws - INFO - Connecting to websocket 2024-09-12 05:41:02,303 - api.bitmex.ws - INFO - Authenticating with API key. 2024-09-12 05:41:02,304 - api.api - INFO - Bitmex - Requesting user information. 2024-09-12 05:41:02,305 - api.api - INFO - Bitmex - Requesting account. 2024-09-12 05:41:02,313 - api.api - INFO - Bitmex - Requesting positions. 2024-09-12 05:41:02,357 - api.api - INFO - Deribit - Requesting open orders. 2024-09-12 05:41:02,409 - api.deribit.ws - INFO - Connecting to websocket 2024-09-12 05:41:02,410 - api.api - INFO - Deribit - Requesting user information. 2024-09-12 05:41:02,410 - api.api - INFO - Deribit - Requesting account. 2024-09-12 05:41:02,413 - api.api - INFO - Deribit - Requesting positions. 2024-09-12 05:41:02,458 - api.errors - WARNING - On request POST /api/v2/private/get_account_summaries - error - Deribit - HTTPError - Unexpected HTTPError invalid_credentials 2024-09-12 05:41:02,458 - api.deribit.agent - ERROR - A user ID was requested from the exchange but was not received. 2024-09-12 05:41:02,562 - websocket - INFO - Websocket connected 2024-09-12 05:41:02,601 - websocket - INFO - Websocket connected 2024-09-12 05:41:02,606 - api.bitmex.ws - INFO - ws subscribe - ['orderBook10:XBTUSDT', 'position:XBTUSDT', 'instrument:XBTUSDT', 'execution:XBTUSDT', 'margin:XBTUSDT'] 2024-09-12 05:41:02,609 - api.bitmex.ws - INFO - ws subscribe - ['orderBook10:XBTUSD', 'position:XBTUSD', 'instrument:XBTUSD', 'execution:XBTUSD', 'margin:XBTUSD'] 2024-09-12 05:41:02,609 - api.bitmex.ws - INFO - Connected to websocket. 2024-09-12 05:41:02,613 - api.deribit.ws - INFO - access_token received 2024-09-12 05:41:02,646 - api.api - INFO - Deribit - Requesting trading history - start_time=2024-09-11 08:00:00+00:00 Exception in thread Thread-22 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-23 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-26 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-25 (get_in_thread): self.run() Exception in thread Thread-28 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-29 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner File "/usr/lib/python3.10/threading.py", line 953, in run Traceback (most recent call last): self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request limit = account.limits AttributeError: 'Account' object has no attribute 'limits' Exception in thread Thread-24 (get_in_thread): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-27 (get_in_thread): Traceback (most recent call last): Exception in thread Thread-31 (get_in_thread): Exception in thread Thread-30 (get_in_thread): self._target(*self._args, *self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(self._args, self._kwargs) File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() limit = account.limits AttributeError: 'Account' object has no attribute 'limits' self._target(*self._args, *self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread self._target(self._args, self._kwargs) self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request limit = account.limits Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib/python3.10/threading.py", line 953, in run res = Agent.ws_request( File "/usr/lib/python3.10/threading.py", line 953, in run self.run() File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( AttributeError: 'Account' object has no attribute 'limits' self._target(self._args, self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread res = Agent.ws_request( File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request limit = account.limits File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread limit = account.limits self._target(*self._args, **self._kwargs) File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request File "/home/rmn/240911/api/deribit/agent.py", line 316, in get_in_thread AttributeError: 'Account' object has no attribute 'limits' File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request AttributeError: 'Account' object has no attribute 'limits' res = Agent.ws_request( limit = account.limits res = Agent.ws_request( res = Agent.ws_request( AttributeError: 'Account' object has no attribute 'limits' File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request limit = account.limits limit = account.limits File "/home/rmn/240911/api/deribit/agent.py", line 701, in ws_request limit = account.limits AttributeError: 'Account' object has no attribute 'limits' AttributeError: 'Account' object has no attribute 'limits' limit = account.limits AttributeError: 'Account' object has no attribute 'limits' AttributeError: 'Account' object has no attribute 'limits' 2024-09-12 05:41:02,673 - connect - ERROR - Deribit: The trade history is not loaded. 2024-09-12 05:41:02,715 - api.bitmex.ws - INFO - Data received. Continuing. 2024-09-12 05:41:02,718 - api.api - INFO - Bitmex - Requesting trading history - start_time=2024-09-12 04:00:00+00:00 2024-09-12 05:41:02,946 - api.api - INFO - Bybit - Requesting open orders. 2024-09-12 05:41:03,138 - api.errors - ERROR - On request GET get_open_orders - error - Bybit - FailedRequestError - 401 Invalid request. 1. Need to use the correct key to access; 2. Need to put authentication params in the request header - Bybit loading cancelled. 2024-09-12 05:41:03,138 - api.bybit.ws - INFO - Bybit - Websocket closed _query: select SYMBOL, TICKER, CATEGORY from coins where ACCOUNT=None and MARKET='Deribit' group by SYMBOL, CATEGORY 2024-09-12 05:41:03,139 - services - ERROR - Sqlite Error: no such column: None) 2024-09-12 05:41:03,139 - common.init - ERROR - SQL error in accountbalances() function query: select MARKET, SYMBOL, sum(QTY) as SUM_QTY, sum(SUMREAL) as SUM_SUMREAL from (select abs(QTY) as QTY, SUMREAL, MARKET, SYMBOL, SIDE, ACCOUNT from coins where SYMBOL = 'BTC-PERPETUAL') T where SIDE <> 'Fund' and MARKET = 'Deribit' and ACCOUNT = None group by SYMBOL, MARKET union select MARKET, SYMBOL, sum(QTY) as SUM_QTY, sum(SUMREAL) as SUM_SUMREAL from (select abs(QTY) as QTY, SUMREAL, MARKET, SYMBOL, SIDE, ACCOUNT from coins where SYMBOL = 'XBTUSDT' or SYMBOL = 'XBTUSD') T where SIDE <> 'Fund' and MARKET = 'Bitmex' and ACCOUNT = 296962 group by SYMBOL, MARKET; 2024-09-12 05:41:03,161 - services - ERROR - Sqlite Error: no such column: None) Traceback (most recent call last): File "/home/rmn/240911/main.py", line 7, in connect.setup() File "/home/rmn/240911/connect.py", line 57, in setup botinit.load_bots() File "/home/rmn/240911/botinit/init.py", line 112, in load_bots for value in data: TypeError: 'NoneType' object is not iterable

evgrmn commented 4 days ago

I have run the program 10 times in a row. No errors were found. Many improvements have been made in the last few days. Perhaps the problem has been solved.