웹소켓 연결 완료
This commit is contained in:
@@ -65,8 +65,10 @@ class Settings(BaseSettings):
|
||||
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"
|
||||
# KIS 공식 실시간 시세 WebSocket 엔드포인트
|
||||
# 경로: /websocket (또는 /cgi-md5 in some cases)
|
||||
KIS_WS_REAL_URL: str = "wss://openapi.koreainvestment.com:21000/websocket"
|
||||
KIS_WS_VIRTUAL_URL: str = "wss://openapivts.koreainvestment.com:29443/websocket"
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
@@ -242,6 +244,7 @@ class Settings(BaseSettings):
|
||||
# ═════════════════════════════════════════════════════════════════════════════
|
||||
# KIS WebSocket & 실시간 스트림 (kis_realtime_stream.py)
|
||||
# ═════════════════════════════════════════════════════════════════════════════
|
||||
KIS_WS_ENABLED: bool = True # WebSocket 실시간 스트림 활성화 (True) / 비활성화 (False)
|
||||
KIS_SYNC_INTERVAL: int = 10 # 구독 목록 동기화 주기 (초)
|
||||
KIS_RECONNECT_WAIT: int = 5 # 재연결 대기 시간 (초)
|
||||
KIS_APPROVAL_KEY_TTL: int = 82800 # approval_key 캐시 유효시간 (초, 23시간)
|
||||
|
||||
Reference in New Issue
Block a user