feat: add bounded KIS account read recovery

This commit is contained in:
jordan
2026-07-29 17:40:01 +09:00
parent 3dd8eefc92
commit 0266992238
29 changed files with 970 additions and 26 deletions
@@ -0,0 +1,10 @@
-- dcy-041 / GitHub #45: account-scoped last healthy KIS snapshot.
-- account_hash is SHA-256(CANO|ACNT_PRDT_CD); no plaintext account identity,
-- token, key, order response, or broker payload is persisted.
CREATE TABLE IF NOT EXISTS broker_account_snapshot (
account_hash TEXT PRIMARY KEY,
holdings JSONB NOT NULL,
holdings_captured_at TIMESTAMPTZ,
available_cash BIGINT CHECK (available_cash IS NULL OR available_cash >= 0),
cash_captured_at TIMESTAMPTZ
);