US Stock Bar for VSCode
Real-time US stock quotes displayed directly in your VSCode status bar using accurate market data from Finnhub.
Features
- 📊 Real-time stock quotes - Live data for US stocks
- 💹 Multiple stocks - Monitor multiple symbols simultaneously
- 🎨 Color-coded changes - Green for gains, red for losses
- ⚡ Fast updates - Customizable refresh intervals (min 5 seconds)
- 🔔 Hover details - View detailed info on hover
- 🌐 Reliable data - Powered by Finnhub API
Installation
From Source
- Clone this repository
- Run
npm install
- Run
npm run compile
- Press F5 to open a new VSCode window with the extension loaded
From VSIX
- Package the extension:
vsce package
- Install the .vsix file in VSCode
Setup
Get Free API Key
- Visit Finnhub.io
- Sign up for a free account
- Copy your API key from the dashboard
- In VSCode, open Settings (Cmd/Ctrl + ,)
- Search for "US Stock Bar API Key"
- Paste your API key
Free tier includes:
- 60 API calls per minute
- Real-time US stock quotes
- No credit card required
Usage
Commands
Open command palette (Cmd/Ctrl + Shift + P):
US Stock Bar: Show
- Start displaying stocks
US Stock Bar: Hide
- Stop displaying stocks
US Stock Bar: Add Stock
- Add a new stock symbol
US Stock Bar: Refresh Now
- Manually refresh data
Configuration
Open Settings (Cmd/Ctrl + ,) and search for "US Stock Bar":
{
// List of stock symbols to monitor
"us-stock-bar.stocks": ["AAPL", "GOOGL", "MSFT", "TSLA", "NVDA"],
// Your Finnhub API key
"us-stock-bar.apiKey": "your_api_key_here",
// Update interval in milliseconds (minimum 5000)
"us-stock-bar.updateInterval": 10000,
// Show company name instead of symbol
"us-stock-bar.showCompanyName": false,
// Color for rising stocks
"us-stock-bar.riseColor": "#26a69a",
// Color for falling stocks
"us-stock-bar.fallColor": "#ef5350"
}
Popular Stock Symbols
Tech Giants:
- AAPL (Apple)
- GOOGL (Google/Alphabet)
- MSFT (Microsoft)
- AMZN (Amazon)
- META (Meta/Facebook)
- NVDA (NVIDIA)
- TSLA (Tesla)
Index Funds:
- SPY (S&P 500 ETF)
- QQQ (NASDAQ-100 ETF)
- DIA (Dow Jones ETF)
Finance:
- JPM (JPMorgan Chase)
- BAC (Bank of America)
- GS (Goldman Sachs)
API Rate Limits
Finnhub free tier provides:
- 60 calls/minute
- 30 calls/second (burst)
With 5 stocks and 10-second intervals, you'll use ~30 calls/minute - well within limits.
Development
Project Structure
us-stock-bar/
├── src/
│ └── extension.ts # Main extension code
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
└── README.md # Documentation
Build Commands
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode (auto-compile on save)
npm run watch
# Package for distribution
vsce package
Testing
Press F5 in VSCode to launch Extension Development Host with your extension loaded.
Alternative Data Sources
If you want to use different APIs:
Yahoo Finance (Unofficial)
- Free but unstable
- No API key required
- Module:
yahoo-finance2
Alpha Vantage
- 25 calls/day (very limited)
- Requires API key
- Good for testing only
IEX Cloud
- 50K credits/month free
- Requires API key
- More generous than Alpha Vantage
Polygon.io
- Free tier has 15-minute delay
- Paid tiers for real-time
- Very reliable
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - See LICENSE file for details
Acknowledgments
Support
If you encounter issues:
- Check your API key is valid
- Verify symbols are correct US stock tickers
- Check API rate limits
- Open an issue on GitHub
Happy Trading! 📈
Disclaimer: This extension is for informational purposes only. Not financial advice.