33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
from dotenv import load_dotenv
|
|
import os
|
|
|
|
load_dotenv()
|
|
|
|
class Settings:
|
|
alpaca_key = os.getenv("ALPACA_API_KEY", "")
|
|
alpaca_secret = os.getenv("ALPACA_API_SECRET", "")
|
|
alpaca_base = os.getenv("ALPACA_BASE_URL", "https://paper-api.alpaca.markets")
|
|
paper_mode = os.getenv("PAPER_MODE", "true").lower() == "true"
|
|
|
|
max_order_usd = float(os.getenv("MAX_ORDER_USD", "5"))
|
|
max_daily_notional = float(os.getenv("MAX_DAILY_NOTIONAL", "50"))
|
|
max_open_positions = int(os.getenv("MAX_OPEN_POSITIONS", "6"))
|
|
min_confidence = float(os.getenv("MIN_CONFIDENCE", "0.60"))
|
|
|
|
trade_interval_hours = int(os.getenv("TRADE_INTERVAL_HOURS", "2"))
|
|
curate_interval_minutes = int(os.getenv("CURATE_INTERVAL_MINUTES", "30"))
|
|
timezone = os.getenv("TIMEZONE", "America/Los_Angeles")
|
|
|
|
ollama_url = os.getenv("OLLAMA_URL", "http://10.30.20.110:11434")
|
|
ollama_model = os.getenv("OLLAMA_MODEL", "gemma3:latest")
|
|
|
|
searx_url = os.getenv("SEARX_URL", "http://10.30.20.35:6969/search")
|
|
scraper_api = os.getenv("SCRAPER_API_URL", "http://10.30.20.115:24125")
|
|
|
|
db_path = os.getenv("DB_PATH", "sqlite:///./bot.db")
|
|
host = os.getenv("APP_HOST", "0.0.0.0")
|
|
port = int(os.getenv("APP_PORT", "8089"))
|
|
symbols = [s.strip().upper() for s in os.getenv("SYMBOLS", "SPY,QQQ").split(",") if s.strip()]
|
|
|
|
settings = Settings()
|