78c49238cf
* feat: add stable MT5Client public API and infrastructure layer Introduce a reusable public API for downstream trading applications: - MT5Client as the primary client abstraction with order_check/order_send - schemas module with DataKind contracts, validation, and normalization - converters, exceptions, retry, and storage facade modules - CLI order commands now route through MT5Client - connected_client made public; retry logic centralized - Contract tests for API surface, schemas, and storage round-trips - README and docs updated with Python API usage examples Co-authored-by: Daichi Narushima <dceoy@users.noreply.github.com> * fix: correct time coercion, broker-safe symbols, and execution docs - Normalize MT5 time columns with correct second/millisecond units - Coerce all present known MT5 time fields, including optional order times - Preserve broker symbol casing in normalize_symbol() - Document order_send() as a live execution primitive with clear scope boundaries - Add contract tests for timestamp and symbol normalization behavior Co-authored-by: Daichi Narushima <dceoy@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Daichi Narushima <dceoy@users.noreply.github.com>
50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
"""Generic storage helpers for MT5 market and account history."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .history import (
|
|
RateTarget,
|
|
build_rate_targets,
|
|
build_rate_view_name,
|
|
drop_forming_rate_bar,
|
|
load_rate_data,
|
|
load_rate_data_from_connection,
|
|
load_rate_series_by_granularity,
|
|
load_rate_series_from_sqlite,
|
|
resolve_rate_tables,
|
|
resolve_rate_view_name,
|
|
resolve_rate_view_names,
|
|
)
|
|
from .sdk import collect_history, update_history, update_history_with_config
|
|
from .utils import (
|
|
Dataset,
|
|
IfExists,
|
|
OutputFormat,
|
|
detect_format,
|
|
export_dataframe,
|
|
export_dataframe_to_sqlite,
|
|
)
|
|
|
|
__all__ = [
|
|
"Dataset",
|
|
"IfExists",
|
|
"OutputFormat",
|
|
"RateTarget",
|
|
"build_rate_targets",
|
|
"build_rate_view_name",
|
|
"collect_history",
|
|
"detect_format",
|
|
"drop_forming_rate_bar",
|
|
"export_dataframe",
|
|
"export_dataframe_to_sqlite",
|
|
"load_rate_data",
|
|
"load_rate_data_from_connection",
|
|
"load_rate_series_by_granularity",
|
|
"load_rate_series_from_sqlite",
|
|
"resolve_rate_tables",
|
|
"resolve_rate_view_name",
|
|
"resolve_rate_view_names",
|
|
"update_history",
|
|
"update_history_with_config",
|
|
]
|