From 891bc274dc90e7662f0f60d6d93dd243de098172 Mon Sep 17 00:00:00 2001 From: hyowons Date: Tue, 9 Jun 2026 12:48:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B3=B4=EC=9C=A0=EC=A2=85=EB=AA=A9=20?= =?UTF-8?q?=EB=93=80=EC=96=BC=20OHLC=20=EC=82=AC=EB=9D=BC=EC=A7=90=20?= =?UTF-8?q?=E2=80=94=20=EB=B3=B4=EC=9C=A0=20KRX/NX=20=EC=8B=9C=EC=84=B8?= =?UTF-8?q?=EC=BD=9C=20=EA=B2=8C=EC=9D=B4=ED=8C=85=20=EB=90=98=EB=8F=8C?= =?UTF-8?q?=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이전 커밋에서 WS 연결 시 보유 가격보정 ka10095 2콜을 "순수 중복"으로 보고 skip했으나, 그 두 콜(KRX/NX)은 보유종목 행의 KRX·NXT 듀얼 OHLC 미니 (r['ohlc_krx']·['ohlc_nxt']) 데이터원이기도 했다. _AL 허브는 거래소별 단일 최신값만 들어 두 컬럼을 동시에 못 주므로 skip 불가 → 게이팅 제거(항상 호출). 관심·감시(단일 OHLC) 허브 충당은 그대로 유효. Co-Authored-By: Claude Opus 4.8 --- agents/stock/workspace/scripts/behive_web.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/agents/stock/workspace/scripts/behive_web.py b/agents/stock/workspace/scripts/behive_web.py index ab17347..3945e2e 100644 --- a/agents/stock/workspace/scripts/behive_web.py +++ b/agents/stock/workspace/scripts/behive_web.py @@ -1119,10 +1119,9 @@ def _fetch_all_data(entries: list[dict], only_owner: str | None = None) -> dict: held_codes_set.add(_p['code']) ohlc_map_krx: dict[str, dict] = {} ohlc_map_nxt: dict[str, dict] = {} - # WS 허브 연결 시 보유종목 현재가는 1초 실시간 스트림(KRX+NXT 통합)이 덮어쓰므로 - # 여기 ka10095 보정 2콜은 중복 → skip. 허브 콜드/끊김일 때만 REST로 보정(초기 렌더 정확도). - _rt_live = _RT_HUB is not None and _RT_HUB.is_connected() - if held_codes_set and not _rt_live: + # KRX/NX 2콜은 가격 보정뿐 아니라 보유종목 행의 KRX·NXT 듀얼 OHLC 미니(r['ohlc_krx']·['ohlc_nxt']) + # 데이터원이다. _AL 허브는 거래소별 단일 최신값만 들어 두 컬럼을 동시에 못 주므로 skip 불가 — WS 연결과 무관하게 호출. + if held_codes_set: try: ohlc_map_krx = kc.get_watchlist_quotes(list(held_codes_set), exchange='KRX') except Exception as e: