테마 적용
This commit is contained in:
@@ -865,9 +865,27 @@ export async function getDomesticChart(
|
||||
);
|
||||
rawRows = parseOutput2Rows(response);
|
||||
|
||||
// 오늘 데이터 다음은 '어제 마감'
|
||||
const todayYmd = nowYmdInKst();
|
||||
nextCursor = shiftYmd(todayYmd, -1) + "153000";
|
||||
// 초기 조회는 "오늘 가장 오래된 분봉" 기준으로 같은 날 이전 분봉을 우선 이어 붙입니다.
|
||||
const oldestRow = rawRows[rawRows.length - 1];
|
||||
const oldestTimeRaw = oldestRow
|
||||
? readRowString(oldestRow, "stck_cntg_hour", "STCK_CNTG_HOUR")
|
||||
: "";
|
||||
const oldestDateRaw = oldestRow
|
||||
? readRowString(oldestRow, "stck_bsop_date", "STCK_BSOP_DATE")
|
||||
: "";
|
||||
const oldestTime = /^\d{6}$/.test(oldestTimeRaw)
|
||||
? oldestTimeRaw
|
||||
: /^\d{4}$/.test(oldestTimeRaw)
|
||||
? `${oldestTimeRaw}00`
|
||||
: "";
|
||||
const oldestDate = /^\d{8}$/.test(oldestDateRaw)
|
||||
? oldestDateRaw
|
||||
: nowYmdInKst();
|
||||
|
||||
nextCursor =
|
||||
oldestTime && Number(oldestTime) > 90000
|
||||
? oldestDate + subOneMinute(oldestTime)
|
||||
: shiftYmd(oldestDate, -1) + "153000";
|
||||
}
|
||||
|
||||
const candles = mergeCandlesByTimestamp(
|
||||
|
||||
Reference in New Issue
Block a user