Harden trading, training, and monitoring

This commit is contained in:
Codex
2026-07-10 15:51:53 +03:00
parent 6fb79ee2a9
commit 069d75d2f2
55 changed files with 2658 additions and 2332049 deletions
+4
View File
@@ -88,6 +88,9 @@ class Position:
entry_confidence: float = 0.0
entry_pattern: str = ""
entry_diagnostics: dict[str, Any] = field(default_factory=dict)
protective_order_id: str = ""
protective_order_link_id: str = ""
mode: str = "paper"
def mark_price(self, price: float) -> float:
return self.qty * price
@@ -131,6 +134,7 @@ class Trade:
entry_diagnostics: dict[str, Any] = field(default_factory=dict)
opened_at: datetime | None = None
closed_at: datetime | None = None
mode: str = "paper"
def as_dict(self) -> dict[str, Any]:
data = asdict(self)