exchanges-wrapper 2.1.37__tar.gz → 2.1.40__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.
Files changed (20) hide show
  1. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/PKG-INFO +3 -4
  2. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/README.md +0 -1
  3. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/__init__.py +1 -1
  4. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/client.py +2 -4
  5. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/events.py +2 -8
  6. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/exch_srv.py +1 -1
  7. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/pyproject.toml +2 -2
  8. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/LICENSE.md +0 -0
  9. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/definitions.py +0 -0
  10. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/errors.py +0 -0
  11. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/exch_srv_cfg.toml.template +0 -0
  12. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/http_client.py +0 -0
  13. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/lib.py +0 -0
  14. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/martin/__init__.py +0 -0
  15. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/parsers/bitfinex.py +0 -0
  16. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/parsers/bybit.py +0 -0
  17. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/parsers/huobi.py +0 -0
  18. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/parsers/okx.py +0 -0
  19. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/proto/martin.proto +0 -0
  20. {exchanges_wrapper-2.1.37 → exchanges_wrapper-2.1.40}/exchanges_wrapper/web_sockets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exchanges-wrapper
3
- Version: 2.1.37
3
+ Version: 2.1.40
4
4
  Summary: REST API and WebSocket asyncio wrapper with grpc powered multiplexer server
5
5
  Author-email: Thomas Marchand <thomas.marchand@tuta.io>, Jerry Fedorenko <jerry.fedorenko@yahoo.com>
6
6
  Requires-Python: >=3.10
@@ -15,10 +15,10 @@ License-File: LICENSE.md
15
15
  Requires-Dist: crypto-ws-api==2.0.20
16
16
  Requires-Dist: pyotp==2.9.0
17
17
  Requires-Dist: simplejson==3.20.1
18
- Requires-Dist: aiohttp~=3.11.18
18
+ Requires-Dist: aiohttp~=3.12.13
19
19
  Requires-Dist: expiringdict~=1.2.2
20
20
  Requires-Dist: betterproto==2.0.0b7
21
- Requires-Dist: grpclib~=0.4.7
21
+ Requires-Dist: grpclib~=0.4.8
22
22
  Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
23
23
 
24
24
  <h1 align="center"><img align="center" src="https://raw.githubusercontent.com/gist/DogsTailFarmer/167eaf65cebfe95d954082c7f181a2cc/raw/a67270de8663ad3de4733330ff64c9ba3153f87d/Logo%202v3.svg" width="75">Crypto exchanges API/WSS wrapper with grpc powered server</h1>
@@ -29,7 +29,6 @@ Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
29
29
 
30
30
  ***
31
31
  <a href="https://pypi.org/project/exchanges-wrapper/"><img src="https://img.shields.io/pypi/v/exchanges-wrapper" alt="PyPI version"></a>
32
- <a href="https://codeclimate.com/github/DogsTailFarmer/exchanges-wrapper/maintainability"><img src="https://api.codeclimate.com/v1/badges/f333ab9b1f3024699e09/maintainability" /></a>
33
32
  <a href="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper/?ref=repository-badge}" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper.svg/?label=resolved+issues&token=XuG5PmzMiKlDL921-qREIuX_"/></a>
34
33
  <a href="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper/?ref=repository-badge}" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper.svg/?label=active+issues&token=XuG5PmzMiKlDL921-qREIuX_"/></a>
35
34
  <a href="https://sonarcloud.io/summary/new_code?id=DogsTailFarmer_exchanges-wrapper" target="_blank"><img alt="sonarcloud" title="sonarcloud" src="https://sonarcloud.io/api/project_badges/measure?project=DogsTailFarmer_exchanges-wrapper&metric=alert_status"/></a>
@@ -6,7 +6,6 @@
6
6
 
7
7
  ***
8
8
  <a href="https://pypi.org/project/exchanges-wrapper/"><img src="https://img.shields.io/pypi/v/exchanges-wrapper" alt="PyPI version"></a>
9
- <a href="https://codeclimate.com/github/DogsTailFarmer/exchanges-wrapper/maintainability"><img src="https://api.codeclimate.com/v1/badges/f333ab9b1f3024699e09/maintainability" /></a>
10
9
  <a href="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper/?ref=repository-badge}" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper.svg/?label=resolved+issues&token=XuG5PmzMiKlDL921-qREIuX_"/></a>
11
10
  <a href="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper/?ref=repository-badge}" target="_blank"><img alt="DeepSource" title="DeepSource" src="https://deepsource.io/gh/DogsTailFarmer/exchanges-wrapper.svg/?label=active+issues&token=XuG5PmzMiKlDL921-qREIuX_"/></a>
12
11
  <a href="https://sonarcloud.io/summary/new_code?id=DogsTailFarmer_exchanges-wrapper" target="_blank"><img alt="sonarcloud" title="sonarcloud" src="https://sonarcloud.io/api/project_badges/measure?project=DogsTailFarmer_exchanges-wrapper&metric=alert_status"/></a>
@@ -12,7 +12,7 @@ __maintainer__ = "Jerry Fedorenko"
12
12
  __contact__ = "https://github.com/DogsTailFarmer"
13
13
  __email__ = "jerry.fedorenko@yahoo.com"
14
14
  __credits__ = ["https://github.com/DanyaSWorlD"]
15
- __version__ = "2.1.37"
15
+ __version__ = "2.1.40"
16
16
 
17
17
  from pathlib import Path
18
18
  import shutil
@@ -128,9 +128,7 @@ class Client:
128
128
  precision = symbol_infos["baseAssetPrecision"]
129
129
  if precision > self.highest_precision:
130
130
  self.highest_precision = precision
131
- symbol_infos["filters"] = dict(
132
- map(lambda x: (x.pop("filterType"), x), symbol_infos["filters"])
133
- )
131
+ symbol_infos["filters"] = {x.pop("filterType"): x for x in symbol_infos["filters"]}
134
132
  self.symbols[symbol] = symbol_infos
135
133
  decimal.getcontext().prec = (self.highest_precision + 4) # for operations and rounding
136
134
  if self.exchange == 'bybit':
@@ -186,7 +184,7 @@ class Client:
186
184
  break
187
185
  await asyncio.sleep(0.1)
188
186
 
189
- async def start_market_events_listener(self, _trade_id):
187
+ def start_market_events_listener(self, _trade_id):
190
188
  _events = self.events.registered_streams.get(self.exchange, {}).get(_trade_id, set())
191
189
  if self.exchange == 'binance':
192
190
  market_data_stream = MarketEventsDataStream(self, self.endpoint_ws_public, self.exchange, _trade_id)
@@ -241,9 +241,7 @@ class OutboundAccountPositionWrapper(EventWrapper):
241
241
  super().__init__(event_data, handlers)
242
242
  self.event_time = event_data["E"]
243
243
  self.last_update = event_data["u"]
244
- self.balances = dict(
245
- map(lambda x: (x["a"], {"free": x["f"], "locked": x["l"]}), event_data["B"])
246
- )
244
+ self.balances = {x["a"]: {"free": x["f"], "locked": x["l"]} for x in event_data["B"]}
247
245
 
248
246
 
249
247
  # BALANCE UPDATE
@@ -308,8 +306,4 @@ class ListStatus(EventWrapper):
308
306
  self.list_order_status = event_data["L"]
309
307
  self.list_reject_reason = event_data["r"]
310
308
  self.list_client_order_id = event_data["C"]
311
- # noinspection PyArgumentList
312
- self.orders = dict(
313
- map(lambda x: (x["s"], {"orderId": x["i"], "clientOrderId": x["c"]})),
314
- event_data["O"],
315
- )
309
+ self.orders = {x["s"]: {"orderId": x["i"], "clientOrderId": x["c"]} for x in event_data["O"]}
@@ -753,7 +753,7 @@ class Martin(mr.MartinBase):
753
753
  len(v[request.trade_id]) for v in client.events.registered_streams.values() if request.trade_id in v
754
754
  )
755
755
  logger.info(f"Start WS streams for {open_client.name}")
756
- await client.start_market_events_listener(request.trade_id)
756
+ client.start_market_events_listener(request.trade_id)
757
757
  await client.start_user_events_listener(request.trade_id, request.symbol)
758
758
  response.success = True
759
759
  return response
@@ -20,10 +20,10 @@ dependencies = [
20
20
  "crypto-ws-api==2.0.20",
21
21
  "pyotp==2.9.0",
22
22
  "simplejson==3.20.1",
23
- "aiohttp~=3.11.18",
23
+ "aiohttp~=3.12.13",
24
24
  "expiringdict~=1.2.2",
25
25
  "betterproto==2.0.0b7",
26
- "grpclib~=0.4.7"
26
+ "grpclib~=0.4.8"
27
27
  ]
28
28
 
29
29
  [tool.flit.module]