INNER CODE UNIT · Python

OrderCommand

codedpro/mt5-trade-split-manager · server.py:51

class OrderCommand(BaseModel):
    action: str = "PLACE_ORDER"
    order_type: str
    symbol: str
    price: float
    sl: float
    tp_levels: List[float]
    volume_split: Optional[List[float]] = None
    lot_size: float = 0.1
    deviation: int = 3
    comment: str = "Claude AI"
    magic_number: int = 20250117

    @field_validator("tp_levels")
    @classmethod
    def _validate_tp_levels(cls, v: List[float]) -> List[float]:
        if not 1 <= len(v) <= 10:
            raise ValueError(f"tp_levels must contain 1 to 10 prices (got {len(v)})")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…