ls증권 히스토리 구독 넣음
This commit is contained in:
20
kis_trader/engine/ls_feed_gate.py
Normal file
20
kis_trader/engine/ls_feed_gate.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""LS 시세 복구 중 신규매수 게이트 (선택).
|
||||
|
||||
LS 는 기본 그림자 검증만 하므로 ``LS_WS_BLOCK_BUY_WHILE_RECOVERING`` 기본 false.
|
||||
거부권/보조눈 연동 시 true 로 켜면, 복구·끊김 동안 신규매수만 막는다 (청산은 막지 않음).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def ls_feed_blocks_new_buy() -> bool:
|
||||
try:
|
||||
from kis_trader.utils.env import get_env_bool
|
||||
if not get_env_bool("LS_WS_BLOCK_BUY_WHILE_RECOVERING", False):
|
||||
return False
|
||||
from kis_trader.ws.ls_ws import get_active_ls_ws
|
||||
ws = get_active_ls_ws()
|
||||
if ws is None:
|
||||
return False
|
||||
return bool(ws.blocks_new_buy())
|
||||
except Exception:
|
||||
return False
|
||||
Reference in New Issue
Block a user