Projects

Finance · since 2026

TWS dashboard

My cockpit for the Interactive Brokers account: positions, orders, alerts, taxes and the TWS process itself in one web UI — plus kiosk displays for the wall and a gRPC API for my own bots.

Container on the finance VMIBKRlive accountTWS-API :7497TWS process treeTWSIBC · 2FA (TOTP)X-Server · noVNCsupervised by the backendBackendNestJSTWS APItRPC · streamsAlert watcherDatabaseDashboardbrowser · sign-inKiosk displayswall display · no logingRPC APIown bots · API keysquotesordersWatchdog
Status
In production
Period
since 2026
Area
Finance
Role
Design, development, operations
3
entry points: dashboard, kiosk, gRPC — each with its own auth
1
process for UI, API and TWS supervision
2FA
via TOTP, entered automatically when TWS starts
SvelteKitNestJSTypeScripttRPCgRPCIBKR TWS APInoVNCDocker

What it is about

Interactive Brokers' Trader Workstation (TWS) is a desktop application. The dashboard moves it onto a VM on my home network: a backend starts and supervises TWS and its X server itself, signs in with automatic two-factor authentication and offers account, positions and orders in a lean web UI. The account is real — orders from the dashboard go to the exchange.

Features

All numbers and the account number are blacked out in the images; click to enlarge.

Positions and account

At the top net liquidation, buying power, cash and P&L, below every position with cost basis, price, market value, daily and unrealized result. Open orders sit right under their position. Everything arrives as a live stream and updates without reloading.

Positions with account figures and open orders (numbers blacked out)

Alerts

The backend watches alerts on prices and indicators, so they fire even when no browser is open. Chart and alert watcher compute with the same indicator catalog (zeigerwerk, Rust compiled to WebAssembly): an alert on RSI 14 fires on exactly the number the chart legend shows.

Taxes

The dashboard computes German capital gains tax itself: loss offsetting per pot, saver's allowance, capital gains tax, solidarity surcharge and church tax, every sale itemised, export to Excel/CSV. Change a parameter and the page recomputes instantly, with the same function the server uses.

Tax calculation with loss offsetting and individual sales (numbers blacked out)

System

Start, restart and stop TWS and IBC, load per process group, install a TWS version, logs and backups. The TWS GUI itself is reachable in the browser via noVNC, as is a web terminal — all behind the same sign-in.

System page: TWS/IBC process, load and version (numbers blacked out)

Kiosk displays

Wall displays built from tiles — clock, list, quote, chart — in several views that rotate automatically. They run on a port of their own without login; publishing a display is a deliberate step with a warning.

Kiosk display editor with tiles and views

gRPC API for my own bots

Bots trade and read quotes over gRPC with API keys instead of a browser session, each key with only the scopes it needs. The dashboard ships the .proto files and examples for Node.js and Python; several bots on the same symbol share one market-data line.

gRPC API: quick start with endpoint, authentication and sample code

How it is built

  • One process. The NestJS backend holds the TWS connection, the API, the live streams and the database, and also serves the SvelteKit UI — no proxy, no CORS.
  • TWS as a child process. The backend starts and supervises the X server, window manager, noVNC bridge and IBC with TWS itself. IBC is patched to enter the TOTP code of the two-factor sign-in automatically. The same package runs on a host or in a container.
  • One entry point per kind of auth. Dashboard (session cookie), kiosk (no login) and gRPC (API key) each get their own port instead of exceptions drilled into the main app.
  • Query state, stream changes. Requests go through tRPC, live data through server-sent events; every message is a complete snapshot, never a delta.
  • Shared core. Schemas, permission checks, tax and alert logic live in one package that browser and server both use and that is tested without either.