DEV Community

taste kim
taste kim

Posted on

Trader Pro v0.3 shipped — Korean + US stock backtest GUI on KIS OpenAPI

TL;DR

Shipped Trader Pro v0.3 — a desktop GUI (Electron + Vite + React + TypeScript) wrapping the Korean Investment & Securities (KIS) OpenAPI for backtesting and paper trading on Korean + US stocks. v0.3 is a full visual redesign + the cumulative work of 14 phases.

Stack: Electron 33 · Vite 5 · React 18 · TypeScript 5 · Zustand · Lightweight Charts · electron-builder · Pretendard + JetBrains Mono

Buy/Download: tastekim.gumroad.com/l/epgoll ($79 · lifetime updates)


What v0.3 changes

Visual redesign (Phase 14)

  • Mint primary (oklch hue 175) — calmer, more modern than the previous cyan
  • Shadow-driven depth — 5-tier surfaces, almost no 1px borders
  • Typography pair — Pretendard (Korean/Latin sans) + JetBrains Mono (price/numbers)
  • Modern radii (6/10/14/18px)
  • Design tokens consolidated in tokens.css — single source of truth for color, shadow, radius, density

Cumulative features (Phase 1–13)

  • Custom strategies with 8 indicators — RSI, Bollinger Band, Volume Spike, SMA, EMA, MACD, Stochastic, ATR, freely composable, persisted via electron-store
  • Multi-timeframe backtest — 1m/5m/15m/30m/60m + daily/weekly/monthly, with auto-pagination through KIS API's 100-day chunk limit (up to ~5 years)
  • Multi-indicator chart — toggleable overlays (SMA/EMA/BB) + sub-panels (RSI/Stoch/ATR)
  • Chart animation — backtest results play back oldest → newest with skip
  • Portfolio system — up to 50 holdings, weighted-average multi-symbol backtest, auto-portfolio from actual KIS holdings
  • Live/paper mode — separate page with realtime price pulse, SVG sparkline with markers, position card with live P/L, 5/30/60/120/240-min milestone guides, auto session report on stop
  • Markets — KRX + NASDAQ + NYSE + AMEX + HK + Tokyo + Shanghai + Shenzhen; 26 ETFs in autocomplete (KODEX/TIGER/QQQ/SPY/VOO/VTI/TLT/GLD/SLV)
  • Market hours + FX — KRX/US session state with weekday and KST conversion, live USD/KRW rate refreshing every 5 min
  • Paper/Live budget split — Paper: user-entered, Live: pulled from KIS balance API
  • Auto-update checker — manifest hosted on a secret GitHub Gist, in-app banner on new release, Gumroad re-download for buyers

Automated tests — 106/106 PASS


Why these choices

Why Mint over Cyan

Cyan can read as cheap/generic in trading dashboards. Mint with oklch hue 175 sits in the same calm-cool family but is distinct enough to be a brand color, and it pairs well with semantic red (loss) without clashing.

Why no order automation

v0.3 is monitor + paper simulation only. Real orders go through KIS HTS/MTS by the user. This keeps the legal surface area small while still delivering ~95% of perceived value: backtest engine + live indicator evaluation + signal alerts + position simulation.

Why pagination over websocket

KIS daily-OHLCV is a REST endpoint that returns ~100 trading days per call. A 5-year backtest needs ~12 sequential calls per ticker with 200ms delay between calls. WebSocket adds infrastructure complexity for marginal value when most retail KR traders care about daily-bar strategies.

Why a hand-rolled update manifest over electron-updater

electron-updater needs Apple code-signing ($99/year). For a $79 one-time product, a secret GitHub Gist + in-app banner + Gumroad re-download covers the same ground at zero cost.


Architectural notes

Single IPC entrypoint

// preload.ts
contextBridge.exposeInMainWorld('kisApi', {
  fetch: (args) => ipcRenderer.invoke('kis:fetch', args),
});
Enter fullscreen mode Exit fullscreen mode

One window.kisApi.fetch({ action, params }) covers KIS, portfolio CRUD, strategy CRUD, fx, and update-check.

Live engine = tick aggregator + indicator on candles

1-second poll → tick log → bucket into the user-selected interval → run identical indicator math as the backtester. Same math both sides means live signals match what backtest predicted.

Two Zustand stores

tradingStore (UI/settings) and liveStore (session ticks/signals/position). Splitting avoids re-rendering settings UI on every tick.


Try it

Gumroad: $79 — lifetime updates, in-app update banner, macOS arm64 (.dmg / .zip).

Top comments (0)