fix: 잔액 부족 주문 실패 후 10분간 BUY 재시도 방지 (#179) #183

Merged
jihoson merged 1 commits from feature/issue-179-insufficient-balance-cooldown into main 2026-02-20 09:31:08 +09:00
Collaborator

Summary

  • 잔액 부족("주문가능금액이 부족합니다.") 에러로 BUY 주문이 거절될 때 해당 종목을 10분(600초)간 BUY 시도에서 제외하는 cooldown 메커니즘 추가
  • realtime 루프(trading_cycle)와 daily session(run_daily_session) 모두에 적용

Fixes

Test plan

  • TestBuyCooldown 4개 테스트 통과
  • 전체 테스트 721개 통과

🤖 Generated with Claude Code

## Summary - 잔액 부족("주문가능금액이 부족합니다.") 에러로 BUY 주문이 거절될 때 해당 종목을 10분(600초)간 BUY 시도에서 제외하는 cooldown 메커니즘 추가 - realtime 루프(trading_cycle)와 daily session(run_daily_session) 모두에 적용 ## Fixes - closes #179 ## Test plan - [x] TestBuyCooldown 4개 테스트 통과 - [x] 전체 테스트 721개 통과 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agentson added 1 commit 2026-02-20 09:26:35 +09:00
fix: 잔액 부족 주문 실패 후 10분간 BUY 재시도 방지 (issue #179)
Some checks failed
CI / test (pull_request) Has been cancelled
39b9f179f4
잔액 부족(주문가능금액 부족) 에러 발생 시 해당 종목을 10분간 BUY 시도에서
제외하는 cooldown 메커니즘을 realtime/daily 루프 모두에 적용.

- _BUY_COOLDOWN_SECONDS = 600 상수 추가
- trading_cycle()에 buy_cooldown 파라미터 추가
- 잔액 부족 에러(주문가능금액) 감지 후 cooldown 설정
- BUY 실행 전 cooldown 체크 (realtime + daily session 모두)
- TestBuyCooldown 테스트 클래스 4개 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jihoson merged commit 76a7ee7cdb into main 2026-02-20 09:31:08 +09:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#183