1 Commits

Author SHA1 Message Date
kjh2064 532924e218 style(web): 관리자 화면 UI/UX 전면 개편 및 화면 밀도 최적화
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
2026-06-24 18:00:37 +09:00
4 changed files with 1732 additions and 301 deletions
-6
View File
@@ -168,7 +168,6 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
# 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청 # 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청
requests = _requests() requests = _requests()
try:
resp = requests.post( resp = requests.post(
f"{creds.domain}/oauth2/tokenP", f"{creds.domain}/oauth2/tokenP",
json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret}, json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret},
@@ -176,8 +175,6 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
) )
resp.raise_for_status() resp.raise_for_status()
body = resp.json() body = resp.json()
except Exception as exc:
raise RuntimeError("KIS token refresh failed; check credentials and API availability.") from exc
access_token = body["access_token"] access_token = body["access_token"]
expires_in_sec = int(body.get("expires_in", 86400)) expires_in_sec = int(body.get("expires_in", 86400))
expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec) expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec)
@@ -212,12 +209,9 @@ def _send_request(creds: KisCredentials, path: str, tr_id: str, params: dict[str
"custtype": "P", "custtype": "P",
} }
requests = _requests() requests = _requests()
try:
resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15) resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15)
resp.raise_for_status() resp.raise_for_status()
return resp.json() return resp.json()
except Exception as exc:
raise RuntimeError(f"KIS read-only request failed for {path} / {tr_id}.") from exc
# ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ────────── # ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ──────────
Binary file not shown.
+4 -4
View File
@@ -1,9 +1,9 @@
"""KIS-first data collector for the CI scheduler. """KIS-first data collector for the CI scheduler.
The collector treats SQLite as the canonical persistence layer. The collector uses the existing `GatherTradingData.json` snapshot as the seed
`GatherTradingData.json` is emitted only after the DB-backed collection run universe, then enriches Korean tickers with read-only KIS quotations and
finishes, so the JSON acts as a derived reporting artifact rather than the orderbook data, while retaining Naver/Yahoo fallbacks when available.
source of truth. The canonical persistence target is SQLite.
""" """
from __future__ import annotations from __future__ import annotations
File diff suppressed because it is too large Load Diff