feat: cockpit
This commit is contained in:
@@ -219,6 +219,16 @@ export const useSetInstrumentSaxoLink = () =>
|
||||
api.put(`/instruments/${encodeURIComponent(instrumentId)}/saxo-link`, { saxo_symbol: saxoSymbol }).then(r => r.data),
|
||||
})
|
||||
|
||||
// Brings a Cockpit Watchlist ticker into Instrument Analysis without hand-authoring an
|
||||
// instruments.json entry — its saxo_quote_symbol (already linked in Config -> Instruments
|
||||
// Watchlist) is copied over automatically. Idempotent: a ticker that already resolves
|
||||
// (real catalog entry or an earlier quick add) is returned unchanged.
|
||||
export const useQuickAddInstrument = () =>
|
||||
useMutation({
|
||||
mutationFn: (ticker: string) =>
|
||||
api.post('/instruments/quick-add', { ticker }).then(r => r.data as { id: string; created: boolean }),
|
||||
})
|
||||
|
||||
// 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