From e95e2b3f3a1e6ed3fede7c09f397c8c6269fcdec Mon Sep 17 00:00:00 2001 From: hyowons Date: Fri, 12 Jun 2026 15:05:35 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A7=A4=EB=8F=84=20=EC=8B=9C=20?= =?UTF-8?q?=EA=B0=99=EC=9D=80=20=EA=B7=B8=EB=A3=B9=202=EA=B3=84=EC=A2=8C?= =?UTF-8?q?=20=EB=8F=99=EC=8B=9C=20=EB=A7=A4=EB=8F=84=20(=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=201=EC=9E=A5+PIN=201=EA=B0=9C,=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=20=ED=8C=9D=EC=97=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - orders/handler.py: propose_trade_multi (레그별 독립 검증, 같은 소유자 그룹만, SELL+LIMIT/MARKET 한정) + submit_with_pin multi 분기 _submit_multi_legs (레그 독립 제출·독립 fill_watcher, 한 레그 실패해도 나머지 시도) - orders/card.py: format_card_multi (레그별 계좌·수량·예상회수 + 합계) - behive_web.py: POST /api/order/propose_multi (PIN은 iMessage '매도(2계좌)'), sell-choice-modal (두 계좌 모두 / 선택 계좌만 / 취소), doPropose SELL 분기 (accStatus로 sibling 보유 감지 → 팝업, sibling 수량은 보유 전량) - fix: /api/order/cancel 응답이 dict를 PendingCard로 취급해 매번 500 나던 기존 버그 (취소 자체는 동작, 응답만 깨짐) Co-Authored-By: Claude Opus 4.8 --- agents/stock/workspace/scripts/behive_web.py | 176 +++++++++++++++++- agents/stock/workspace/scripts/orders/card.py | 41 ++++ .../stock/workspace/scripts/orders/handler.py | 161 ++++++++++++++++ 3 files changed, 371 insertions(+), 7 deletions(-) diff --git a/agents/stock/workspace/scripts/behive_web.py b/agents/stock/workspace/scripts/behive_web.py index e7bce2d..86e886b 100644 --- a/agents/stock/workspace/scripts/behive_web.py +++ b/agents/stock/workspace/scripts/behive_web.py @@ -6290,6 +6290,29 @@ def _render_pin_modal() -> str: ) +def _render_sell_choice_modal() -> str: + """매도 시 같은 소유자 그룹의 다른 계좌에도 같은 종목 보유 중일 때 띄우는 선택 팝업. + + [두 계좌 모두 매도] / [선택 계좌만 매도] / [취소] 3버튼. order-modal 위에 겹침(modal-top). + """ + return ( + '' + ) + + def _render_interests_modal() -> str: """shell HTML 직속에 두는 종목 추가 모달. panels API의 swap 영역(section.tab-content) 밖이라 자동 갱신 중에도 DOM·입력값이 보존된다.""" @@ -7676,6 +7699,7 @@ def render_html() -> str: info_desc_modal_html = _render_info_desc_modal() order_modal_html = _render_order_modal() pin_modal_html = _render_pin_modal() + sell_choice_modal_html = _render_sell_choice_modal() open_orders_modal_html = _render_open_orders_modal() stock_name_modal_html = _render_stock_name_modal() @@ -8485,6 +8509,7 @@ def render_html() -> str: order_modal_script = r'''