fix: 보유종목 듀얼 OHLC 사라짐 — 보유 KRX/NX 시세콜 게이팅 되돌림

이전 커밋에서 WS 연결 시 보유 가격보정 ka10095 2콜을 "순수 중복"으로 보고
skip했으나, 그 두 콜(KRX/NX)은 보유종목 행의 KRX·NXT 듀얼 OHLC 미니
(r['ohlc_krx']·['ohlc_nxt']) 데이터원이기도 했다. _AL 허브는 거래소별 단일
최신값만 들어 두 컬럼을 동시에 못 주므로 skip 불가 → 게이팅 제거(항상 호출).
관심·감시(단일 OHLC) 허브 충당은 그대로 유효.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hyowons
2026-06-09 12:48:06 +09:00
parent 79c6647431
commit 891bc274dc
+3 -4
View File
@@ -1119,10 +1119,9 @@ def _fetch_all_data(entries: list[dict], only_owner: str | None = None) -> dict:
held_codes_set.add(_p['code']) held_codes_set.add(_p['code'])
ohlc_map_krx: dict[str, dict] = {} ohlc_map_krx: dict[str, dict] = {}
ohlc_map_nxt: dict[str, dict] = {} ohlc_map_nxt: dict[str, dict] = {}
# WS 허브 연결 시 보유종목 현재가는 1초 실시간 스트림(KRX+NXT 통합)이 덮어쓰므로 # KRX/NX 2콜은 가격 보정뿐 아니라 보유종목 행의 KRX·NXT 듀얼 OHLC 미니(r['ohlc_krx']·['ohlc_nxt'])
# 여기 ka10095 보정 2콜은 중복 → skip. 허브 콜드/끊김일 때만 REST로 보정(초기 렌더 정확도). # 데이터원이다. _AL 허브는 거래소별 단일 최신값만 들어 두 컬럼을 동시에 못 주므로 skip 불가 — WS 연결과 무관하게 호출.
_rt_live = _RT_HUB is not None and _RT_HUB.is_connected() if held_codes_set:
if held_codes_set and not _rt_live:
try: try:
ohlc_map_krx = kc.get_watchlist_quotes(list(held_codes_set), exchange='KRX') ohlc_map_krx = kc.get_watchlist_quotes(list(held_codes_set), exchange='KRX')
except Exception as e: except Exception as e: