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 while authorization on Bybit #153

Closed nikolayromenskiy closed 4 months ago

nikolayromenskiy commented 4 months ago

2024-04-19 07:08:52,084 - api.bybit.pybit._websocket_stream - INFO - WebSocket Unified V5 (Auth) attempting connection... 2024-04-19 07:08:52,737 - websocket - INFO - Websocket connected 2024-04-19 07:08:52,738 - api.bybit.pybit._websocket_stream - INFO - WebSocket Unified V5 (Auth) connected _get_user 2024-04-19 07:08:52,927 - websocket - ERROR - error from callback <function _WebSocketManager._connect.. at 0x73ccb5f7beb0>: 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', 'connid': 'cno3gd1qo29t7ommtc60-18fpo'} wallet_balance 2024-04-19 07:08:53,117 - websocket - ERROR - error from callback <function _WebSocketManager._connect.. at 0x73ccb54740d0>: 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-18fpo'} 2024-04-19 07:08:53,117 - 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-18fpo'}

evgrmn commented 4 months ago

Probably local computer's system time incorrect or there may be a delay when connecting to Bybit. I think the API uses system time when authorization. So, when your computer gets the system time, then it tries to send the time to Bybit, but there is a gap caused bad internet connection or other reason. The Bybit server considers the request stale and rejects it. First check your internet connection.