feat: curve regime
This commit is contained in:
@@ -66,6 +66,16 @@ def watchlist_quotes():
|
||||
return {"items": items}
|
||||
|
||||
|
||||
@router.get("/curve-regimes")
|
||||
def watchlist_curve_regimes():
|
||||
"""Cached Curve Regime classification (services.curve_regime) per Watchlist instrument —
|
||||
refreshed on the same cadence as the wavelet cache (services.wavelet_scheduler), not a
|
||||
live call. Every Watchlist ticker is represented, with a null-regime placeholder for any
|
||||
never successfully classified yet."""
|
||||
from services.database import get_all_curve_regime_cache
|
||||
return {"items": get_all_curve_regime_cache()}
|
||||
|
||||
|
||||
_HISTORY_PERIODS = {
|
||||
"1w": {"yf": "5d", "days": 7},
|
||||
"1m": {"yf": "1mo", "days": 30},
|
||||
|
||||
Reference in New Issue
Block a user