44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
# Database
|
|
database_url: str = "postgresql+asyncpg://stock_backend:changeme@localhost:5432/stock_data_backend"
|
|
|
|
# Auth
|
|
jwt_secret: str = "change-this-to-a-random-secret"
|
|
jwt_expiry_minutes: int = 60
|
|
|
|
# OHLCV Provider — Alpaca Markets
|
|
alpaca_api_key: str = ""
|
|
alpaca_api_secret: str = ""
|
|
|
|
# Sentiment Provider — Gemini with Search Grounding
|
|
gemini_api_key: str = ""
|
|
gemini_model: str = "gemini-2.0-flash"
|
|
|
|
# Fundamentals Provider — Financial Modeling Prep
|
|
fmp_api_key: str = ""
|
|
|
|
# Scheduled Jobs
|
|
data_collector_frequency: str = "daily"
|
|
sentiment_poll_interval_minutes: int = 30
|
|
fundamental_fetch_frequency: str = "daily"
|
|
rr_scan_frequency: str = "daily"
|
|
|
|
# Scoring Defaults
|
|
default_watchlist_auto_size: int = 10
|
|
default_rr_threshold: float = 3.0
|
|
|
|
# Database Pool
|
|
db_pool_size: int = 5
|
|
db_pool_timeout: int = 30
|
|
|
|
# Logging
|
|
log_level: str = "INFO"
|
|
|
|
|
|
settings = Settings()
|