exchanges-wrapper 1.3.7.post3__tar.gz → 1.4.0rc2__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 (33) hide show
  1. exchanges-wrapper-1.4.0rc2/.deepsource.toml +12 -0
  2. exchanges-wrapper-1.4.0rc2/.dockerignore +3 -0
  3. exchanges-wrapper-1.4.0rc2/.github/FUNDING.yml +1 -0
  4. exchanges-wrapper-1.4.0rc2/.github/dependabot.yml +11 -0
  5. exchanges-wrapper-1.4.0rc2/.github/workflows/docker-image.yml +32 -0
  6. exchanges-wrapper-1.4.0rc2/.github/workflows/python-publish.yml +40 -0
  7. exchanges-wrapper-1.4.0rc2/CHANGELOG.md +339 -0
  8. exchanges-wrapper-1.4.0rc2/Dockerfile +23 -0
  9. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/PKG-INFO +16 -13
  10. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/README.md +11 -9
  11. exchanges-wrapper-1.4.0rc2/example/exch_client.py +415 -0
  12. exchanges-wrapper-1.4.0rc2/example/ms_cfg.toml +5 -0
  13. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/__init__.py +1 -1
  14. exchanges-wrapper-1.4.0rc2/exchanges_wrapper/api_pb2.py +513 -0
  15. exchanges-wrapper-1.4.0rc2/exchanges_wrapper/bybit_parser.py +515 -0
  16. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/client.py +267 -45
  17. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/events.py +3 -1
  18. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/exch_srv.py +84 -70
  19. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/exch_srv_cfg.toml.template +29 -4
  20. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/http_client.py +47 -0
  21. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/okx_parser.py +1 -1
  22. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/proto/exchanges_wrapper/api.proto +3 -1
  23. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/web_sockets.py +117 -33
  24. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/pyproject.toml +4 -3
  25. exchanges-wrapper-1.4.0rc2/requirements.txt +11 -0
  26. exchanges_wrapper-1.3.7.post3/exchanges_wrapper/api_pb2.py +0 -120
  27. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/LICENSE.md +0 -0
  28. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/api_pb2_grpc.py +0 -0
  29. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/bitfinex_parser.py +0 -0
  30. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/c_structures.py +0 -0
  31. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/definitions.py +0 -0
  32. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/errors.py +0 -0
  33. {exchanges_wrapper-1.3.7.post3 → exchanges-wrapper-1.4.0rc2}/exchanges_wrapper/huobi_parser.py +0 -0
@@ -0,0 +1,12 @@
1
+ version = 1
2
+
3
+ exclude_patterns = ["*/api*.*",
4
+ ]
5
+
6
+ [[analyzers]]
7
+ name = "python"
8
+ enabled = true
9
+
10
+ [analyzers.meta]
11
+ runtime_version = "3.x.x"
12
+ max_line_length = 120
@@ -0,0 +1,3 @@
1
+ **/__pycache__/
2
+ exchanges_wrapper/exchanges_wrapper/
3
+ exchanges_wrapper/proto/
@@ -0,0 +1 @@
1
+ custom: ['https://github.com/DogsTailFarmer/exchanges-wrapper#donate']
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,32 @@
1
+ name: Docker Image CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v3
14
+
15
+ - name: PrepareReg Names
16
+ run: |
17
+ echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
18
+ echo IMAGE_TAG=$(echo ${{ github.ref }} | tr '[:upper:]' '[:lower:]' | awk '{split($0,a,"/"); print a[3]}') >> $GITHUB_ENV
19
+
20
+ - name: Login to GHCR
21
+ uses: docker/login-action@v2
22
+ with:
23
+ registry: ghcr.io
24
+ username: ${{ github.repository_owner }}
25
+ password: ${{ secrets.GITHUB_TOKEN }}
26
+
27
+ - name: Build and push
28
+ run: |
29
+ docker build . --tag ghcr.io/$IMAGE_REPOSITORY:$IMAGE_TAG
30
+ docker push ghcr.io/$IMAGE_REPOSITORY:$IMAGE_TAG
31
+ docker build . --tag ghcr.io/$IMAGE_REPOSITORY:latest
32
+ docker push ghcr.io/$IMAGE_REPOSITORY:latest
@@ -0,0 +1,40 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ workflow_dispatch:
13
+ release:
14
+ types: [published]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ deploy:
21
+
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v3
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v3
28
+ with:
29
+ python-version: '3.x'
30
+ - name: Install dependencies
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ pip install build
34
+ - name: Build package
35
+ run: python -m build
36
+ - name: Publish package
37
+ uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
38
+ with:
39
+ user: __token__
40
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,339 @@
1
+ ## v1.4.0rc1 2023-10-31
2
+ ### Fix
3
+ * Bitfinex: WSS Information message processing logic adjusted
4
+
5
+ ### Update
6
+ * Dependency: Up requirements for crypto-ws-api==2.0.5
7
+ * Other dependency
8
+ * protobuf format for:
9
+ + OpenClientConnectionRequest
10
+ + FetchOrderRequest
11
+
12
+ ### Added for new features
13
+ * Bybit exchange V5 API support implemented. Supported account type is
14
+ [Unified Trading Account](https://testnet.bybit.com/en/help-center/article/Introduction-to-Bybit-Unified-Trading-Account),
15
+ for main and sub-accounts. Spot Trading only.
16
+
17
+ ## v1.3.7.post4 2023-10-09
18
+ ### Update
19
+ * Dependency: Up requirements for crypto-ws-api==2.0.4
20
+
21
+ ## v1.3.7.post3 2023-10-05
22
+ ### Update
23
+ * Dependency: Up requirements for crypto-ws-api==2.0.3.post1
24
+
25
+ ## v1.3.7.post2 2023-09-30
26
+ ### Update
27
+ * Dependency: Up requirements for crypto-ws-api==2.0.3
28
+
29
+ ## v1.3.7.post1 2023-09-24
30
+ ### Fix
31
+ * [2023-09-24 07:10:21,076: ERROR] Fetch order trades for HuobiSub2: HTUSDT exception: Client.fetch_order_trade_list()
32
+ missing 1 required positional argument: 'trade_id'
33
+ * exchanges_wrapper.huobi_parser.account_trade_list: incorrect key for `orderId`
34
+
35
+ ### Update
36
+ * Dependency: Up requirements for crypto-ws-api==2.0.2.post1
37
+
38
+ ## v1.3.7 2023-09-19
39
+ ### Fix
40
+ * Bitfinex: fix 500 `Internal server error`, caused by a Nonce value sequence failure
41
+
42
+ ### Update
43
+ * For web socket connection migrated from aiohttp.ws_connection to websockets.client
44
+ * Bitfinex: Implemented rate limit control for the Bitfinex REST API.
45
+ * Bitfinex: Refine handling of active orders
46
+ * OnOrderBookUpdate: change queue to LifoQueue, for get last actual order book row
47
+
48
+ ### Don't fix
49
+ * gRPC [(grpcio + grpcio-tools)](https://github.com/grpc/grpc): massive memory leak for version later than 1.48.2
50
+
51
+ ## v1.3.6b7 2023-08-20
52
+ ### Fix
53
+ * The `exch_srv_cfg.toml` wants to be updated from `exch_srv_cfg.toml.template`:
54
+ ```toml
55
+ [endpoint.okx]
56
+ api_public = 'https://aws.okx.com'
57
+ api_auth = 'https://aws.okx.com'
58
+ ws_public = 'wss://wsaws.okx.com:8443/ws/v5/public'
59
+ ws_auth = 'wss://wsaws.okx.com:8443/ws/v5/private'
60
+ ws_business = 'wss://ws.okx.com:8443/ws/v5/business'
61
+ api_test = 'https://aws.okx.com'
62
+ ws_test = 'wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999'
63
+ ```
64
+
65
+ ## v1.3.6b4 2023-08-18
66
+ ### Fix
67
+ * [ Can't resolve missed PARTIALLY_FILLED event #29 ](https://github.com/DogsTailFarmer/exchanges-wrapper/issues/29#issue-1857179139)
68
+ * [ OKX changed WSS endpoint for Candlesticks channel #27 ](https://github.com/DogsTailFarmer/exchanges-wrapper/issues/27#issue-1852639540)
69
+
70
+ The `exch_srv_cfg.toml` wants to be updated from `exch_srv_cfg.toml.template`:
71
+ ```toml
72
+ [endpoint.okx]
73
+ api_public = 'https://aws.okx.com'
74
+ api_auth = 'https://aws.okx.com'
75
+ ws_public = 'wss://wsaws.okx.com:8443/ws/v5/public'
76
+ ws_business = 'wss://ws.okx.com:8443/ws/v5/business'
77
+ api_test = 'https://aws.okx.com'
78
+ ws_test = 'wss://wspap.okx.com:8443/ws/v5/private?brokerId=9999'
79
+ ```
80
+ ## v1.3.5rc1 2023-08-08
81
+ ### Update
82
+ * Dependency: Up requirements for crypto-ws-api~=2.0.0rc3
83
+ * Optimise code by [Sourcery AI](https://docs.sourcery.ai/Guides/Getting-Started/PyCharm/) refactoring engine
84
+ * Some minor improvements
85
+
86
+ ## v1.3.5b0 - 2023-07-26
87
+ ### Added for new features
88
+ * Binance, OKX: Most requests use WSS first, REST API is used as a backup and in the case of single rare requests
89
+
90
+ ## v1.3.4-1 2023-07-19
91
+ ### Fix
92
+ ```
93
+ ERROR: Cannot install crypto_ws_api and grpcio==1.56.0 because these package versions have conflicting dependencies.
94
+
95
+ The conflict is caused by:
96
+ The user requested grpcio==1.56.0
97
+ exchanges-wrapper 1.3.3 depends on grpcio==1.48.1
98
+ The user requested grpcio==1.56.0
99
+ exchanges-wrapper 1.3.2 depends on grpcio==1.48.1
100
+
101
+ ```
102
+
103
+ ## v1.3.4 2023-07-17
104
+ ### Update
105
+ * Up requirements for grpcio to 1.56.0
106
+ ```bazaar
107
+ Known security vulnerabilities detected
108
+ Dependency grpcio Version < 1.53.0 Upgrade to ~> 1.53.0
109
+ ```
110
+ * Bitfinex: `exchanges_wrapper.client.Client.cancel_all_orders()`: removed unnecessary status check after cancel request
111
+
112
+ ## v1.3.3 2023-07-04
113
+ ### Update
114
+ * UserWSSession moved to crypto-ws-api pkg
115
+ * Refactoring logging
116
+ * CheckStream(): fix log spamming on passed check
117
+ * Up requirements for crypto-ws-api to 1.0.1
118
+
119
+ ## v1.3.2 - 2023-06-29
120
+ ### Added for new features
121
+ * Binance: ws_api package implemented, last version
122
+ [Websocket API](https://developers.binance.com/docs/binance-trading-api/websocket_api#general-api-information)
123
+ used for the most commonly used methods
124
+
125
+ In `exch_srv_cfg.toml` added:
126
+
127
+ ```bazaar
128
+ [endpoint]
129
+ [endpoint.binance]
130
+ ...
131
+ ws_api = 'wss://ws-api.binance.com:443/ws-api/v3'
132
+ ws_api_test = 'wss://testnet.binance.vision/ws-api/v3'
133
+
134
+ ```
135
+
136
+ ## v1.3.1 - 2023-06-20
137
+ ### Update
138
+ * Optimizing installation and initial settings
139
+
140
+ ## v1.3.0-2 - 2023-06-19
141
+ ### Update
142
+ * Binance: keepalive WSS
143
+
144
+ ## v1.3.0 - 2023-06-01
145
+ ### Fix
146
+ * exchanges_wrapper.client.Client.cancel_all_orders() set correct 'status' for cancelled orders
147
+
148
+ ### Update
149
+ * protobuf format for CancelAllOrders() and OnOrderUpdate(). Now simple use ```result = eval(json.loads(res.result))```
150
+ for unpack incoming message. **Not compatible with earlier versions**
151
+ * dependencies
152
+
153
+ ## v1.2.10-6-HotFix - 2023-04-12
154
+ ### Fix
155
+ * Binance: REST API update for endpoint: GET /api/v3/exchangeInfo was changed MIN_NOTIONAL filter
156
+
157
+ ## v1.2.10-5 - 2023-04-05
158
+ ### Update
159
+ * Minor improvements
160
+
161
+ ## v1.2.10-4 - 2023-03-04
162
+ ### Fix
163
+ * OKX: intersection wss streams for several trades on one client (same account). WSS buffer moved from
164
+ client instance to EventsDataStream instance
165
+
166
+ ## v1.2.10-3 - 2023-03-01
167
+ ### Fix
168
+ * OKX: FetchOpenOrders(): getting orders list for all pair per account instead specific one pair
169
+
170
+ ## v1.2.10-2 - 2023-02-26
171
+ ### Added for new features
172
+ * CheckStream() method which request active WSS for trade_id
173
+
174
+ ## v1.2.10 - 2023-02-22
175
+ ### Added for new features
176
+ * Add method TransferToMaster():
177
+
178
+ >Send request to transfer asset from subaccount to main account
179
+ Binance, OKX: not additional settings needed
180
+ Bitfinex: for subaccount setting 2FA method, set WITHDRAWAL permission for API key,
181
+ in config for subaccount set 2FA key and master account EMail
182
+ Huobi: in config for subaccount set master_name for Main account
183
+
184
+ ### Update
185
+ * Up requirements aiohttp to 3.8.4
186
+ * Some minor improvements
187
+
188
+ ## v1.2.9-2 - 2023-02-04
189
+ ### Fixed
190
+ * Fix DogsTailFarmer/martin-binance#50
191
+
192
+ ### Update
193
+ * Remove unnecessary shebang
194
+
195
+ ## v1.2.9-1 - 2023-01-23
196
+ ### Update
197
+ * Additional check for order status if its can't place during timeout period for avoid place duplicate order
198
+
199
+ ## v1.2.9 - 2023-01-08
200
+ ### Update
201
+ * Removing FTX smell
202
+
203
+ ## v1.2.8 - 2023-01-01
204
+ ### Added for new features
205
+ * Add connection to binance.us
206
+
207
+ ## v1.2.7-7 2022-12-15
208
+ ### Fixed
209
+ * DogsTailFarmer/martin-binance#42
210
+
211
+ ## v1.2.7-6 2022-12-08
212
+ ### Fixed
213
+ * Bitfinex: handling canceled TP order after it partially filled
214
+
215
+ ### Update
216
+ * Binance: REST API: filter type "PERCENT_PRICE" to "PERCENT_PRICE_BY_SIDE"
217
+
218
+ ## v1.2.7-5 2022-12-04
219
+ ### Update
220
+ * FetchOpenOrders() add handler for errors.QueryCanceled, in case RateLimitReached was raised elsewhere
221
+ * Some minor improvements
222
+
223
+ ## v1.2.7-4 2022-11-25
224
+ ### Fixed
225
+ * Clearing cancel previous wss start() before restart from 1.2.7-3 was a bad idea. It's kill himself. Rollback.
226
+
227
+ ## v1.2.7-3 2022-11-24
228
+ ### Fixed
229
+ * Huobi: incorrect handling for incoming ping for private channel
230
+ * OKX: refactoring wss heartbeat
231
+ * Clearing cancel previous wss start() before restart
232
+
233
+ ## v1.2.7-2 2022-11-23
234
+ ### Update
235
+ * Bitfinex: add "receive_timeout=30" parameter in ws_connect(), this is a reliable solution for monitoring the presence
236
+ of a connection
237
+
238
+ ## v1.2.7-1 2022-11-21
239
+ ### Update
240
+ * Add OKX section in config file
241
+
242
+ ## v1.2.7 2022-11-21
243
+ ### Added for new features
244
+ * OKX exchange
245
+
246
+ ## v1.2.6-1 2022-11-11
247
+ ### Fixed
248
+ * FTX: OnFundsUpdate() did not return a result
249
+
250
+ ### Added for new features
251
+ * OnBalanceUpdate() for autocorrect depo and initial balance
252
+
253
+ ### Update
254
+ * refactoring http_client module for multi exchanges purposes
255
+ * added _percent_price filter dummy for all parsers
256
+
257
+ ## v1.2.6 2022-10-13
258
+ ### Fixed
259
+ * Huobi Restart WSS for PING timeout, 20s for market and 60s for user streams
260
+ * Removed unnecessary refine amount/price in create_order() for Bitfinex, FTX and Huobi
261
+
262
+ ## v1.2.6b1 2022-10-12
263
+ ### Added for new features
264
+ * Huobi exchange
265
+
266
+ ## v1.2.5-3 2022-09-26
267
+ ### Fixed
268
+ * #2 FTX WS market stream lies down quietly
269
+
270
+ ### Update
271
+ * Slightly optimized process of docker container setup and start-up
272
+
273
+ ## v1.2.5-2 2022-09-23
274
+ ### Added for new features
275
+ * Published as Docker image
276
+
277
+ ### Update
278
+ * README.md add info about Docker image use
279
+
280
+ ## v1.2.5-1 2022-09-21
281
+ ### Update
282
+ * Restoring the closed WSS for any reason other than forced explicit shutdown
283
+
284
+ ## v1.2.5 2022-09-20
285
+ ### Update
286
+ * Correct max size on queue() for book WSS
287
+
288
+ ## v1.2.5b0 2022-09-18
289
+ ### Fixed
290
+ * [Doesn't work on bitfinex: trading rules, step_size restriction not applicable, check](https://github.com/DogsTailFarmer/martin-binance/issues/28#issue-1366945816)
291
+ * [FTX WS market stream lies down quietly](https://github.com/DogsTailFarmer/exchanges-wrapper/issues/2#issue-1362214342) Refactoring WSS control
292
+ * Keep alive Binance combined market WSS, correct restart after stop pair
293
+
294
+ ### Update
295
+ * FetchOrder for 'PARTIALLY_FILLED' event on 'binance' and 'ftx'
296
+ * User data and settings config are moved outside the package to simplify the upgrade
297
+ * Version accounting of the configuration file is given to the package
298
+
299
+ ### Added for new features
300
+ * Published as Docker image
301
+ * On first run create catalog structure for user files at ```/home/user/.MartinBinance/```
302
+
303
+ ## v1.2.4 2022-08-27
304
+ ### Fixed
305
+ * [Incomplete account setup](DogsTailFarmer/martin-binance#17)
306
+ * 1.2.3-2 Fix wss market handler, was stopped after get int type message instead of dict
307
+ * 1.2.3-5 clear console output
308
+ * 1.2.3-6 Bitfinex WSServerHandshakeError handling
309
+ * refactoring web_socket.py for correct handling and restart wss
310
+
311
+ ### Update
312
+ * up to Python 3.10.6 compatible
313
+ * reuse aiohttp.ClientSession().ws_connect() for client session
314
+
315
+ ## v1.2.3 - 2022-08-14
316
+ ### Fixed
317
+ * Bitfinex: restore active orders list after restart
318
+ * [exch_server not exiting if it can't obtain port](https://github.com/DogsTailFarmer/martin-binance/issues/12#issue-1328603498)
319
+
320
+ ## v1.2.2 - 2022-08-06
321
+ ### Fixed
322
+ * Incorrect handling fetch_open_orders response after reinit connection
323
+
324
+ ## v1.2.1 - 2022-08-04
325
+ ### Added for new features
326
+ * FTX: WSS 'orderbook' check status by provided checksum value
327
+
328
+ ### Fixed
329
+ * FTX: WSS 'ticker' incorrect init
330
+ * Bitfinex: changed priority for order status, CANCELED priority raised
331
+
332
+
333
+ ## v1.2.0 - 2022-06-30
334
+ ### Added for new features
335
+ * Bitfinex REST API / WSS implemented
336
+
337
+ ### Updated
338
+ * Optimized WSS processing methods to improve performance and fault tolerance
339
+ * Updated configuration file format for multi-exchange use
@@ -0,0 +1,23 @@
1
+ # syntax=docker/dockerfile:1
2
+ FROM python:3.10.6-slim
3
+
4
+ RUN useradd -ms /bin/bash appuser
5
+ USER appuser
6
+
7
+ ENV PATH="/home/appuser/.local/bin:${PATH}"
8
+ ENV PATH="/home/appuser/.local/lib/python3.10/site-packages:${PATH}"
9
+ ENV PYTHONUNBUFFERED=1
10
+
11
+ COPY requirements.txt requirements.txt
12
+
13
+ RUN pip3 install -r requirements.txt
14
+
15
+ COPY ./exchanges_wrapper/* /home/appuser/.local/lib/python3.10/site-packages/exchanges_wrapper/
16
+
17
+ WORKDIR "/home/appuser/.local/lib/python3.10/site-packages"
18
+
19
+ LABEL org.opencontainers.image.description="See README.md 'Get started' for setup and run package"
20
+
21
+ EXPOSE 50051
22
+
23
+ CMD ["python3","exchanges_wrapper/exch_srv.py"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exchanges-wrapper
3
- Version: 1.3.7.post3
3
+ Version: 1.4.0rc2
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.8
@@ -11,18 +11,19 @@ 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.3.post1
14
+ Requires-Dist: crypto-ws-api==2.0.5
15
15
  Requires-Dist: grpcio==1.48.2
16
16
  Requires-Dist: grpcio-tools==1.48.2
17
17
  Requires-Dist: idna==3.4
18
18
  Requires-Dist: pyotp~=2.9.0
19
- Requires-Dist: simplejson==3.19.1
20
- Requires-Dist: websockets~=11.0.3
19
+ Requires-Dist: simplejson==3.19.2
20
+ Requires-Dist: websockets~=12.0
21
+ Requires-Dist: expiringdict~=1.2.2
21
22
  Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
22
23
 
23
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>
24
25
 
25
- <h2 align="center">Binance, Bitfinex, Huobi, OKX,</h2>
26
+ <h2 align="center">Binance, Bitfinex, Huobi, OKX, Bybit,</h2>
26
27
 
27
28
  <h3 align="center">For SPOT markets</h3>
28
29
 
@@ -34,7 +35,7 @@ Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
34
35
  <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>
35
36
  <a href="https://pepy.tech/project/exchanges-wrapper" target="_blank"><img alt="Downloads" title="Downloads" src="https://static.pepy.tech/badge/exchanges-wrapper/month"/></a>
36
37
  ***
37
- From `v1.3.6b4`, `v1.3.6b7` must be updated `exch_srv_cfg.toml` (see [CHANGELOG](https://github.com/DogsTailFarmer/exchanges-wrapper/blob/master/CHANGELOG.md) for details)
38
+ From `v1.4.0` must be updated `exch_srv_cfg.toml`
38
39
  ***
39
40
 
40
41
  ## exchanges-wrapper vs binance.py
@@ -63,22 +64,26 @@ Served methods describes into ```example/exch_client.py```
63
64
  - Passthrough logging
64
65
  - WSS keepalive
65
66
  - Reuse session for new client sessions
66
- - Utilizing Websocket API (bidirectional) for the most commonly used methods (Binance ws-api/v3, )
67
+ - Utilizing Websocket API (bidirectional) for the most commonly used methods:
68
+ + Binance ws-api/v3
69
+ + Bitfinex Websocket Authenticated Inputs v2
70
+ + OKX WS v5
67
71
 
68
72
  ## Extra exchanges implementation features
69
73
  - Binance REST API and WSS are accepted as basic, connection of other exchanges wrapped their API to Binance compatible
70
74
  - For other, some data cannot be obtained by directly calling one method, it is generated by a synthetic or calculation
71
75
  method
72
76
  - Some exchanges have not any testing or "paper trading" features, therefore, application development and testing is possible only
73
- at real bidding. First, run applications on the [Binance Spot Test Network](https://testnet.binance.vision/) or (Bitfinex, OKX) test account.
77
+ at real bidding. First, run applications on the [Binance Spot Test Network](https://testnet.binance.vision/) or (Bitfinex, OKX, Bybit) test account.
74
78
 
75
79
  ## Get started
76
80
  ### Prepare exchange account
77
81
  * Create account on [Binance](https://accounts.binance.com/en/register?ref=QCS4OGWR) and get 10% discount on all trading fee
78
82
  * Create account on [Bitfinex](https://www.bitfinex.com/sign-up?refcode=v_4az2nCP) and get 6% rebate fee
79
- * Create account on [HUOBI](https://www.huobi.com/en-us/topic/double-reward/?invite_code=9uaw3223) and get 10% cashback
80
- on all trading fee
83
+ * Create account on [HUOBI](https://www.huobi.com/en-us/topic/double-reward/?invite_code=9uaw3223) and get 10% cashback on all trading fee
81
84
  * Create account on [OKX](https://www.okx.com/join/2607649) and get Mystery Boxes worth up to $10,000
85
+ * Create account on [Bybit](https://www.bybit.com/invite?ref=9KEW1K) and get exclusive referral rewards
86
+
82
87
  * For test purpose log in at [Binance Spot Test Network](https://testnet.binance.vision/)
83
88
  * Create API Key
84
89
  * After install and create environment specify api_key and api_secret in ```/home/ubuntu/.MartinBinance/config/exch_srv_cfg.toml```
@@ -133,10 +138,8 @@ docker run -itP \
133
138
  ```
134
139
 
135
140
  ### Documentations
136
- * For [binance.py](https://th0rgal.gitbook.io/binance-py/) use original
137
141
  * Served methods and examples of their use are described at ```example/exch_client.py```
138
- * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data
139
- see ```proto/exchanges_wrapper/api.proto```
142
+ * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```proto/exchanges_wrapper/api.proto```
140
143
 
141
144
  ## Donate
142
145
  *BNB*, *BUSD*, *USDT* (BEP20) 0x5b52c6ba862b11318616ee6cef64388618318b92
@@ -1,6 +1,6 @@
1
1
  <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>
2
2
 
3
- <h2 align="center">Binance, Bitfinex, Huobi, OKX,</h2>
3
+ <h2 align="center">Binance, Bitfinex, Huobi, OKX, Bybit,</h2>
4
4
 
5
5
  <h3 align="center">For SPOT markets</h3>
6
6
 
@@ -12,7 +12,7 @@
12
12
  <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>
13
13
  <a href="https://pepy.tech/project/exchanges-wrapper" target="_blank"><img alt="Downloads" title="Downloads" src="https://static.pepy.tech/badge/exchanges-wrapper/month"/></a>
14
14
  ***
15
- From `v1.3.6b4`, `v1.3.6b7` must be updated `exch_srv_cfg.toml` (see [CHANGELOG](https://github.com/DogsTailFarmer/exchanges-wrapper/blob/master/CHANGELOG.md) for details)
15
+ From `v1.4.0` must be updated `exch_srv_cfg.toml`
16
16
  ***
17
17
 
18
18
  ## exchanges-wrapper vs binance.py
@@ -41,22 +41,26 @@ Served methods describes into ```example/exch_client.py```
41
41
  - Passthrough logging
42
42
  - WSS keepalive
43
43
  - Reuse session for new client sessions
44
- - Utilizing Websocket API (bidirectional) for the most commonly used methods (Binance ws-api/v3, )
44
+ - Utilizing Websocket API (bidirectional) for the most commonly used methods:
45
+ + Binance ws-api/v3
46
+ + Bitfinex Websocket Authenticated Inputs v2
47
+ + OKX WS v5
45
48
 
46
49
  ## Extra exchanges implementation features
47
50
  - Binance REST API and WSS are accepted as basic, connection of other exchanges wrapped their API to Binance compatible
48
51
  - For other, some data cannot be obtained by directly calling one method, it is generated by a synthetic or calculation
49
52
  method
50
53
  - Some exchanges have not any testing or "paper trading" features, therefore, application development and testing is possible only
51
- at real bidding. First, run applications on the [Binance Spot Test Network](https://testnet.binance.vision/) or (Bitfinex, OKX) test account.
54
+ at real bidding. First, run applications on the [Binance Spot Test Network](https://testnet.binance.vision/) or (Bitfinex, OKX, Bybit) test account.
52
55
 
53
56
  ## Get started
54
57
  ### Prepare exchange account
55
58
  * Create account on [Binance](https://accounts.binance.com/en/register?ref=QCS4OGWR) and get 10% discount on all trading fee
56
59
  * Create account on [Bitfinex](https://www.bitfinex.com/sign-up?refcode=v_4az2nCP) and get 6% rebate fee
57
- * Create account on [HUOBI](https://www.huobi.com/en-us/topic/double-reward/?invite_code=9uaw3223) and get 10% cashback
58
- on all trading fee
60
+ * Create account on [HUOBI](https://www.huobi.com/en-us/topic/double-reward/?invite_code=9uaw3223) and get 10% cashback on all trading fee
59
61
  * Create account on [OKX](https://www.okx.com/join/2607649) and get Mystery Boxes worth up to $10,000
62
+ * Create account on [Bybit](https://www.bybit.com/invite?ref=9KEW1K) and get exclusive referral rewards
63
+
60
64
  * For test purpose log in at [Binance Spot Test Network](https://testnet.binance.vision/)
61
65
  * Create API Key
62
66
  * After install and create environment specify api_key and api_secret in ```/home/ubuntu/.MartinBinance/config/exch_srv_cfg.toml```
@@ -111,10 +115,8 @@ docker run -itP \
111
115
  ```
112
116
 
113
117
  ### Documentations
114
- * For [binance.py](https://th0rgal.gitbook.io/binance-py/) use original
115
118
  * Served methods and examples of their use are described at ```example/exch_client.py```
116
- * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data
117
- see ```proto/exchanges_wrapper/api.proto```
119
+ * For [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) serializing structured data see ```proto/exchanges_wrapper/api.proto```
118
120
 
119
121
  ## Donate
120
122
  *BNB*, *BUSD*, *USDT* (BEP20) 0x5b52c6ba862b11318616ee6cef64388618318b92