exchanges-wrapper 2.1.25__tar.gz → 2.1.27__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.
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/PKG-INFO +3 -3
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/__init__.py +1 -1
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/client.py +1 -1
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/exch_srv.py +1 -1
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/http_client.py +4 -2
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/pyproject.toml +2 -2
- exchanges_wrapper-2.1.25/.deepsource.toml +0 -13
- exchanges_wrapper-2.1.25/.dockerignore +0 -3
- exchanges_wrapper-2.1.25/.github/FUNDING.yml +0 -1
- exchanges_wrapper-2.1.25/.github/dependabot.yml +0 -11
- exchanges_wrapper-2.1.25/.github/workflows/docker-image.yml +0 -32
- exchanges_wrapper-2.1.25/.github/workflows/python-publish.yml +0 -40
- exchanges_wrapper-2.1.25/.run/exchanges-wrapper-image.run.xml +0 -15
- exchanges_wrapper-2.1.25/.run/exchanges-wrapper.run.xml +0 -32
- exchanges_wrapper-2.1.25/CHANGELOG.md +0 -621
- exchanges_wrapper-2.1.25/Dockerfile +0 -23
- exchanges_wrapper-2.1.25/example/exch_client.py +0 -436
- exchanges_wrapper-2.1.25/example/ms_cfg.toml +0 -5
- exchanges_wrapper-2.1.25/requirements.txt +0 -10
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/LICENSE.md +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/README.md +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/definitions.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/errors.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/events.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/exch_srv_cfg.toml.template +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/lib.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/martin/__init__.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/parsers/bitfinex.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/parsers/bybit.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/parsers/huobi.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/parsers/okx.py +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/proto/martin.proto +0 -0
- {exchanges_wrapper-2.1.25 → exchanges_wrapper-2.1.27}/exchanges_wrapper/web_sockets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: exchanges-wrapper
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.27
|
|
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,12 +11,12 @@ 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.
|
|
14
|
+
Requires-Dist: crypto-ws-api==2.0.16
|
|
15
15
|
Requires-Dist: pyotp==2.9.0
|
|
16
16
|
Requires-Dist: simplejson==3.19.3
|
|
17
17
|
Requires-Dist: toml~=0.10.2
|
|
18
18
|
Requires-Dist: aiohttp~=3.11.11
|
|
19
|
-
Requires-Dist: websockets==14.
|
|
19
|
+
Requires-Dist: websockets==14.2
|
|
20
20
|
Requires-Dist: expiringdict~=1.2.2
|
|
21
21
|
Requires-Dist: ujson~=5.10.0
|
|
22
22
|
Requires-Dist: betterproto==2.0.0b7
|
|
@@ -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.
|
|
15
|
+
__version__ = "2.1.27"
|
|
16
16
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
import shutil
|
|
@@ -987,7 +987,7 @@ class Client:
|
|
|
987
987
|
except ExchangeError as ex:
|
|
988
988
|
# https://huobiapi.github.io/docs/spot/v1/en/#get-the-order-detail-of-an-order-based-on-client-order-id
|
|
989
989
|
# If an order is created via API, then it's no longer queryable after being cancelled for 2 hours
|
|
990
|
-
if "base-record-invalid" in ex:
|
|
990
|
+
if "base-record-invalid" in str(ex):
|
|
991
991
|
return hbp.order_cancelled(symbol, order_id, origin_client_order_id)
|
|
992
992
|
else:
|
|
993
993
|
raise
|
|
@@ -183,7 +183,7 @@ class Martin(mr.MartinBase):
|
|
|
183
183
|
except asyncio.exceptions.CancelledError:
|
|
184
184
|
raise GRPCError(status=Status.UNAVAILABLE, message=f"{msg_header} Server Shutdown")
|
|
185
185
|
except asyncio.exceptions.TimeoutError:
|
|
186
|
-
self.log_and_raise_grpc_error(msg_header, Status.
|
|
186
|
+
self.log_and_raise_grpc_error(msg_header, Status.DEADLINE_EXCEEDED, "timeout error")
|
|
187
187
|
except (errors.RateLimitReached, errors.QueryCanceled) as ex:
|
|
188
188
|
Martin.rate_limit_reached_time = time.time()
|
|
189
189
|
self.log_and_raise_grpc_error(msg_header, Status.RESOURCE_EXHAUSTED, f"RateLimitReached: {ex}")
|
|
@@ -57,8 +57,10 @@ class HttpClient:
|
|
|
57
57
|
|
|
58
58
|
async def handle_errors(self, response):
|
|
59
59
|
if response.status >= 500:
|
|
60
|
-
raise ExchangeError(
|
|
61
|
-
|
|
60
|
+
raise ExchangeError(
|
|
61
|
+
f"{'API request rejected' if self.exchange == 'bitfinex' else 'An issue occurred on exchange side'}:"
|
|
62
|
+
f" {response.status}: {response.url}: {response.reason}"
|
|
63
|
+
)
|
|
62
64
|
if response.status == 429:
|
|
63
65
|
logger.error(f"API RateLimitReached: {response.url}")
|
|
64
66
|
self.rate_limit_reached = self.exchange in ('binance', 'okx')
|
|
@@ -17,12 +17,12 @@ dynamic = ["version", "description"]
|
|
|
17
17
|
requires-python = ">=3.9"
|
|
18
18
|
|
|
19
19
|
dependencies = [
|
|
20
|
-
"crypto-ws-api==2.0.
|
|
20
|
+
"crypto-ws-api==2.0.16",
|
|
21
21
|
"pyotp==2.9.0",
|
|
22
22
|
"simplejson==3.19.3",
|
|
23
23
|
"toml~=0.10.2",
|
|
24
24
|
"aiohttp~=3.11.11",
|
|
25
|
-
"websockets==14.
|
|
25
|
+
"websockets==14.2",
|
|
26
26
|
"expiringdict~=1.2.2",
|
|
27
27
|
"ujson~=5.10.0",
|
|
28
28
|
"betterproto==2.0.0b7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
custom: ['https://github.com/DogsTailFarmer/exchanges-wrapper#donate']
|
|
@@ -1,11 +0,0 @@
|
|
|
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"
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
|
@@ -1,40 +0,0 @@
|
|
|
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 }}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<component name="ProjectRunConfigurationManager">
|
|
2
|
-
<configuration default="false" name="exchanges-wrapper-image" type="docker-deploy" factoryName="dockerfile" editBeforeRun="true" server-name="Docker">
|
|
3
|
-
<deployment type="dockerfile">
|
|
4
|
-
<settings>
|
|
5
|
-
<option name="imageTag" value="exchanges-wrapper:last" />
|
|
6
|
-
<option name="buildCliOptions" value="--no-cache --network=host" />
|
|
7
|
-
<option name="buildOnly" value="true" />
|
|
8
|
-
<option name="containerName" value="" />
|
|
9
|
-
<option name="showCommandPreview" value="true" />
|
|
10
|
-
<option name="sourceFilePath" value="Dockerfile" />
|
|
11
|
-
</settings>
|
|
12
|
-
</deployment>
|
|
13
|
-
<method v="2" />
|
|
14
|
-
</configuration>
|
|
15
|
-
</component>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<component name="ProjectRunConfigurationManager">
|
|
2
|
-
<configuration default="false" name="exchanges-wrapper" type="docker-deploy" factoryName="docker-image" editBeforeRun="true" server-name="Docker">
|
|
3
|
-
<deployment type="docker-image">
|
|
4
|
-
<settings>
|
|
5
|
-
<option name="imageTag" value="ghcr.io/dogstailfarmer/exchanges-wrapper:latest" />
|
|
6
|
-
<option name="containerName" value="exchanges-wrapper" />
|
|
7
|
-
<option name="commandLineOptions" value="-i -t -P" />
|
|
8
|
-
<option name="showCommandPreview" value="true" />
|
|
9
|
-
<option name="volumeBindings">
|
|
10
|
-
<list>
|
|
11
|
-
<DockerVolumeBindingImpl>
|
|
12
|
-
<option name="containerPath" value="$PROJECT_DIR$/../../../appuser/.MartinBinance" />
|
|
13
|
-
<option name="hostPath" value="$USER_HOME$/.MartinBinance" />
|
|
14
|
-
</DockerVolumeBindingImpl>
|
|
15
|
-
</list>
|
|
16
|
-
</option>
|
|
17
|
-
</settings>
|
|
18
|
-
</deployment>
|
|
19
|
-
<method v="2" />
|
|
20
|
-
</configuration>
|
|
21
|
-
<configuration default="false" name="exchanges-wrapper" type="docker-deploy" factoryName="docker-image" editBeforeRun="true" server-name="Docker">
|
|
22
|
-
<deployment type="docker-image">
|
|
23
|
-
<settings>
|
|
24
|
-
<option name="imageTag" value="exchanges-wrapper:last" />
|
|
25
|
-
<option name="containerName" value="exchanges-wrapper" />
|
|
26
|
-
<option name="commandLineOptions" value="-i -t -P --mount type=bind,source=$USER_HOME$/.MartinBinance,target=$PROJECT_DIR$/../../../appuser/.MartinBinance --network=host" />
|
|
27
|
-
<option name="showCommandPreview" value="true" />
|
|
28
|
-
</settings>
|
|
29
|
-
</deployment>
|
|
30
|
-
<method v="2" />
|
|
31
|
-
</configuration>
|
|
32
|
-
</component>
|