feat: cockpit
This commit is contained in:
@@ -919,6 +919,31 @@ export const useIvForTrade = (underlying: string) =>
|
||||
staleTime: 60 * 60_000,
|
||||
})
|
||||
|
||||
// ── Saxo-only IV analytics (Options Lab "Saxo" section) — computed from our own
|
||||
// accumulated saxo_option_snapshots, never blended with the yfinance-based hooks above ──
|
||||
export const useSaxoIvWatchlist = () =>
|
||||
useQuery({
|
||||
queryKey: ['saxo-iv-watchlist'],
|
||||
queryFn: () => api.get('/saxo/iv-watchlist').then(r => r.data),
|
||||
staleTime: 5 * 60_000,
|
||||
})
|
||||
|
||||
export const useSaxoIvSnapshot = (symbol: string) =>
|
||||
useQuery({
|
||||
queryKey: ['saxo-iv-snapshot', symbol],
|
||||
queryFn: () => api.get(`/saxo/iv-snapshot/${encodeURIComponent(symbol)}`).then(r => r.data),
|
||||
enabled: !!symbol,
|
||||
staleTime: 5 * 60_000,
|
||||
})
|
||||
|
||||
export const useSaxoIvHistory = (symbol: string, days = 90) =>
|
||||
useQuery({
|
||||
queryKey: ['saxo-iv-history', symbol, days],
|
||||
queryFn: () => api.get(`/saxo/iv-history/${encodeURIComponent(symbol)}`, { params: { days } }).then(r => r.data),
|
||||
enabled: !!symbol,
|
||||
staleTime: 5 * 60_000,
|
||||
})
|
||||
|
||||
// ── Analytics Phase 4 — Bayesian + Clustering + Embeddings ───────────────────
|
||||
|
||||
export const useBayesianPosteriors = () =>
|
||||
|
||||
Reference in New Issue
Block a user