feat: 국내주식 지정가 전환 및 미체결 처리 (#232) #233
Reference in New Issue
Block a user
Delete Branch "feature/issue-232-domestic-limit-order-pending"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
KISBroker에get_domestic_pending_orders()(TTTC0084R, 실전전용/모의 즉시[]) 및cancel_domestic_order()(실전 TTTC0013U / 모의 VTTC0013U) 추가price=0→ 지정가 전환 (2곳): BUY +0.2% / SELL -0.2%,kr_round_downKRX 틱 반올림 적용handle_domestic_pending_orders함수 추가 및 daily/realtime 두 모드에서 호출세부 구현
src/broker/kis_api.pyget_domestic_pending_orders(): 모의 즉시[], 실전TTTC0084RGET 호출cancel_domestic_order(): 실전TTTC0013U/ 모의VTTC0013U, hashkey 필수,KRX_FWDG_ORD_ORGNO+ORGN_ODNO포함src/main.pykr_round_down추가trading_cycle국내 주문:price=0→kr_round_down(price * 1.002/0.998)run_daily_session국내 주문: 동일handle_domestic_pending_orders: BUY→취소+쿨다운, SELL→취소+재주문(-0.4%, 최대1회)테스트 (14개 신규)
test_broker.py:TestGetDomesticPendingOrders3개 +TestCancelDomesticOrder5개test_main.py:TestHandleDomesticPendingOrders4개 +TestDomesticLimitOrderPrice2개Test plan
pytest tests/test_broker.py -k "Domestic"— 8개 통과pytest tests/test_main.py -k "Domestic"— 14개 통과pytest --cov=src -q— 859 passed, 78% coverageruff check src/broker/kis_api.py— All checks passedmypy src/broker/kis_api.py src/main.py --strict— 기존 오류만 (신규 없음)Closes #232
🤖 Generated with Claude Code