mt5cli 0.4.1__tar.gz → 0.4.2__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.
- {mt5cli-0.4.1 → mt5cli-0.4.2}/PKG-INFO +1 -1
- mt5cli-0.4.1/docs/api/sqlite_history.md → mt5cli-0.4.2/docs/api/history.md +2 -2
- {mt5cli-0.4.1 → mt5cli-0.4.2}/docs/api/index.md +4 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/docs/index.md +1 -1
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mkdocs.yml +1 -1
- mt5cli-0.4.1/mt5cli/sqlite_history.py → mt5cli-0.4.2/mt5cli/history.py +1 -1
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mt5cli/sdk.py +1 -1
- {mt5cli-0.4.1 → mt5cli-0.4.2}/pyproject.toml +2 -2
- mt5cli-0.4.1/tests/test_sqlite_history.py → mt5cli-0.4.2/tests/test_history.py +4 -4
- {mt5cli-0.4.1 → mt5cli-0.4.2}/tests/test_sdk.py +1 -1
- {mt5cli-0.4.1 → mt5cli-0.4.2}/uv.lock +1 -1
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.agents/skills/local-qa/SKILL.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.agents/skills/local-qa/scripts/qa.sh +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.agents/skills/mt5cli/SKILL.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.claude/agents/codex.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.claude/settings.json +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/FUNDING.yml +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/dependabot.yml +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/renovate.json +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/workflows/ci.yml +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/workflows/claude.yml +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.github/workflows/release.yml +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/.gitignore +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/AGENTS.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/CLAUDE.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/LICENSE +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/README.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/docs/api/cli.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/docs/api/sdk.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/docs/api/utils.md +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mt5cli/__init__.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mt5cli/__main__.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mt5cli/cli.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/mt5cli/utils.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/tests/__init__.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/tests/test_cli.py +0 -0
- {mt5cli-0.4.1 → mt5cli-0.4.2}/tests/test_utils.py +0 -0
|
@@ -18,6 +18,10 @@ Utility module providing constants, enums, Click parameter types, and helper fun
|
|
|
18
18
|
|
|
19
19
|
Programmatic SDK for read-only MetaTrader 5 data collection. Returns pandas DataFrames and provides `collect_history` for SQLite bulk collection.
|
|
20
20
|
|
|
21
|
+
### [History Collection (SQLite)](history.md)
|
|
22
|
+
|
|
23
|
+
SQLite storage helpers for the `collect-history` command schema, incremental updates, deduplication, indexes, and optional views.
|
|
24
|
+
|
|
21
25
|
## Architecture Overview
|
|
22
26
|
|
|
23
27
|
The package follows a simple architecture built on top of pdmt5:
|
|
@@ -152,7 +152,7 @@ mt5cli -o history.db collect-history \
|
|
|
152
152
|
|
|
153
153
|
History orders and deals are fetched per symbol and concatenated, so the symbol filter is applied consistently across all datasets. The `cash_events` view is derived from symbol-filtered `history_deals`, so account-level cash events with empty or non-matching symbols may be excluded. The `positions_reconstructed` view excludes positions with no closing deal, uses volume-weighted open/close prices, and reports reversal deals (`DEAL_ENTRY_INOUT`) via `volume_reversal` / `reversal_count`.
|
|
154
154
|
|
|
155
|
-
See the [
|
|
155
|
+
See the [History schema diagram](api/history.md#entity-relationship-diagram) for a sample ER layout of the resulting database.
|
|
156
156
|
|
|
157
157
|
## Global Options
|
|
158
158
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mt5cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.2"
|
|
4
4
|
description = "Command-line tool for MetaTrader 5"
|
|
5
5
|
authors = [{name = "dceoy", email = "dceoy@users.noreply.github.com"}]
|
|
6
6
|
maintainers = [{name = "dceoy", email = "dceoy@users.noreply.github.com"}]
|
|
@@ -124,7 +124,7 @@ ignore = [
|
|
|
124
124
|
]
|
|
125
125
|
|
|
126
126
|
[tool.ruff.lint.per-file-ignores]
|
|
127
|
-
"mt5cli/
|
|
127
|
+
"mt5cli/history.py" = ["TC003"]
|
|
128
128
|
"tests/**/*.py" = [
|
|
129
129
|
"DOC201", # Missing return documentation
|
|
130
130
|
"DOC501", # Raised exception missing from docstring
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Tests for mt5cli.
|
|
1
|
+
"""Tests for mt5cli.history module."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ import pytest
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
|
|
17
|
-
from mt5cli.
|
|
17
|
+
from mt5cli.history import (
|
|
18
18
|
DEFAULT_HISTORY_TIMEFRAMES,
|
|
19
19
|
append_dataframe,
|
|
20
20
|
augment_written_columns_from_sqlite,
|
|
@@ -1024,7 +1024,7 @@ class TestIncrementalIntegration:
|
|
|
1024
1024
|
sqlite3.connect(tmp_path / "no-keys.db") as conn,
|
|
1025
1025
|
caplog.at_level(
|
|
1026
1026
|
logging.WARNING,
|
|
1027
|
-
logger="mt5cli.
|
|
1027
|
+
logger="mt5cli.history",
|
|
1028
1028
|
),
|
|
1029
1029
|
):
|
|
1030
1030
|
deduplicate_history_tables(conn, {Dataset.ticks: {"time"}}, {Dataset.ticks})
|
|
@@ -1059,7 +1059,7 @@ class TestIncrementalIntegration:
|
|
|
1059
1059
|
client = MagicMock()
|
|
1060
1060
|
client.copy_rates_range_as_df.return_value = pd.DataFrame()
|
|
1061
1061
|
with (
|
|
1062
|
-
caplog.at_level(logging.WARNING, logger="mt5cli.
|
|
1062
|
+
caplog.at_level(logging.WARNING, logger="mt5cli.history"),
|
|
1063
1063
|
sqlite3.connect(tmp_path / "views-warning.db") as conn,
|
|
1064
1064
|
):
|
|
1065
1065
|
write_incremental_datasets(
|
|
@@ -16,6 +16,7 @@ if TYPE_CHECKING:
|
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
|
|
18
18
|
from mt5cli import sdk
|
|
19
|
+
from mt5cli.history import DEFAULT_HISTORY_TIMEFRAMES
|
|
19
20
|
from mt5cli.sdk import (
|
|
20
21
|
Mt5CliClient,
|
|
21
22
|
account_info,
|
|
@@ -40,7 +41,6 @@ from mt5cli.sdk import (
|
|
|
40
41
|
update_history_with_config,
|
|
41
42
|
version,
|
|
42
43
|
)
|
|
43
|
-
from mt5cli.sqlite_history import DEFAULT_HISTORY_TIMEFRAMES
|
|
44
44
|
from mt5cli.utils import Dataset
|
|
45
45
|
|
|
46
46
|
_DEALS_FIXTURE: dict[str, list[object]] = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|