| """ | |
| Signal Engine Configuration | |
| Environment-based configuration with Pydantic Settings | |
| """ | |
| from pydantic_settings import BaseSettings | |
| from typing import Optional | |
| class Settings(BaseSettings): | |
| # Database | |
| database_url: str = "sqlite:///signal_engine.db" | |
| # Gate.io API | |
| gateio_api_url: str = "https://api.gateio.ws/api/v4" | |
| # Model Settings | |
| min_price: float = 0.10 | |
| min_volume_24h: float = 50000.0 | |
| volatility_window: int = 20 | |
| rsi_period: int = 14 | |
| # Scoring | |
| maker_fee_bps: float = 2.0 | |
| hypothetical_spread_bps: float = 5.0 | |
| # API | |
| api_host: str = "0.0.0.0" | |
| api_port: int = 8000 | |
| api_prefix: str = "/v1" | |
| # Security | |
| secret_key: str = "change-me-in-production" | |
| stripe_webhook_secret: Optional[str] = None | |
| # Rate Limiting | |
| free_tier_rate_limit: int = 10 | |
| pro_tier_rate_limit: int = 100 | |
| enterprise_tier_rate_limit: int = 1000 | |
| class Config: | |
| env_file = ".env" | |
| env_file_encoding = "utf-8" | |
| settings = Settings() | |