전략알림 수정

This commit is contained in:
Macbook
2026-05-27 16:51:57 +09:00
parent d7ceb8cbfd
commit aca895e9fd
13 changed files with 701 additions and 123 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
import { loadStrategyTimeframes, pinCandleWatch } from './backendApi';
import { loadStrategyTimeframes, pinCandleWatch, repairStrategyTimeframes } from './backendApi';
import { normalizeStartCandleType } from './strategyStartNodes';
/** 전략 DSL 평가 분봉 전체 pin — 1m 집계·상위 봉 warm-up */
@@ -6,6 +6,11 @@ export async function pinStrategyEvaluationTimeframes(
market: string,
strategyId: number,
): Promise<string[]> {
try {
await repairStrategyTimeframes(strategyId);
} catch {
/* 서버 미배포·권한 등 — timeframes 조회만 진행 */
}
const raw = await loadStrategyTimeframes(strategyId);
const timeframes = [...new Set(raw.map(tf => normalizeStartCandleType(tf)))];
if (timeframes.length === 0) timeframes.push('1m');