exchanges-wrapper 2.1.12__tar.gz → 2.1.13__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.12 → exchanges_wrapper-2.1.13}/PKG-INFO +4 -4
  2. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/__init__.py +1 -1
  3. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/web_sockets.py +15 -16
  4. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/pyproject.toml +3 -3
  5. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/LICENSE.md +0 -0
  6. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/README.md +0 -0
  7. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/client.py +0 -0
  8. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/definitions.py +0 -0
  9. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/errors.py +0 -0
  10. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/events.py +0 -0
  11. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/exch_srv.py +0 -0
  12. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/exch_srv_cfg.toml.template +0 -0
  13. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/http_client.py +0 -0
  14. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/lib.py +0 -0
  15. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/martin/__init__.py +0 -0
  16. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/parsers/bitfinex_parser.py +0 -0
  17. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/parsers/bybit_parser.py +0 -0
  18. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/parsers/huobi_parser.py +0 -0
  19. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/parsers/okx_parser.py +0 -0
  20. {exchanges_wrapper-2.1.12 → exchanges_wrapper-2.1.13}/exchanges_wrapper/proto/martin.proto +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exchanges-wrapper
3
- Version: 2.1.12
3
+ Version: 2.1.13
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.9
@@ -11,15 +11,15 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: Unix
12
12
  Classifier: Operating System :: Microsoft :: Windows
13
13
  Classifier: Operating System :: MacOS
14
- Requires-Dist: crypto-ws-api==2.0.11
14
+ Requires-Dist: crypto-ws-api==2.0.12
15
15
  Requires-Dist: grpcio==1.62.0
16
16
  Requires-Dist: pyotp~=2.9.0
17
17
  Requires-Dist: simplejson==3.19.2
18
- Requires-Dist: aiohttp==3.9.3
18
+ Requires-Dist: aiohttp==3.9.5
19
19
  Requires-Dist: Pympler~=1.0.1
20
20
  Requires-Dist: websockets~=12.0
21
21
  Requires-Dist: expiringdict~=1.2.2
22
- Requires-Dist: ujson~=5.9.0
22
+ Requires-Dist: ujson~=5.10.0
23
23
  Requires-Dist: betterproto==2.0.0b6
24
24
  Requires-Dist: grpclib~=0.4.7
25
25
  Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
@@ -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.12"
15
+ __version__ = "2.1.13"
16
16
 
17
17
  from pathlib import Path
18
18
  import shutil
@@ -408,23 +408,22 @@ class HbpPrivateEventsDataStream(EventsDataStream):
408
408
 
409
409
  async def _handle_event(self, msg_data, *args):
410
410
  content = None
411
+ _ch = msg_data['ch']
411
412
  _data = msg_data.get('data')
412
- if _data.get('symbol') == self.symbol.lower():
413
- if msg_data['ch'] == 'accounts.update#2':
414
- content = hbp.on_funds_update(_data)
415
- elif (msg_data['ch'] == f"orders#{self.symbol.lower()}"
416
- and _data['eventType'] in ('creation', 'cancellation')):
417
- order_id = _data['orderId']
418
- self.client.active_order(order_id, quantity=_data['orderSize'])
419
- if _data.get('eventType') == 'cancellation':
420
- self.client.active_orders[order_id]['cancelled'] = True
421
- elif msg_data['ch'] == f"trade.clearing#{self.symbol.lower()}#0":
422
- order_id = _data['orderId']
423
- self.client.active_order(order_id, last_event=_data)
424
- if _data['tradeId'] not in self.client.active_orders[order_id]["eventIds"]:
425
- self.client.active_orders[order_id]["eventIds"].append(_data['tradeId'])
426
- self.client.active_orders[order_id]['executedQty'] += Decimal(_data['tradeVolume'])
427
- content = hbp.on_order_update(self.client.active_orders[order_id])
413
+ if _ch == 'accounts.update#2' and _data.get('currency') in self.symbol.lower():
414
+ content = hbp.on_funds_update(_data)
415
+ elif _ch == f"orders#{self.symbol.lower()}" and _data['eventType'] in ('creation', 'cancellation'):
416
+ order_id = _data['orderId']
417
+ self.client.active_order(order_id, quantity=_data['orderSize'])
418
+ if _data.get('eventType') == 'cancellation':
419
+ self.client.active_orders[order_id]['cancelled'] = True
420
+ elif _ch == f"trade.clearing#{self.symbol.lower()}#0":
421
+ order_id = _data['orderId']
422
+ self.client.active_order(order_id, last_event=_data)
423
+ if _data['tradeId'] not in self.client.active_orders[order_id]["eventIds"]:
424
+ self.client.active_orders[order_id]["eventIds"].append(_data['tradeId'])
425
+ self.client.active_orders[order_id]['executedQty'] += Decimal(_data['tradeVolume'])
426
+ content = hbp.on_order_update(self.client.active_orders[order_id])
428
427
 
429
428
  if content:
430
429
  logger.debug(f"HTXPrivateEvents.content: {content}")
@@ -17,15 +17,15 @@ dynamic = ["version", "description"]
17
17
  requires-python = ">=3.9"
18
18
 
19
19
  dependencies = [
20
- "crypto-ws-api==2.0.11",
20
+ "crypto-ws-api==2.0.12",
21
21
  "grpcio==1.62.0",
22
22
  "pyotp~=2.9.0",
23
23
  "simplejson==3.19.2",
24
- "aiohttp==3.9.3",
24
+ "aiohttp==3.9.5",
25
25
  "Pympler~=1.0.1",
26
26
  "websockets~=12.0",
27
27
  "expiringdict~=1.2.2",
28
- "ujson~=5.9.0",
28
+ "ujson~=5.10.0",
29
29
  "betterproto==2.0.0b6",
30
30
  "grpclib~=0.4.7"
31
31
  ]