from pydantic_settings import BaseSettings class Settings(BaseSettings): database_url: str frontend_url: str = "http://localhost:3001" truth_social_rss: str = "https://truthsocial.com/@realDonaldTrump.rss" truth_social_poll_seconds: int = 15 binance_ws_url: str = ( "wss://data-stream.binance.vision/stream" "?streams=btcusdt@kline_1m/ethusdt@kline_1m" ) binance_rest_url: str = "https://data-api.binance.vision" environment: str = "production" ai_api_key: str = "" ai_base_url: str = "https://api.deepseek.com/v1" ai_model: str = "deepseek-v4-pro" # batch / reanalysis (quality over speed) ai_live_model: str = "deepseek-v4-flash" # live post analysis (latency-sensitive, ~2s) # Native Anthropic API key — if set, takes priority over ai_api_key + ai_base_url. # Get from https://console.anthropic.com → API Keys anthropic_api_key: str = "" # Hyperliquid — API wallet private key (NOT your MetaMask key) # Created at https://app.hyperliquid.xyz/API and authorized by MetaMask hl_api_private_key: str = "" # Your MetaMask address — this is the actual account holding USDC/positions hl_account_address: str = "" # BTC perp leverage (1–50x isolated margin) hl_leverage: int = 3 # Trade mainnet (True) or testnet (False) hl_mainnet: bool = True # KEK for envelope-encrypting HL API keys at rest. # Generate with: openssl rand -hex 32 encryption_key: str = "" # Shared secret for /api/signals/ingest — external trading modules pass it # in the X-Ingest-Key header. Empty (default) = ingest endpoint is REJECTED # entirely until a key is configured (fail-closed). ingest_api_key: str = "" # Glassnode on-chain data. Used only by the BTC bottom-reversal state # machine (MVRV-Z + STH-SOPR). Empty = scanner logs and skips fail-closed. glassnode_api_key: str = "" # Etherscan API key — free at etherscan.io/register → My API Keys. # Used for KOL A-tier: fetch all ERC-20 token balances for a given ETH address. # Empty = skip Ethereum wallet snapshots (only HL perp positions polled). etherscan_api_key: str = "" # ── Telegram push alerts ───────────────────────────────────────────────── # Bot token from @BotFather (https://t.me/BotFather → /newbot). Free. # Empty (default) = Telegram alerts disabled completely (bot loop skipped, # notify_signal becomes a no-op, API endpoints return 503). telegram_bot_token: str = "" # Bot username (no @) — used by the Settings UI to render the deep link # t.me/?start=. Example: "trumpalpha_bot". telegram_bot_username: str = "" model_config = {"env_file": ".env", "env_file_encoding": "utf-8", "extra": "ignore"} settings = Settings()