auto: 일일 백업 2026-06-23 02:00
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -979,18 +979,21 @@ def get_daily_candles(code: str, count: int = 250, base_dt: str | None = None,
|
||||
|
||||
|
||||
def get_minute_candles(code: str, tic_scope: int = 5, today_only: bool = True,
|
||||
account_label: str | None = None) -> list[dict]:
|
||||
account_label: str | None = None, exchange: str = 'KRX') -> list[dict]:
|
||||
"""주식 분봉 차트 (ka10080). 수정주가 기준.
|
||||
|
||||
tic_scope: 1/3/5/10/15/30/45/60 분. 한 호출에 ~900봉 (5분봉 ≈ 11일치).
|
||||
today_only: True 면 오늘 봉만 추출.
|
||||
exchange: 'KRX'=KRX 단독(기본) / 'NX'=NXT 단독 / 'AL'=통합(KRX→NXT 연속).
|
||||
NX/AL은 stk_cd에 suffix를 붙여 NXT 시간대(15:30~20:00)에도 분봉이 이어진다.
|
||||
|
||||
반환: 시간 오름차순 list of dict — {date, time, open, high, low, close, volume}
|
||||
date='YYYYMMDD', time='HHMMSS'.
|
||||
"""
|
||||
label = account_label or _default_account_label()
|
||||
suffix = f'_{exchange}' if exchange in ('NX', 'AL') else ''
|
||||
body = {
|
||||
'stk_cd': _clean_code(code),
|
||||
'stk_cd': _clean_code(code) + suffix,
|
||||
'tic_scope': str(tic_scope),
|
||||
'upd_stkpc_tp': '1',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user