Bloomberg Terminal-style financial platform using free data sources.
A professional-grade terminal providing real financial data through a keyboard-driven, multi-panel interface with Bloomberg-style commands, real-time streaming, and advanced analytics.
- 4 independent panels in configurable layouts (1x1, 2x1, 1x2, 2x2)
- Per-panel context - each panel maintains its own ticker and state
- Keyboard navigation - F1-F4 to focus panels, Alt+1-4 for layouts
- Panel maximization - Alt+Enter to fullscreen, Escape to restore
- WebSocket infrastructure for live data updates
- Multi-source aggregation - Alpha Vantage, Yahoo Finance, Polygon.io
- Crypto streaming - Real-time prices via Binance WebSocket (free, no API key)
- Order book visualization - Live bid/ask depth for crypto pairs
- Ticker tape - Scrolling quotes for major indices and stocks
- Candlestick charts with OHLCV data
- Technical indicators: RSI, MACD, Bollinger Bands, SMA, EMA
- Drawing tools: Horizontal lines, trendlines, text annotations
- Compare mode: Overlay up to 5 securities with normalized returns
- Multiple timeframes: 1D, 1W, 1M, 3M, 6M, 1Y, 5Y
- Options chain with real-time Greeks (Delta, Gamma, Theta, Vega, Rho)
- Black-Scholes pricing model
- Implied volatility display
- Straddle view - calls and puts side by side
- ITM/OTM highlighting
- Security search: Fast autocomplete across US equities
- Fundamentals: Income statement, balance sheet, cash flow, ratios
- SEC filings: 10-K, 10-Q, 8-K from EDGAR
- Company news: Ticker-specific news via Finnhub
- Market news: General market headlines
- Insider trading: Form 4 filings with cluster detection
- Reddit sentiment - r/wallstreetbets and r/stocks analysis
- Twitter/X sentiment - Real-time tweet analysis
- StockTwits bull/bear ratio
- WSB trending rank
- News sentiment scoring
- Sector heatmap - S&P 500 sector performance visualization
- Color-coded by performance - intensity shows magnitude
- Economic calendar: Upcoming releases (CPI, GDP, NFP) with forecasts
- Earnings calendar: BMO/AMC timing, EPS estimates vs actuals
- Alerts system: Price, volume, news, and earnings alerts
- Saved workspaces: 5 built-in templates + custom workspace saving
- Watchlist: Track favorite securities with quick access
- Portfolio manager: Holdings, cost basis, P&L tracking
- Performance analysis: Time-weighted returns, benchmark comparison
- Attribution: Sector allocation, security contribution, factor analysis
- Factor exposure: Fama-French 5-factor model visualization
- Correlation matrix: Security correlation heat map
- Stock screener: Filter by P/E, market cap, sector
- Macro dashboard: GDP, inflation, unemployment from FRED
- Yield curve: Treasury curve visualization (1M to 30Y)
- Docker & Docker Compose
- (Optional) FRED API key for macro data
- (Optional) Finnhub API key for news
- (Optional) Alpha Vantage API key for real-time quotes
# Clone the repository
git clone <repo-url>
cd openterm
# Copy environment template
cp .env.example .env
# Start all services
docker compose up
# In another terminal, seed the database (first time only)
docker compose exec backend python -m scripts.seed_dataDeploy to production with Vercel (frontend) and Railway (backend).
-
Backend (Railway)
- Go to railway.app
- Deploy from GitHub, set root to
backend - Add PostgreSQL and Redis plugins
- Copy your Railway URL
-
Frontend (Vercel)
- Go to vercel.com
- Import repo, set root to
frontend - Set
NEXT_PUBLIC_API_URLto your Railway URL - Deploy
-
Connect
- In Railway, set
FRONTEND_URLto your Vercel URL
- In Railway, set
See docs/QUICK_DEPLOY.md for step-by-step guide.
# Install CLIs
npm i -g vercel @railway/cli
# Setup (first time)
./scripts/setup-deployment.sh
# Deploy
./scripts/deploy-all.sh --prodGitHub Actions workflows included:
- ci.yml: Run tests on every PR
- deploy.yml: Deploy to production on merge to main
- preview.yml: Create preview deployments for PRs
Set these secrets in GitHub:
VERCEL_TOKENRAILWAY_TOKEN
Full deployment docs: docs/DEPLOYMENT.md
| Command | Description |
|---|---|
AAPL |
Open security overview |
AAPL GP or AAPL CHART |
Price chart with indicators |
AAPL FA |
Fundamentals (financials) |
AAPL FILINGS |
SEC filings |
AAPL NEWS |
Company-specific news |
AAPL COMP MSFT GOOGL |
Compare multiple securities |
| Command | Description |
|---|---|
N or MARKET_NEWS |
Market-wide news |
ECO |
Economic calendar |
EARN or EARNINGS |
Earnings calendar |
YCRV or YIELD |
Yield curve |
MACRO |
Macroeconomic data |
SCREEN or SCREENER |
Stock screener |
CORR or CORRELATION |
Correlation matrix |
HEATMAP or MKTS |
Sector heatmap |
| Command | Description |
|---|---|
OPTIONS AAPL or OPT AAPL |
Options chain with Greeks |
ORDERBOOK or OB BTCUSDT |
Crypto order book |
| Command | Description |
|---|---|
SENTIMENT AAPL or SENT AAPL |
Social sentiment analysis |
INSIDER or FORM4 |
Insider trading tracker |
| Command | Description |
|---|---|
WL or WATCHLIST |
Watchlist manager |
WL ADD AAPL |
Add to watchlist |
PORT or PORTFOLIO |
Portfolio manager |
ALERT or ALT |
Alerts manager |
LP or LAUNCHPAD |
Saved workspaces |
HL or HELP |
Help & function catalog |
STATUS |
System status |
| Key | Action |
|---|---|
F1-F4 |
Focus panel 1-4 |
Alt+1 |
Single panel layout |
Alt+2 |
2-column layout |
Alt+3 |
2-row layout |
Alt+4 |
2x2 grid layout |
Alt+Enter |
Maximize focused panel |
Escape |
Restore / Cancel |
| Key | Action |
|---|---|
/ |
Focus command bar |
Tab |
Accept autocomplete |
Up/Down |
Navigate suggestions/history |
Enter |
Execute command |
Escape |
Clear input |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Frontend │◄──►│ Backend │───►│ Postgres │
│ (Next.js) │ WS │ (FastAPI) │ │ + Redis │
└─────────────┘ └──────┬──────┘ └─────────────┘
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ REST API │ │ WebSocket │ │ External │
│ Endpoints │ │ Streaming │ │ Sources │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌──────────────────────────┴──────────────────────────┐
│ Stooq │ FRED │ EDGAR │ Yahoo │ Finnhub │ Binance │
│ Alpha Vantage │ Polygon.io │ Reddit │ Twitter │
└─────────────────────────────────────────────────────┘
| Domain | Source | Cost | Real-Time |
|---|---|---|---|
| Equities | Alpha Vantage | Free | Yes (5/min) |
| Equities | Yahoo Finance | Free | Yes |
| Equities | Polygon.io | Free | Yes (WebSocket) |
| Crypto | Binance | Free | Yes (no API key) |
| Fundamentals | Yahoo Finance | Free | No |
| Filings | SEC EDGAR | Free | Yes |
| Macro Data | FRED | Free | Daily |
| News | Finnhub | Free tier | Yes |
| Sentiment | Reddit API | Free | Yes |
| Sentiment | Twitter API | Free tier | Yes |
All sources are free. See docs/C_DATA_SOURCES.md for details.
openterm/
├── backend/ # Python FastAPI backend
│ ├── app/
│ │ ├── api/ # REST endpoints
│ │ ├── adapters/ # External source adapters
│ │ ├── core/ # Config, DB, Redis
│ │ ├── models/ # SQLAlchemy models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ └── websocket/# WebSocket streaming
│ ├── alembic/ # Database migrations
│ └── tests/ # Unit & contract tests
├── frontend/ # Next.js frontend
│ └── src/
│ ├── app/ # Pages
│ ├── components/
│ │ ├── panels/ # All panel components
│ │ ├── chart/ # Chart-related components
│ │ └── workspace/ # Multi-panel workspace
│ ├── context/ # React context (Workspace, Alerts)
│ ├── hooks/ # Custom hooks (useRealtimeStream)
│ ├── types/ # TypeScript definitions
│ └── lib/ # API client, command parser
├── docs/ # Architecture & specs
└── docker-compose.yml
| Document | Description |
|---|---|
| A_PRODUCT_SPEC.md | Product requirements |
| B_ARCHITECTURE.md | System architecture |
| C_DATA_SOURCES.md | Data source details |
| D_DATA_MODEL.md | Database schema |
| E_API_SPEC.md | REST API specification |
| F_COMMAND_SPEC.md | Terminal command grammar |
# Run tests
make test
# Lint code
make lint
# View logs
make logs
# Database shell
make psql
# Rebuild containers
make buildOpenTerm includes 5 built-in workspace templates:
| Template | Panels |
|---|---|
| Trading View | Chart, News, Watchlist, Overview |
| Research View | Fundamentals, Filings, Chart, News |
| Macro View | Macro, Yield Curve, Econ Calendar, Market News |
| Portfolio View | Portfolio, Watchlist, Chart, News |
| Screener View | Screener, Chart, Fundamentals, News |
Access via LP or LAUNCHPAD command. Save custom workspaces for your workflow.
Full options chain with:
- Black-Scholes pricing model
- Greeks calculation (Delta, Gamma, Theta, Vega, Rho)
- Implied volatility display
- Straddle/Calls/Puts view toggle
- ITM highlighting
Access via OPTIONS AAPL or OPT AAPL.
Real-time sentiment analysis from:
- Reddit (r/wallstreetbets, r/stocks, r/investing)
- Twitter/X mentions
- StockTwits bull/bear ratio
- News sentiment
Access via SENTIMENT AAPL or SENT AAPL.
Track Form 4 filings:
- Recent insider transactions
- Buy/sell clustering detection
- Bullish/bearish signals
- Filter by ticker or view all
Access via INSIDER or FORM4.
Sector performance visualization:
- All 11 S&P 500 sectors
- Color-coded by performance
- Intensity shows magnitude
- Real-time updates via WebSocket
Access via HEATMAP or MKTS.
Real-time order book for crypto:
- Binance WebSocket (free, no API key)
- Top 10 bids and asks
- Depth visualization
- Spread calculation
Access via ORDERBOOK BTCUSDT or OB ETHUSDT.
Set alerts for:
- Price: Above, below, or crosses threshold
- Volume: Spike detection
- News: Any news for a ticker
- Earnings: Upcoming earnings reports
Access via ALERT or ALT command.
- Real-time rate limits: Free tier APIs have rate limits
- US equities focus: International coverage limited
- Single user: No authentication
- Mock data fallback: Some features use mock data when APIs unavailable
- Frontend: Next.js, TypeScript, TailwindCSS, lightweight-charts
- Backend: FastAPI, SQLAlchemy, Redis, aiohttp
- Database: PostgreSQL
- Real-Time: WebSocket (FastAPI + React hooks)
- Deployment: Vercel (frontend), Railway (backend), Docker Compose (local)
- Fork the repository
- Create a feature branch
- Run tests:
make test - Submit a pull request
MIT License - See LICENSE file.
- Stooq - Historical price data
- FRED - Economic data
- SEC EDGAR - Official filings
- Finnhub - News data
- Binance - Crypto WebSocket (free)
- Alpha Vantage - Real-time quotes
- TradingView Lightweight Charts