feat: instrument analysis
This commit is contained in:
@@ -200,6 +200,17 @@ export const useSetWatchlistSaxoQuoteLink = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// Links an Instrument Analysis instrument (backend/config/instruments.json — a separate
|
||||
// catalog from instruments_watchlist above) to a Saxo quote symbol, so its chart/indicators/
|
||||
// wavelets are Saxo-sourced instead of yfinance. InstrumentDashboard.tsx doesn't use React
|
||||
// Query for its own data (plain axios + useState), so this mutation carries no
|
||||
// invalidateQueries — the caller re-fetches the instrument list/snapshot itself on success.
|
||||
export const useSetInstrumentSaxoLink = () =>
|
||||
useMutation({
|
||||
mutationFn: ({ instrumentId, saxoSymbol }: { instrumentId: string; saxoSymbol: string | null }) =>
|
||||
api.put(`/instruments/${encodeURIComponent(instrumentId)}/saxo-link`, { saxo_symbol: saxoSymbol }).then(r => r.data),
|
||||
})
|
||||
|
||||
// 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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user