앱 실시간 차트 갱신오류 수정
This commit is contained in:
@@ -10,7 +10,7 @@ import { getCandleStart, TF_SECONDS } from '../utils/upbitApi';
|
||||
import { DISPLAY_COUNT, WARMUP_COUNT, OBV_DEEP_HISTORY } from './useUpbitData';
|
||||
import type { WsStatus } from './useUpbitData';
|
||||
import { fetchBacktestHistoryCandles } from '../utils/backtestWarmup';
|
||||
import { API_BASE } from '../utils/backendApi';
|
||||
import { pinCandleWatch } from '../utils/backendApi';
|
||||
|
||||
/** 백엔드 BarBuilder 는 틱마다 1m 만 STOMP 발행 — 차트 분봉은 클라이언트에서 집계 */
|
||||
const STOMP_TICK_CANDLE_TYPE = '1m';
|
||||
@@ -28,13 +28,7 @@ function resolveChartBarTime(
|
||||
}
|
||||
|
||||
async function pinChartWatch(market: string, candleType: string): Promise<void> {
|
||||
try {
|
||||
await fetch(`${API_BASE}/candles/watch?market=${encodeURIComponent(market)}&type=${encodeURIComponent(candleType)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
} catch {
|
||||
/* watch 실패해도 STOMP 구독은 계속 */
|
||||
}
|
||||
await pinCandleWatch(market, candleType);
|
||||
}
|
||||
|
||||
interface StompCandlePayload {
|
||||
|
||||
Reference in New Issue
Block a user