feat: wavelets

This commit is contained in:
OpenSquared
2026-07-24 16:14:06 +02:00
parent 7cb81cbd65
commit adfe520863
5 changed files with 172 additions and 1 deletions

View File

@@ -211,6 +211,35 @@ def wavelet_reliability_endpoint(
return result
# ── Watchlist refresh scheduler — Saxo-priced quotes + wavelet recompute, own cadence ──
# ── (services/wavelet_scheduler.py), independent of the once-a-day auto_cycle ─────────
class RefreshSettingsRequest(BaseModel):
enabled: bool
refresh_minutes: float
@router.get("/refresh-settings")
def get_refresh_settings():
from services.wavelet_scheduler import get_settings
return get_settings()
@router.put("/refresh-settings")
def update_refresh_settings(req: RefreshSettingsRequest):
from services.wavelet_scheduler import set_settings, get_settings
set_settings(req.enabled, req.refresh_minutes)
return get_settings()
@router.post("/refresh-now")
def refresh_now():
"""Manual immediate refresh of the whole Watchlist (Saxo-priced quotes + wavelet
recompute) — doesn't wait for the periodic poll."""
from services.wavelet_scheduler import run_refresh_pass
return {"signal_rows": run_refresh_pass()}
# ── Saved simulation/optimization runs ────────────────────────────────────────
class SimulationCreate(BaseModel):