"""Type-safe enums for the trading bot."""

from enum import Enum, auto


class OrderSide(Enum):
    """Order side (buy/sell)."""
    BUY = "buy"
    SELL = "sell"


class OrderType(Enum):
    """Order type."""
    MARKET = "market"
    LIMIT = "limit"
    STOP_LOSS = "stop_loss"
    STOP_LOSS_LIMIT = "stop_loss_limit"
    TAKE_PROFIT = "take_profit"
    TAKE_PROFIT_LIMIT = "take_profit_limit"


class OrderStatus(Enum):
    """Order status."""
    PENDING = "pending"
    OPEN = "open"
    CLOSED = "closed"
    CANCELED = "canceled"
    REJECTED = "rejected"
    EXPIRED = "expired"


class TradeType(Enum):
    """Trade type for records."""
    SPOT = "spot"
    MARGIN = "margin"
    FUTURES = "futures"


class Signal(Enum):
    """Trading signal from strategy."""
    BUY = "buy"
    SELL = "sell"
    HOLD = "hold"
    FLAT = "flat"  # Close all positions


class ExchangeName(Enum):
    """Supported exchanges."""
    KRAKEN = "kraken"
    BINANCE = "binance"
    COINBASE = "coinbase"


class BotMode(Enum):
    """Bot operating mode."""
    DRY_RUN = "dry_run"  # Paper trading
    LIVE = "live"  # Real trading
    WATCH = "watch"  # Monitor only, no trading
