exchanges-wrapper 2.1.6__tar.gz → 2.1.7__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.6 → exchanges_wrapper-2.1.7}/PKG-INFO +2 -2
  2. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/README.md +1 -1
  3. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/__init__.py +1 -1
  4. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/http_client.py +4 -2
  5. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/LICENSE.md +0 -0
  6. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/bitfinex_parser.py +0 -0
  7. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/bybit_parser.py +0 -0
  8. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/client.py +0 -0
  9. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/definitions.py +0 -0
  10. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/errors.py +0 -0
  11. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/events.py +0 -0
  12. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/exch_srv.py +0 -0
  13. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/exch_srv_cfg.toml.template +0 -0
  14. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/huobi_parser.py +0 -0
  15. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/lib.py +0 -0
  16. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/martin/__init__.py +0 -0
  17. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/okx_parser.py +0 -0
  18. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/proto/martin.proto +0 -0
  19. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/exchanges_wrapper/web_sockets.py +0 -0
  20. {exchanges_wrapper-2.1.6 → exchanges_wrapper-2.1.7}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exchanges-wrapper
3
- Version: 2.1.6
3
+ Version: 2.1.7
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
@@ -142,7 +142,7 @@ docker run -itP \
142
142
 
143
143
  ### Documentations
144
144
  * Served methods and examples of their use are described at ```example/exch_client.py```
145
- * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```proto/exchanges_wrapper/api.proto```
145
+ * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```exchanges_wrapper/proto/martin.proto```
146
146
 
147
147
  ## Donate
148
148
  *USDT* (TRC20) TN8F3Dz8BU8VwECRh3LTKi7FrsU8eWfsZz
@@ -116,7 +116,7 @@ docker run -itP \
116
116
 
117
117
  ### Documentations
118
118
  * Served methods and examples of their use are described at ```example/exch_client.py```
119
- * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```proto/exchanges_wrapper/api.proto```
119
+ * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```exchanges_wrapper/proto/martin.proto```
120
120
 
121
121
  ## Donate
122
122
  *USDT* (TRC20) TN8F3Dz8BU8VwECRh3LTKi7FrsU8eWfsZz
@@ -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.6"
15
+ __version__ = "2.1.7"
16
16
 
17
17
  from pathlib import Path
18
18
  import shutil
@@ -84,12 +84,14 @@ class HttpClient:
84
84
  return payload.get('result'), payload.get('time')
85
85
  elif payload.get('retCode') == 10002:
86
86
  raise ExchangeError(ERR_TIMESTAMP_OUTSIDE_RECV_WINDOW)
87
+ else:
88
+ raise ExchangeError(f"API request failed: {response.status}:{response.reason}:{payload}")
87
89
  elif self.exchange == 'huobi' and payload and (payload.get('status') == 'ok' or payload.get('ok')):
88
90
  return payload.get('data', payload.get('tick'))
89
91
  elif self.exchange == 'okx' and payload and payload.get('code') == '0':
90
92
  return payload.get('data', [])
91
- elif (self.exchange not in ('binance', 'bitfinex') or
92
- (self.exchange == 'binance' and payload and "code" in payload)):
93
+ elif self.exchange not in ('binance', 'bitfinex') \
94
+ or (self.exchange == 'binance' and payload and "code" in payload):
93
95
  raise ExchangeError(f"API request failed: {response.status}:{response.reason}:{payload}")
94
96
  else:
95
97
  return payload