feat: saxo price
This commit is contained in:
@@ -182,6 +182,20 @@ export const useSetWatchlistSaxoQuoteLink = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// Free-form display name — no longer tied to yfinance's long_name lookup, since an
|
||||
// instrument can now be entirely Saxo-sourced.
|
||||
export const useRenameWatchlistInstrument = () => {
|
||||
const qc = useQueryClient()
|
||||
return useMutation({
|
||||
mutationFn: ({ ticker, name }: { ticker: string; name: string }) =>
|
||||
api.put(`/watchlist/${encodeURIComponent(ticker)}/name`, { name }).then(r => r.data),
|
||||
onSuccess: () => {
|
||||
qc.invalidateQueries({ queryKey: ['instruments-watchlist'] })
|
||||
qc.invalidateQueries({ queryKey: ['instruments-watchlist-quotes'] })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// Latest cycle report — shares the 'cycle-report-latest' queryKey with RapportIA.tsx
|
||||
export const useLatestCycleReport = () =>
|
||||
useQuery({
|
||||
|
||||
Reference in New Issue
Block a user