40 lines
1004 B
Python
40 lines
1004 B
Python
"""
|
|
Configuration settings for Signal Generation System
|
|
Pure API mode - no Redis dependency
|
|
"""
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings with validation"""
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
case_sensitive=True,
|
|
extra="ignore" # Ignore extra fields from environment
|
|
)
|
|
|
|
# Symbol Configuration
|
|
SYMBOL: str = "BTCUSDT"
|
|
|
|
# Binance API Configuration
|
|
BINANCE_API_BASE_URL: str = "https://fapi.binance.com"
|
|
|
|
# Kline intervals for multi-timeframe analysis
|
|
KLINE_INTERVALS: str = "5m,15m,1h,4h"
|
|
|
|
@property
|
|
def kline_intervals_list(self) -> list:
|
|
"""Parse kline intervals from comma-separated string"""
|
|
return [interval.strip() for interval in self.KLINE_INTERVALS.split(',')]
|
|
|
|
# Monitoring
|
|
LOG_LEVEL: str = "INFO"
|
|
|
|
# Profit filter
|
|
MIN_PROFIT_PCT: float = 1.0
|
|
PREFER_INTRADAY: bool = True
|
|
|
|
|
|
settings = Settings()
|