feat: saxo
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user