fix(ci): resolve merge conflict in deployment workflow
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (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
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been skipped
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Failing after 2m14s
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (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
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been skipped
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Failing after 2m14s
This commit is contained in:
@@ -168,13 +168,16 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
|
||||
|
||||
# 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청
|
||||
requests = _requests()
|
||||
resp = requests.post(
|
||||
f"{creds.domain}/oauth2/tokenP",
|
||||
json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret},
|
||||
timeout=15,
|
||||
)
|
||||
resp.raise_for_status()
|
||||
body = resp.json()
|
||||
try:
|
||||
resp = requests.post(
|
||||
f"{creds.domain}/oauth2/tokenP",
|
||||
json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret},
|
||||
timeout=15,
|
||||
)
|
||||
resp.raise_for_status()
|
||||
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"]
|
||||
expires_in_sec = int(body.get("expires_in", 86400))
|
||||
expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec)
|
||||
@@ -209,9 +212,12 @@ def _send_request(creds: KisCredentials, path: str, tr_id: str, params: dict[str
|
||||
"custtype": "P",
|
||||
}
|
||||
requests = _requests()
|
||||
resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15)
|
||||
resp.raise_for_status()
|
||||
return resp.json()
|
||||
try:
|
||||
resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15)
|
||||
resp.raise_for_status()
|
||||
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 카테고리 (실측 확인) ──────────
|
||||
|
||||
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
"""KIS-first data collector for the CI scheduler.
|
||||
|
||||
The collector uses the existing `GatherTradingData.json` snapshot as the seed
|
||||
universe, then enriches Korean tickers with read-only KIS quotations and
|
||||
orderbook data, while retaining Naver/Yahoo fallbacks when available.
|
||||
The canonical persistence target is SQLite.
|
||||
The collector treats SQLite as the canonical persistence layer.
|
||||
`GatherTradingData.json` is emitted only after the DB-backed collection run
|
||||
finishes, so the JSON acts as a derived reporting artifact rather than the
|
||||
source of truth.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user