fix: 해외 매수가능금액 ord_psbl_frcr_amt → ovrs_ord_psbl_amt 교체 (#269)
Some checks failed
CI / test (pull_request) Has been cancelled

외화 예수금만 반영하는 ord_psbl_frcr_amt 대신
미결제 매도 대금(sll_ruse_psbl_amt)을 포함하는
ovrs_ord_psbl_amt (앱 '외화' 기준 통합 주문가능금액)를 사용하도록 수정.

실제 API 응답 확인:
  ord_psbl_frcr_amt  = $139.25  (외화 예수금만)
  sll_ruse_psbl_amt  = $7292.70 (미결제 매도 대금)
  ovrs_ord_psbl_amt  = $7391.30 (합산, 원화 미포함)

원화 환산(frcr_ord_psbl_amt1)은 요구사항에 따라 사용하지 않음.
출처: KIS 공식문서(20260221) '해외주식 매수가능금액조회' 시트.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
agentson
2026-02-26 02:01:13 +09:00
parent 9d7ca12275
commit 6ff887c047
2 changed files with 18 additions and 18 deletions

View File

@@ -537,7 +537,7 @@ async def trading_cycle(
market.exchange_code, stock_code, current_price
)
total_cash = safe_float(
ps_data.get("output", {}).get("ord_psbl_frcr_amt", "0") or "0"
ps_data.get("output", {}).get("ovrs_ord_psbl_amt", "0") or "0"
)
except ConnectionError as exc:
logger.warning(
@@ -1710,7 +1710,7 @@ async def run_daily_session(
ref_stock["current_price"],
)
total_cash = safe_float(
ps_data.get("output", {}).get("ord_psbl_frcr_amt", "0") or "0"
ps_data.get("output", {}).get("ovrs_ord_psbl_amt", "0") or "0"
)
except ConnectionError as exc:
logger.warning(