crypto-ws-api 2.0.18__tar.gz → 2.0.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ ## 2.0.19 - 2025-03-28
2
+ ### Fix
3
+ * `ws_session.ws_login`: Incorrect exit from authentication procedure in case of unsuccessful attempt
4
+
1
5
  ## 2.0.18 - 2025-03-10
2
6
  ### Fix
3
7
  * [🔒] fix/ws_session.py: Proper restoration of WebSocket connection during recurring failures
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: crypto-ws-api
3
- Version: 2.0.18
3
+ Version: 2.0.19
4
4
  Summary: Crypto WS API connector for ASYNC requests
5
5
  Author-email: Jerry Fedorenko <jerry.fedorenko@yahoo.com>
6
6
  Requires-Python: >=3.8
@@ -14,7 +14,7 @@ Classifier: Operating System :: MacOS
14
14
  Requires-Dist: shortuuid~=1.0.13
15
15
  Requires-Dist: platformdirs==4.3.6
16
16
  Requires-Dist: toml~=0.10.2
17
- Requires-Dist: websockets==15.0
17
+ Requires-Dist: websockets==15.0.1
18
18
  Requires-Dist: ujson~=5.10.0
19
19
  Project-URL: Source, https://github.com/DogsTailFarmer/crypto-ws-api
20
20
 
@@ -13,7 +13,7 @@ __maintainer__ = "Jerry Fedorenko"
13
13
  __contact__ = "https://github.com/DogsTailFarmer"
14
14
  __email__ = "jerry.fedorenko@yahoo.com"
15
15
  __credits__ = ["https://github.com/DanyaSWorlD"]
16
- __version__ = "2.0.18"
16
+ __version__ = "2.0.19"
17
17
 
18
18
  from pathlib import Path
19
19
  import shutil
@@ -200,8 +200,7 @@ class UserWSS:
200
200
  res = await self.request(CONST_WS_START, send_api_key=True)
201
201
  if res is None:
202
202
  logger.warning(f"UserWSS: Not 'logged in' for {self.ws_id}")
203
- if self._ws:
204
- await self._ws.close(code=4000)
203
+ await self.stop()
205
204
  else:
206
205
  if self.exchange == 'binance':
207
206
  self._listen_key = res.get('listenKey')
@@ -553,6 +552,7 @@ class UserWSSession:
553
552
  while not (user_wss.operational_status and user_wss.order_handling):
554
553
  await asyncio.sleep(DELAY)
555
554
  if duration > TIMEOUT:
555
+ logger.warning(f"{trade_id}: Register timeout for method '{method}'")
556
556
  return None
557
557
  duration += DELAY
558
558
 
@@ -562,6 +562,7 @@ class UserWSSession:
562
562
  pass # Task cancellation should not be logged as an error
563
563
  except Exception as ex:
564
564
  logger.error(f"crypto_ws_api.ws_session.handle_request(): {ex}")
565
+ logger.warning(f"{trade_id}: {method}: None response")
565
566
  return None
566
567
 
567
568
  async def stop(self):
@@ -20,7 +20,7 @@ dependencies = [
20
20
  "shortuuid~=1.0.13",
21
21
  "platformdirs==4.3.6",
22
22
  "toml~=0.10.2",
23
- "websockets==15.0",
23
+ "websockets==15.0.1",
24
24
  "ujson~=5.10.0"
25
25
  ]
26
26
 
@@ -1,5 +1,5 @@
1
1
  shortuuid~=1.0.13
2
2
  platformdirs==4.3.6
3
3
  toml~=0.10.2
4
- websockets==15.0
4
+ websockets==15.0.1
5
5
  ujson~=5.10.0
File without changes