goldenChat base source add

This commit is contained in:
aidev
2026-05-23 15:11:48 +09:00
commit a4ea7762b5
2081 changed files with 1155760 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* 심리도 / 투자심리도 (업비트)
* - 심리도: N일 중 종가 상승일 비율 × 100
* - 투자심리도: N일 중 상승일 거래량 비중 × 100
*/
export const PSYCHOLOGICAL_DEFAULT_LENGTH = 12;
export const INVEST_PSYCHOLOGICAL_DEFAULT_LENGTH = 10;
/** 레거시 type → 업비트 명칭 type */
export function resolvePsychologicalIndicatorType(type: string): string {
if (type === 'NewPsychological') return 'Psychological';
return type;
}
export function normalizePsychologicalParams(
type: string,
params: Record<string, number | string | boolean>,
): Record<string, number | string | boolean> {
const defaultLen =
type === 'InvestPsychological'
? INVEST_PSYCHOLOGICAL_DEFAULT_LENGTH
: PSYCHOLOGICAL_DEFAULT_LENGTH;
const length = Math.max(1, Number(params.length ?? defaultLen) || defaultLen);
return { ...params, length };
}