Stage 07.4.3.3 — Paper Position & Execution Engineg

This commit is contained in:
2026-05-03 07:45:07 +03:00
parent bd6b40fcb2
commit 24c910fade
8 changed files with 398 additions and 8 deletions

View File

@@ -0,0 +1,32 @@
# app/src/trading/position/state.py
from __future__ import annotations
from dataclasses import dataclass
@dataclass(slots=True)
class PositionState:
# сторона позиции: NONE / LONG / SHORT
side: str = "NONE"
# торговый инструмент
symbol: str = ""
# цена входа
entry_price: float | None = None
# размер позиции
size: float | None = None
# плечо
leverage: float | None = None
# нереализованный PnL
unrealized_pnl_usd: float | None = None
# время открытия позиции
opened_at: str | None = None
# время последнего обновления позиции
updated_at: str | None = None