feat: cockpit

This commit is contained in:
OpenSquared
2026-07-23 22:04:02 +02:00
parent cfc33d1ee3
commit 548bad2dcd
5 changed files with 165 additions and 247 deletions

View File

@@ -773,6 +773,15 @@ export const usePortfolioRiskRadar = () =>
staleTime: 5 * 60_000,
})
// Same 5-axis shape as usePortfolioRiskRadar above, computed on the REAL portfolio
// (services/database.py `portfolio` table) instead of the simulated trade log.
export const useRiskRadar = () =>
useQuery({
queryKey: ['risk-radar'],
queryFn: () => api.get('/risk/radar').then(r => r.data),
staleTime: 5 * 60_000,
})
export const useTradeCheck = () =>
useMutation({
mutationFn: (body: { underlying: string; strategy: string; asset_class: string }) =>