웹소켓 적용중
This commit is contained in:
@@ -61,6 +61,13 @@ class Settings(BaseSettings):
|
||||
KIS_ACCOUNT_NO: str = ""
|
||||
KIS_BASE_URL: str = ""
|
||||
|
||||
# WebSocket 접속키 (수동 지정 시 우선, 비어 있으면 자동 발급)
|
||||
KIS_WS_APPROVAL_KEY: str = ""
|
||||
|
||||
# KIS WebSocket URL (.env에서 오버라이드 가능)
|
||||
KIS_WS_REAL_URL: str = "wss://openapi.koreainvestment.com:21000/websocket/realtime"
|
||||
KIS_WS_VIRTUAL_URL: str = "wss://openapiwss.koreainvestment.com:29443/websocket/realtime"
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self._apply_kis_mode()
|
||||
@@ -193,7 +200,7 @@ class Settings(BaseSettings):
|
||||
API_RETRY_DELAY: float = 1.5 # 초기 재시도 대기 시간 (초)
|
||||
API_RETRY_BACKOFF: float = 2.0 # 지수 백오프 배율
|
||||
API_MIN_REQUEST_INTERVAL: float = 0.5 # 최소 요청 간격 (초) - 초당 2회 권장
|
||||
API_MAX_CONCURRENT_REQUESTS: int = 2 # 동시 최대 요청 수
|
||||
API_MAX_CONCURRENT_REQUESTS: int = 4 # 동시 최대 요청 수 (batch와 UI 요청 동시 처리)
|
||||
API_TIMEOUT: float = 30.0 # API 타임아웃 (초)
|
||||
|
||||
# Monitoring & Alerting
|
||||
|
||||
Reference in New Issue
Block a user