pdmt5 0.0.7__tar.gz → 0.0.9__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.
- {pdmt5-0.0.7 → pdmt5-0.0.9}/PKG-INFO +1 -1
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pdmt5/__init__.py +2 -1
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pdmt5/dataframe.py +3 -3
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pdmt5/mt5.py +142 -84
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pdmt5/trading.py +53 -9
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pyproject.toml +2 -2
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/test_dataframe.py +24 -28
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/test_init.py +6 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/test_mt5.py +24 -17
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/test_trading.py +257 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/uv.lock +1 -1
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.claude/settings.json +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.github/FUNDING.yml +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.github/copilot-instructions.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.github/dependabot.yml +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.github/workflows/ci.yml +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/.gitignore +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/CLAUDE.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/LICENSE +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/README.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/api/dataframe.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/api/index.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/api/mt5.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/api/trading.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/api/utils.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/docs/index.md +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/mkdocs.yml +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/pdmt5/utils.py +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/renovate.json +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/__init__.py +0 -0
- {pdmt5-0.0.7 → pdmt5-0.0.9}/test/test_utils.py +0 -0
|
@@ -4,7 +4,7 @@ from importlib.metadata import version
|
|
|
4
4
|
|
|
5
5
|
from .dataframe import Mt5Config, Mt5DataClient
|
|
6
6
|
from .mt5 import Mt5Client, Mt5RuntimeError
|
|
7
|
-
from .trading import Mt5TradingClient
|
|
7
|
+
from .trading import Mt5TradingClient, Mt5TradingError
|
|
8
8
|
|
|
9
9
|
__version__ = version(__package__) if __package__ else None
|
|
10
10
|
|
|
@@ -14,4 +14,5 @@ __all__ = [
|
|
|
14
14
|
"Mt5DataClient",
|
|
15
15
|
"Mt5RuntimeError",
|
|
16
16
|
"Mt5TradingClient",
|
|
17
|
+
"Mt5TradingError",
|
|
17
18
|
]
|
|
@@ -86,16 +86,16 @@ class Mt5DataClient(Mt5Client):
|
|
|
86
86
|
for i in range(1 + max(0, self.retry_count)):
|
|
87
87
|
if i:
|
|
88
88
|
self.logger.warning(
|
|
89
|
-
"Retrying
|
|
89
|
+
"Retrying MT5 initialization (%d/%d)...",
|
|
90
90
|
i,
|
|
91
91
|
self.retry_count,
|
|
92
92
|
)
|
|
93
93
|
time.sleep(i)
|
|
94
94
|
if self.initialize(**initialize_kwargs): # type: ignore[reportArgumentType]
|
|
95
|
-
self.logger.info("
|
|
95
|
+
self.logger.info("MT5 initialization successful.")
|
|
96
96
|
return
|
|
97
97
|
error_message = (
|
|
98
|
-
f"
|
|
98
|
+
f"MT5 initialization failed after {self.retry_count} retries:"
|
|
99
99
|
f" {self.last_error()}"
|
|
100
100
|
)
|
|
101
101
|
raise Mt5RuntimeError(error_message)
|