[2026-05-15] rate limit·전일데이터·TR ID 등 버그 수정
- main.py: sleep 0.05/0.1 → 1.1초 (KIS rate limit 준수) - main.py: 전일 날짜 계산 수정 (월요일→금요일), 인라인 주석 env 파싱, 장 중 재시작 즉시 루프 진입 - strategy/volatility_breakout.py: has_prev_data() 추가, 중복 수집 skip - db/repository.py, order_executor.py: UPDATE ORDER BY → 서브쿼리 수정 (SQLite 호환) - kis_client.py: get_balance TR ID VTTC8001R → VTTC8434R - test_connection.py: API 호출 간 sleep 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,8 +23,11 @@ def update_trade_exit(ticker, exit_time, exit_price, exit_reason, pnl, fee):
|
||||
conn.execute("""
|
||||
UPDATE trades SET exit_time=?, exit_price=?,
|
||||
exit_reason=?, pnl=?, fee=?
|
||||
WHERE ticker=? AND exit_time IS NULL
|
||||
ORDER BY id DESC LIMIT 1
|
||||
WHERE id = (
|
||||
SELECT id FROM trades
|
||||
WHERE ticker=? AND exit_time IS NULL
|
||||
ORDER BY id DESC LIMIT 1
|
||||
)
|
||||
""", (exit_time, exit_price, exit_reason, pnl, fee, ticker))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user