Skip to content

Hitheshkaranth/OpenTerminalUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTerminalUI

OpenTerminalUI logo

The open-source financial terminal for traders, researchers, and quant teams.

Version 0.2.0 Python 3.11 Node 22 FastAPI React 18 TypeScript Vite 6 Docker MIT License

Website | Features | Screenshots | Architecture | Quick Start | Contributing


OpenTerminalUI is a self-hosted, full-stack financial terminal that combines real-time market data, institutional-grade charting, derivatives analytics, portfolio management, and quant research into a single platform. Built with a terminal-style shell interface inspired by Bloomberg and Refinitiv, it delivers professional-grade workflows to anyone with a browser.

Multi-market coverage across NSE, BSE, NYSE, NASDAQ, crypto, commodities, forex, bonds, ETFs, and mutual funds. 70+ technical indicators, multi-panel chart workstations, F&O option chains with live Greeks, backtesting with Model Lab, portfolio analytics with risk engine, and an extensible plugin system — all running on your own hardware.

Screenshots

Home Dashboard

Home dashboard with market context, system health, portfolio sparkline, and workspace launch grid.

Chart Workstation

Multi-panel chart workstation with synchronized crosshairs, technical indicators, and drawing tools.

Stock Detail

Stock detail page with real-time quotes, multi-timeframe charting, and fundamental analysis tabs.

Security Hub

Security hub with deep fundamental analysis, financials, ownership, estimates, peers, and ESG scoring.

Portfolio Analytics

Portfolio analytics with allocation breakdown, benchmark overlay, correlation heatmap, and risk metrics.

Backtesting Lab

Backtesting workspace with equity curves, Monte Carlo simulation, parameter sensitivity, and walk-forward analysis.

Features

Terminal Shell

  • GO Bar (Ctrl+G) — Bloomberg-style command bar with symbol lookup and route navigation
  • Command Palette (Ctrl+K) — fuzzy search across 25+ functions, tickers, and natural language queries
  • Function Keys (F1-F9) — rapid workspace switching with Bloomberg-style hotkeys
  • Ticker Tape — rolling market pulse with live quotes across exchanges
  • Theme Engine — Terminal Noir (default), classic, and light themes with custom accent support
  • Desktop & Mobile Layouts — responsive design with persistent workspace framing

Charting & Technical Analysis

  • Multi-Panel Workstation — up to 9 synchronized chart panels with crosshair linking
  • 70+ Technical Indicators — SMA, EMA, RSI, MACD, Bollinger Bands, Keltner, Supertrend, ATR, VWAP, OBV, CMF, Stochastic, CCI, ADX, Donchian, and many more
  • Multi-Timeframe — 1m, 2m, 5m, 15m, 30m, 1h, 4h, 1D, 1W, 1M with extended hours toggle
  • Drawing Tools — persistent annotations with templates, save/restore
  • Volume Profile — VPOC + 70% value area overlay
  • Replay Mode — step through historical price action bar by bar
  • Comparison Overlays — multi-symbol normalized or raw price comparison
  • Alternative Charts — Renko, Kagi, Point & Figure, Line Break
  • Chart Export — PNG, SVG, and CSV data export
  • OpenScript — custom indicator scripting with script library

Equity Research & Security Hub

  • 8-Tab Security Analysis — overview, financials, chart, news/sentiment, ownership, estimates, peers, ESG
  • Fundamental Metrics — P/E, P/B, ROE, ROA, dividend yield, earnings growth, debt ratios
  • Earnings Calendar — historical surprises, upcoming events, guidance tracking
  • Shareholding History — promoter/FII/DII/public breakdown with trend visualization
  • Analyst Estimates — consensus tracking, revisions, and target prices
  • Corporate Actions — splits, dividends, rights, bonuses timeline
  • Peer Comparison — relative valuation matrices across comparable companies
  • Insider Trading Monitor — recent insider trades, per-stock insider activity, top buyers/sellers leaderboard, and cluster-buy detection with minimum insider thresholds
  • Trade Journal — trade logging with equity curve, calendar heatmap, and performance statistics

Advanced Screener

  • Query Builder — custom filters with preset formulas and arithmetic operations
  • Custom Formula Engine — write, save, and share custom formulas with server-side evaluation, formula library with descriptions and categories
  • 15+ Visualization Modes — tables with sparklines, sector treemaps, heatmaps, scatter plots, radar charts, box plots, bubble charts, waterfall charts, RRG quadrants, gauge dials, distribution histograms, stacked area, and comparison bars
  • Multi-Market Scanning — NSE, BSE, NYSE, NASDAQ with technical and fundamental overlays
  • Preset Management — save, load, share, and browse community screens
  • Score-Based Ranking — deterministic scoring with stable ordering and explainable setup detection

Futures & Options (F&O)

  • Option Chain — full contract listing with live Greeks (Delta, Gamma, Theta, Vega, Rho)
  • IV Analysis — historical and implied volatility tracking, term structure visualization
  • Strategy Builder — multi-leg construction for spreads, butterflies, straddles, strangles
  • OI Analysis — open interest trends, buildup patterns, strike-level concentration
  • PCR Tracking — put-call ratio monitoring with overbought/oversold signals
  • Heatmaps — IV/volume/OI heatmaps across the strike grid
  • Options Flow — unusual activity scanner with volume/OI ratios, premium tracking, heat scores, and bullish/bearish sentiment classification
  • Futures Analytics — term structure, basis analysis, contract specifications
  • Expiry Calendar — contract schedules with roll suggestions

Portfolio & Risk Management

  • Multi-Portfolio CRUD — holdings management with cost basis and transaction tracking
  • Allocation & Attribution — sector allocation charts, contributor/detractor analysis
  • Benchmark Overlay — compare against indices with relative performance metrics
  • Risk Engine — VaR (95%), CVaR, EWMA volatility, rolling correlation, PCA factor exposures
  • Factor Analytics — multi-factor exposure radar, attribution waterfall, rolling factor history, and factor return comparison across market, size, value, momentum, quality, and low-volatility factors
  • Stress Testing — 6 predefined macro scenarios (GFC 2008, COVID 2020, rate shock, INR depreciation, tech rotation, commodity spike), custom shock builder, Monte Carlo simulation, and historical event replay
  • Correlation Deep Dive — correlation matrix, rolling correlation with regime detection, hierarchical clustering with dendrogram, and cross-asset dependency visualization
  • Tax Lot Manager — cost basis tracking across tax lots
  • Dividend Tracker — income tracking with ex-date calendar
  • Paper Trading — virtual trading engine with realistic order fills, slippage modeling, and TCA analytics

Backtesting & Model Lab

  • 10+ Strategy Templates — SMA/EMA crossover, mean reversion, breakout, RSI, MACD, Bollinger Bands, dual momentum, VWAP reversion
  • Intraday & Daily Testing — 1m to monthly resolution with session-aware logic
  • Vectorized Engine — NumPy-based computation for fast large-dataset backtests
  • Realistic Execution — slippage, commission, partial fills, latency, and market impact simulation
  • Result Visualization — equity curves, drawdown charts, monthly return heatmaps, rolling Sharpe, 3D parameter surfaces, Monte Carlo paths, trade analysis
  • Walk-Forward Analysis — out-of-sample validation with sliding windows
  • Parameter Sweep — sensitivity analysis across hyperparameter ranges
  • Experiment Tracking — create, run, compare, and promote models through the Model Lab
  • Model Governance — version tracking with code/data hashing, promotion to paper trading

Portfolio Lab

  • Multi-Asset Backtesting — portfolio-level backtests with up to 200 assets
  • Weighting Modes — equal weight, volatility target, risk parity, momentum, market cap
  • Strategy Blends — combine up to 10 strategies with weighted sum returns
  • Rebalance Scheduling — weekly, monthly, quarterly, or custom frequency
  • Attribution Analysis — top contributors/detractors, worst drawdowns, rebalance log
  • Correlation Matrices — cross-asset cluster analysis

Cross-Asset & Macro

  • Commodities — energy, metals, agriculture with futures term structure and seasonal analysis
  • Forex — major pairs, cross rates matrix, central bank monitor (Fed, ECB, BoE, BoJ, RBI, and more)
  • Cryptocurrency — full workspace with markets, movers, sectors, DeFi, derivatives, heatmaps, and correlation
  • ETF Analytics — holdings viewer, flow tracker, multi-ETF overlap analysis
  • Mutual Funds — search, comparison, rolling returns, SIP calculator, category rankings, fund overlap
  • Bonds — fixed income yields, spreads, and duration analytics
  • Yield Curve — interactive US Treasury curve with historical comparison and 2s10s inversion detection
  • Economics — global event calendar with impact coding, macro indicators dashboard
  • Sector Rotation — Relative Rotation Graph (RRG) with 12-week trailing momentum paths

Alerts & Breakout Scanner

  • Multi-Condition Alert Builder — compound rules with AND/OR logic, multi-field conditions (price, volume, RSI, MACD, moving averages), and natural-language summary
  • Multi-Channel Delivery — in-app, email, webhook, Slack, and Telegram with per-channel configuration and delivery testing
  • Alert Lifecycle — cooldown periods, expiry dates, max trigger limits, trigger history with deduplication
  • WebSocket Push — real-time desktop notifications on alert trigger
  • Breakout Scanner — automated pattern detection with confidence scoring
  • Alert History — full timeline with delivery status and re-trigger tracking

Operations & Compliance

  • OMS — order management with restricted list enforcement and audit trail
  • Ops Dashboard — feed health monitoring, kill switches, data quality panels
  • Model Governance — model registry, approval workflows, risk limit monitoring
  • Cockpit — executive dashboard aggregating portfolio, signals, risk, and events

News & Sentiment

  • Ticker-Specific News — per-symbol news feed with multi-period filtering
  • Sentiment Analysis — bullish/bearish/neutral classification with confidence scores
  • Market-Wide Feed — latest headlines with source attribution and sentiment trends

Plugin System & Scripting

  • Plugin API — extensible architecture for custom analysis modules
  • Included Plugins — RSI Divergence Scanner, Sector Rotation Monitor, Unusual Volume Detector
  • Python Scripting — sandboxed execution with security-hardened imports
  • OpenScript — chart-based indicator scripting with library and sharing

Real-Time Data

  • Multi-Provider WebSocket — Zerodha Kite (India) and Finnhub (US) real-time ticks
  • Provider Waterfall — automatic failover chain: primary → fallback → error
  • Multi-Level Caching — L1 SQLite + L2 Redis with TTL-based invalidation
  • Candle Aggregation — tick-by-tick to any interval with distributed bar construction
  • Redis Pub/Sub — horizontal scaling for multi-client quote fan-out

Architecture

+---------------------------------------------------+
|                   CLIENT TIER                     |
|   React 18 + TypeScript + Vite + Tailwind CSS    |
|   TanStack Query + Zustand + Lightweight Charts   |
|   Recharts + Three.js + Playwright + Vitest       |
+--------------------------+------------------------+
                           | REST API + WebSocket
+--------------------------+------------------------+
|                   API GATEWAY                     |
|   FastAPI + Uvicorn + JWT Auth + CORS Middleware  |
|   53 Route Modules (Equity, F&O, Backtest, Risk) |
+--------------------------+------------------------+
                           |
+--------------------------+------------------------+
|                  SERVICE LAYER                    |
|   Unified Fetcher + Screener Engine + Model Lab  |
|   Risk Engine + Alert Scheduler + Quote Hub      |
|   Provider Registry + Failover Chain             |
+--------------------------+------------------------+
                           |
+--------------------------+------------------------+
|                 DATA PROVIDERS                    |
|   Zerodha Kite | Finnhub | FMP | Yahoo Finance  |
|   NSEPython (F&O, Corporate Actions)             |
+--------------------------+------------------------+
                           |
+--------------------------+------------------------+
|                  PERSISTENCE                      |
|   SQLite (default) | PostgreSQL 16 (production)  |
|   Redis (cache + pub/sub + sessions)             |
+---------------------------------------------------+

Data Flow

Market data flows through a unified pipeline:

  1. Exchange ticks arrive via WebSocket adapters (Kite, Finnhub)
  2. Quote Hub fans out ticks to connected clients via /api/ws/quotes
  3. Bar Aggregator constructs OHLCV candles at all supported intervals
  4. OHLCV Cache persists bars in SQLite (L1) and Redis (L2)
  5. Unified Fetcher serves chart requests with cache-first, provider-fallback semantics
  6. Chart Engine renders via Lightweight Charts v5 with indicator overlays

Provider Waterfall

Request → L1 Cache (SQLite) → L2 Cache (Redis) → Primary Provider → Fallback Provider → 503
             HIT → return         HIT → return       OK → cache+return    OK → cache+return

System Requirements

Component Minimum Recommended
OS Linux, macOS, Windows 10+ Ubuntu 22.04+ / macOS 13+
CPU 2 cores 4+ cores
RAM 4 GB 8 GB+
Disk 2 GB 10 GB+ (historical data cache)
Display 1280 x 720 1920 x 1080+
Browser Chrome 90+, Firefox 90+, Safari 15+, Edge 90+ Latest Chrome or Firefox

Software Dependencies

Software Version Notes
Docker 20.10+ Required for containerized deployment
Docker Compose v2.0+ Included with Docker Desktop
Python 3.11+ Local development only
Node.js 22+ Local frontend development only
Git 2.30+ For cloning the repository

Quick Start

Option 1: Docker (Recommended)

git clone https://github.com/Hitheshkaranth/OpenTerminalUI.git
cd OpenTerminalUI
cp .env.example .env      # add API keys if you have them
docker compose up --build

Open http://localhost:8000 when the build completes.

Docker Compose profiles:

# Default: Backend + Frontend + Redis (SQLite)
docker compose up --build

# With PostgreSQL for production workloads
docker compose --profile postgres up --build

Option 2: Local Development

Backend:

python3.11 -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
PYTHONPATH=. uvicorn backend.main:app --reload --host 127.0.0.1 --port 8000

Frontend:

cd frontend
npm ci
npm run dev
  • Backend API: http://127.0.0.1:8000
  • Frontend dev server: http://127.0.0.1:5173

Environment Variables

The platform runs without API keys using fallback providers. Add keys to unlock full data access:

Variable Purpose
FMP_API_KEY Financial Modeling Prep — US equities, fundamentals, earnings
FINNHUB_API_KEY Finnhub — US real-time WebSocket ticks
KITE_API_KEY Zerodha Kite — India NSE/BSE real-time + historical
KITE_API_SECRET Zerodha Kite secret
KITE_ACCESS_TOKEN Zerodha Kite session token
JWT_SECRET_KEY JWT signing key for authentication
CACHE_SIGNING_KEY Cache integrity signing key
DATABASE_URL Database connection (default: SQLite)
REDIS_URL Redis connection for caching and pub/sub
OPENTERMINALUI_CORS_ORIGINS Allowed CORS origins
OPENTERMINALUI_PREFETCH_ENABLED Enable background data prefetch

Testing

Backend

PYTHONPATH=. python -m compileall backend
PYTHONPATH=. pytest backend/tests -q --cov=backend --cov-fail-under=45

Frontend

cd frontend
npm run build
npx vitest run

End-to-End

cd frontend
npx playwright install chromium
npm run test:e2e

Gate (all checks)

make gate

Repository Layout

backend/                 FastAPI app, adapters, services, routes, tests
  adapters/              Market data provider adapters
  api/routes/            53 route modules (equity, fno, backtest, risk, oms, ...)
  core/                  Unified fetcher, failover, service status
  services/              48 business logic modules
  db/                    SQLAlchemy ORM, migrations, caching
  auth/                  JWT authentication and middleware
  config/                Settings, environment, security
  tests/                 409+ backend tests
frontend/                React + Vite + TypeScript SPA
  src/pages/             51 page components
  src/components/        UI components, terminal design system
  src/fno/               F&O workspace modules
  src/store/             Zustand state management
  src/__tests__/         234+ unit tests
  tests/e2e/             Playwright E2E specs
plugins/                 Extensible plugin system with examples
docs/                    Wiki, architecture specs, and contributor docs
  site/                  GitHub Pages website
  wiki/                  Getting started, contributing guides
data/                    Local SQLite databases and test fixtures
docker-compose.yml       Container orchestration (backend + Redis + Postgres)
Dockerfile               Multi-stage build (Node builder + Python runtime)
Makefile                 Development commands (setup, test, gate)

Keyboard Shortcuts

Shortcut Action
Ctrl+G GO Bar — symbol lookup and navigation
Ctrl+K Command Palette — fuzzy search across all features
F1-F9 Function keys for workspace switching
1-7 Timeframe hotkeys in chart views
Esc Close active panel or dialog

Contributing

We welcome contributions. See CONTRIBUTING.md for the full guide.

  1. Fork the repo and create a branch: feat/your-feature or fix/your-fix
  2. Write tests first (TDD encouraged)
  3. Run make gate to pass all checks
  4. Open a PR with a clear description

License

MIT — free to use, modify, and distribute.

About

OpenTerminalUI — a trading terminal UI for market data, charting, screening, backtesting, and alerts.

Resources

License

Contributing

Stars

Watchers

Forks

Packages