fix: overseas order uses limit price, not hardcoded 0 (#149) #150
Reference in New Issue
Block a user
Delete Branch "feature/issue-149-overseas-limit-order-price"
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?
문제 요약 (Issue #149)
Issue #147 수정 이후 해외주식 주문이 전송되기 시작했으나 KIS VTS가 거부:
근본 원인
trading_cycle()(line 513)과run_daily_session()(line 922)에서해외주식 주문 시
price=0.0하드코딩 → 시장가(ORD_DVSN="01") 전송.KIS VTS는 해외주식 모의투자에서 시장가 주문을 거부하고 지정가만 허용.
Fix #147에서 이미
current_price를 올바르게 계산하고 있었으나 (get_overseas_price()exchange code 매핑 + candidate.price 폴백), 이 값이
send_overseas_order()호출 시사용되지 않았음.
변경 내용
src/main.pytrading_cycle(),run_daily_session()해외 주문에price=0.0→price=current_pricetests/test_main.pytest_overseas_buy_order_uses_limit_price추가 (가격 182.5 전달 검증)참고
send_order())은price=0유지 — KRX는 시장가 허용테스트 결과
Closes #149