Add GTL price-traffic chart diagnostic

This commit is contained in:
2026-07-13 12:08:10 +02:00
parent dc1570877c
commit 4730d19694
14 changed files with 433 additions and 44 deletions
+1
View File
@@ -39,6 +39,7 @@ export function useFetchSymbolData(options: UseFetchSymbolDataOptions = {}) {
queryClient.invalidateQueries({ queryKey: ['sentiment', symbol] });
queryClient.invalidateQueries({ queryKey: ['fundamentals', symbol] });
queryClient.invalidateQueries({ queryKey: ['sr-levels', symbol] });
queryClient.invalidateQueries({ queryKey: ['gate-target-ladder', symbol] });
queryClient.invalidateQueries({ queryKey: ['scores', symbol] });
// Fetch re-runs the scanner → setups/confidence change. Refresh both the
// per-ticker trades (['trades', symbol]) and the Overview list (['trades']).
+17 -3
View File
@@ -1,12 +1,12 @@
import { useQuery } from '@tanstack/react-query';
import { getOHLCV } from '../api/ohlcv';
import { getScores } from '../api/scores';
import { getLevels } from '../api/sr-levels';
import { getGateTargetLadder, getLevels } from '../api/sr-levels';
import { getSentiment } from '../api/sentiment';
import { getFundamentals } from '../api/fundamentals';
import * as tradesApi from '../api/trades';
export function useTickerDetail(symbol: string) {
export function useTickerDetail(symbol: string, includeGateTargetLadder = false) {
const ohlcv = useQuery({
queryKey: ['ohlcv', symbol],
queryFn: () => getOHLCV(symbol),
@@ -25,6 +25,12 @@ export function useTickerDetail(symbol: string) {
enabled: !!symbol,
});
const gateTargetLadder = useQuery({
queryKey: ['gate-target-ladder', symbol],
queryFn: () => getGateTargetLadder(symbol),
enabled: !!symbol && includeGateTargetLadder,
});
const sentiment = useQuery({
queryKey: ['sentiment', symbol],
queryFn: () => getSentiment(symbol),
@@ -43,5 +49,13 @@ export function useTickerDetail(symbol: string) {
enabled: !!symbol,
});
return { ohlcv, scores, srLevels, sentiment, fundamentals, trades };
return {
ohlcv,
scores,
srLevels,
gateTargetLadder,
sentiment,
fundamentals,
trades,
};
}