fix: Reduce rate limit to avoid EGW00201 API errors #43

Closed
opened 2026-02-05 00:01:17 +09:00 by agentson · 0 comments
Collaborator

Priority: MEDIUM

Problem

"초당 거래건수를 초과하였습니다" (EGW00201)
get_overseas_price failed (500)

Docker 로그에서 가장 빈번하게 발생 (약 70% 빈도)

Root Cause

현재 RATE_LIMIT_RPS=10.0이 KIS API 실제 제한보다 높음
여러 종목 스캔 시 짧은 시간에 많은 요청 발생

Solution

Rate limit을 더 보수적으로 설정:

RATE_LIMIT_RPS=5.0  # 10.0 → 5.0

Files

  • src/config.py: RATE_LIMIT_RPS default value
  • .env.example: RATE_LIMIT_RPS documentation

Tests

  • Verify LeakyBucket respects new rate limit
  • Monitor production logs for EGW00201 frequency
## Priority: MEDIUM ## Problem ``` "초당 거래건수를 초과하였습니다" (EGW00201) get_overseas_price failed (500) ``` Docker 로그에서 가장 빈번하게 발생 (약 70% 빈도) ## Root Cause 현재 `RATE_LIMIT_RPS=10.0`이 KIS API 실제 제한보다 높음 여러 종목 스캔 시 짧은 시간에 많은 요청 발생 ## Solution Rate limit을 더 보수적으로 설정: ``` RATE_LIMIT_RPS=5.0 # 10.0 → 5.0 ``` ## Files - `src/config.py`: RATE_LIMIT_RPS default value - `.env.example`: RATE_LIMIT_RPS documentation ## Tests - Verify LeakyBucket respects new rate limit - Monitor production logs for EGW00201 frequency
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#43