Files
crypto_news/config/trading_pairs.py

28 lines
722 B
Python
Raw Normal View History

2026-03-20 07:49:42 +09:00
"""Trading pair configuration and helpers."""
from dataclasses import dataclass
from typing import List
@dataclass
class TradingPairConfig:
"""Configuration for a single trading pair."""
symbol: str
min_order_size: float = 0.0
max_leverage: int = 3
enabled: bool = True
# Default pairs for MVP (Phase 1)
DEFAULT_PAIRS: List[TradingPairConfig] = [
TradingPairConfig(symbol="BTC/USDT", min_order_size=0.001),
TradingPairConfig(symbol="ETH/USDT", min_order_size=0.01),
]
def get_enabled_pairs(pairs: List[TradingPairConfig] | None = None) -> List[str]:
"""Return list of enabled symbol strings."""
source = pairs or DEFAULT_PAIRS
return [p.symbol for p in source if p.enabled]