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 errors #186

Closed nikolayromenskiy closed 4 months ago

nikolayromenskiy commented 4 months ago

2024-04-27 16:38:40,423 - websocket - INFO - Websocket connected 2024-04-27 16:38:40,424 - api.bybit.pybit._websocket_stream - INFO - WebSocket Unified V5 connected 2024-04-27 16:38:40,428 - api.bybit.ws - INFO - ws subscription - orderbook_stream - category - spot - symbol - ('BTCUSDT', 'spot', 'Bybit') 2024-04-27 16:38:40,428 - api.bybit.ws - INFO - ws subscription - ticker_stream - category - spot - symbol - ('BTCUSDT', 'spot', 'Bybit') 2024-04-27 16:38:40,429 - api.bybit.ws - INFO - ws subscription - orderbook_stream - category - spot - symbol - ('ETHUSDT', 'spot', 'Bybit') 2024-04-27 16:38:40,429 - api.bybit.ws - INFO - ws subscription - ticker_stream - category - spot - symbol - ('ETHUSDT', 'spot', 'Bybit') 2024-04-27 16:38:40,429 - api.bybit.pybit._websocket_stream - INFO - WebSocket Unified V5 (Auth) attempting connection... 2024-04-27 16:38:41,439 - websocket - INFO - Websocket connected 2024-04-27 16:38:41,439 - api.bybit.pybit._websocket_stream - INFO - WebSocket Unified V5 (Auth) connected 2024-04-27 16:38:41,442 - api.bybit.agent - INFO - In get_user - sending get_uid_wallet_type() 2024-04-27 16:38:41,659 - websocket - ERROR - error from callback <function _WebSocketManager._connect.. at 0x731e001d8940>: Authorization for Unified V5 (Auth) failed. Please check your API keys and resync your system time. Raw error: {'success': False, 'ret_msg': 'Params Error', 'op': 'auth', 'conn_id': 'cno3gd1qo29t7ommtc60-1hnn3'} 2024-04-27 16:38:41,667 - api.bybit.agent - INFO - In get_wallet_balance - sending get_wallet_balance() - accountType - UNIFIED 2024-04-27 16:38:41,878 - websocket - ERROR - error from callback <function _WebSocketManager._connect.. at 0x731e001d8700>: Authorization for Unified V5 (Auth) failed. Please check your API keys and resync your system time. Raw error: {'success': False, 'ret_msg': 'Params Error', 'op': 'auth', 'conn_id': 'cno3gd1qo29t7ommtc60-1hnn3'} 2024-04-27 16:38:41,878 - websocket - INFO - tearing down on exception Authorization for Unified V5 (Auth) failed. Please check your API keys and resync your system time. Raw error: {'success': False, 'ret_msg': 'Params Error', 'op': 'auth', 'conn_id': 'cno3gd1qo29t7ommtc60-1hnn3'} 2024-04-27 16:38:41,892 - api.bybit.agent - INFO - In get_wallet_balance - sending get_wallet_balance() - accountType - CONTRACT __websocket is already closed 2024-04-27 16:38:42,121 - api.bybit.agent - INFO - In get_position_info - sending get_positions() - category - linear - settlCurrency - USDT 2024-04-27 16:38:42,735 - api.bybit.agent - INFO - In get_position_info - sending get_positions() - category - inverse - settlCurrency - BTC __websocket is already closed 2024-04-27 16:38:43,019 - api.bybit.agent - INFO - In trading_history - sending get_executions() - category - spot - startTime - 2024-04-27 04:54:03+00:00 2024-04-27 16:38:43,658 - api.bybit.agent - INFO - In trading_history - sending get_executions() - category - inverse - startTime - 2024-04-27 04:54:03+00:00 __websocket is already closed 2024-04-27 16:38:43,883 - api.bybit.agent - INFO - In trading_history - sending get_executions() - category - option - startTime - 2024-04-27 04:54:03+00:00 2024-04-27 16:38:44,108 - api.bybit.agent - INFO - In trading_history - sending get_executions() - category - linear - startTime - 2024-04-27 04:54:03+00:00 2024-04-27 16:38:44,337 - api.bybit.agent - INFO - In trading_history - sending get_executions() - category - linear - startTime - 2024-04-27 04:54:03+00:00 __websocket is already closed Bybit - loading trading history, startTime=2024-04-27 04:54:03+00:00, received: 1 records. 2024-04-27 16:38:44,741 - api.bybit.agent - INFO - In trading_history - sending open_orders() - parameters - {'openOnly': 0, 'limit': 50, 'category': 'spot', 'cursor': 'no'} 2024-04-27 16:38:45,388 - api.bybit.agent - INFO - In trading_history - sending open_orders() - parameters - {'openOnly': 0, 'limit': 50, 'category': 'inverse', 'settleCoin': 'BTC', 'cursor': 'no'} 2024-04-27 16:38:45,612 - api.bybit.agent - INFO - In trading_history - sending open_orders() - parameters - {'openOnly': 0, 'limit': 50, 'category': 'linear', 'settleCoin': 'USDT', 'cursor': 'no'} 2024-04-27 16:38:45,837 - api.bybit.agent - INFO - In trading_history - sending open_orders() - parameters - {'openOnly': 0, 'limit': 50, 'category': 'linear', 'settleCoin': 'USDT', 'cursor': '7364f459-f7f9-40c3-b98d-50be5b6bfab8%3A1714224803075%2C7364f459-f7f9-40c3-b98d-50be5b6bfab8%3A1714224803075'} __websocket is already closed

evgrmn commented 4 months ago

2024-04-27 16:38:41,659 - websocket - ERROR - error from callback <function _WebSocketManager._connect.. at 0x731e001d8940>: Authorization for Unified V5 (Auth) failed. Please check your API keys and resync your system time. Raw error: {'success': False, 'ret_msg': 'Params Error', 'op': 'auth', 'conn_id':

This error is likely due to a slow Internet connection or incorrect system time on your computer. When the API is authenticated, it sends the current timestamp to the Bybit server. If there is a time lag between the creation of the timestamp and the server receiving it, the server refuses authentication.

The problem with tmatic is to catch this error and then reload.