import type { Timeframe } from '../types';

/** 차트 Timeframe → 백엔드 candleType */
export function timeframeToCandleType(tf: Timeframe): string {
  switch (tf) {
    case '1m': case '3m': case '5m': case '15m': case '30m': case '1h': case '4h':
      return tf;
    case '1D': return '1d';
    case '1W': case '1M': return '1d';
    default: return '1m';
  }
}
