feat: saxo

This commit is contained in:
OpenSquared
2026-07-18 22:20:33 +02:00
parent b0b7f9bfda
commit 0d3a6a6fad
5 changed files with 93 additions and 1 deletions

View File

@@ -1701,6 +1701,14 @@ export const useUpdateSaxoWatchlist = () => {
})
}
export const useExpandSaxoWatchlist = () => {
const qc = useQueryClient()
return useMutation({
mutationFn: (keyword: string) => api.post('/saxo/watchlist/expand', { keyword }).then(r => r.data as { symbols: string[]; added: string[] }),
onSuccess: () => qc.invalidateQueries({ queryKey: ['saxo-watchlist'] }),
})
}
export const useSnapshotSaxoNow = () =>
useMutation({
mutationFn: (symbol: string) => api.post(`/saxo/snapshot-now/${encodeURIComponent(symbol)}`).then(r => r.data),