feat(execution): AccountOrderWorker로 매수·매도 주문 직렬화
전략별 tick/scan 매도 락 대신 계좌 단일 PriorityQueue로 place를 B-full 직렬화한다. 틱매도 only_code 필터와 inflight 중복 enqueue 방지로 REST 폭주를 줄인다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -746,7 +746,7 @@ def run_validation() -> bool:
|
||||
else:
|
||||
_성공("LS 3차 폴백 구독 _sync_feed_fallback_to_ls")
|
||||
|
||||
rec_src = inspect.getsource(WSManager._reconcile_split_subscriptions)
|
||||
rec_src = inspect.getsource(WSManager._reconcile_split_subscriptions_locked)
|
||||
if "_finalize_ls_subscriptions" not in rec_src:
|
||||
실패목록.append("split reconcile LS finalize 없음")
|
||||
_실패("_reconcile_split_subscriptions 가 _finalize_ls_subscriptions 를 안 부름")
|
||||
@@ -890,7 +890,7 @@ def run_validation() -> bool:
|
||||
_성공("후보 LS 갭 REST 는 LS_GAP_FILL_CANDIDATES 가드")
|
||||
|
||||
# 갭 집합에 perm 합집합 금지 (후보|보유만)
|
||||
recon_src = inspect.getsource(WSManager._reconcile_split_subscriptions)
|
||||
recon_src = inspect.getsource(WSManager._reconcile_split_subscriptions_locked)
|
||||
if "_gap_refill_codes = set(kis_want) | set(kw_want) | perm" in recon_src:
|
||||
실패목록.append("갭보정에 영구구독 포함")
|
||||
_실패("_gap_refill_codes 가 영구구독(perm)을 포함함 — ls_ws_candles 전용이어야 함")
|
||||
@@ -1219,27 +1219,38 @@ def run_validation() -> bool:
|
||||
|
||||
_파일필수(
|
||||
실패목록,
|
||||
"kis_trader/strategies/base.py",
|
||||
"TICK_SELL_ASYNC_PLACE",
|
||||
"틱매도 place 비동기(수신스레드 REST 금지)",
|
||||
"kis_trader/execution/order_worker.py",
|
||||
"AccountOrderWorker",
|
||||
"계좌 단일 주문 큐 Worker",
|
||||
)
|
||||
_파일필수(
|
||||
실패목록,
|
||||
"kis_trader/strategies/base.py",
|
||||
"_tick_sell_worker_loop",
|
||||
"틱매도 워커",
|
||||
"_enqueue_sell",
|
||||
"매도 signal → OrderWorker",
|
||||
)
|
||||
_파일필수(
|
||||
실패목록,
|
||||
"kis_trader/strategies/base.py",
|
||||
"_enqueue_buy",
|
||||
"매수 signal → OrderWorker",
|
||||
)
|
||||
_파일필수(
|
||||
실패목록,
|
||||
"kis_trader/strategies/base.py",
|
||||
"_sell_inflight",
|
||||
"틱·루프 종목당 매도 1장",
|
||||
"틱·루프 종목당 매도 intent 1장",
|
||||
)
|
||||
if "ORDER_WORKER_MAX_QUEUE" not in ENV_CONFIG_KEYS:
|
||||
실패목록.append("ENV 누락 ORDER_WORKER_MAX_QUEUE")
|
||||
_실패("ENV_CONFIG_KEYS 에 ORDER_WORKER_MAX_QUEUE 없음")
|
||||
else:
|
||||
_성공("ORDER_WORKER_MAX_QUEUE env 등록")
|
||||
if "TICK_SELL_ASYNC_PLACE" not in ENV_CONFIG_KEYS:
|
||||
실패목록.append("ENV 누락 TICK_SELL_ASYNC_PLACE")
|
||||
_실패("ENV_CONFIG_KEYS 에 TICK_SELL_ASYNC_PLACE 없음")
|
||||
else:
|
||||
_성공("TICK_SELL_ASYNC_PLACE env 등록")
|
||||
_성공("TICK_SELL_ASYNC_PLACE env 등록 (레거시·틱 place는 OrderWorker 경유)")
|
||||
|
||||
_소스필수(
|
||||
실패목록, KISWebSocketPriceCache._get_approval_key,
|
||||
|
||||
Reference in New Issue
Block a user