CodeTicker
A stock monitoring tool disguised as a code assistant for developers. Monitor real-time stock prices while coding, with multiple disguise modes to stay hidden.
Features
- Multiple Disguise Modes: Status bar, sidebar, terminal output - choose your preferred hiding spot
- Real-time Stock Data: Support for A-shares (Shanghai/Shenzhen), HK, and US markets
- Smart Rotation: Auto-rotate through multiple stocks in status bar
- Price Alerts: Get notified when stocks hit your threshold
- Stock Management: Add/remove stocks with quick pick menu
- Mini Names: Show abbreviated stock names for cleaner display
- Sorting Options: Sort by change percentage or keep custom order
- Cost Price & P/L Tracking: Set cost prices and see profit/loss percentage in real-time
- Emergency Hide: Instant hide/show with
Ctrl+Shift+H
Installation
- Open VSCode
- Go to Extensions (
Ctrl+Shift+X)
- Click "..." menu → "Install from VSIX..."
- Select the
.vsix file
- Reload VSCode
Or load from directory:
- Open VSCode
Ctrl+Shift+P → Developer: Install Extension from Location...
- Select the
extension folder
Configuration
All settings are under the codeTicker namespace:
Basic Settings
| Setting |
Default |
Description |
codeTicker.stocks |
[] |
Stock codes to monitor (e.g., sh600519, sz000858) |
codeTicker.disguiseMode |
statusbar |
Display mode: statusbar, sidebar, terminal, all |
codeTicker.refreshInterval |
30 |
Data refresh interval in seconds (5-300) |
codeTicker.hideOnStartup |
false |
Start with display hidden |
Status Bar Settings
| Setting |
Default |
Description |
codeTicker.statusBarStyle |
minimal |
Status bar style: minimal, full, percentage |
codeTicker.rotationInterval |
5 |
Status bar rotation interval in seconds (1-60) |
codeTicker.maxDisplayCount |
5 |
Max stocks to display in status bar (1-20) |
codeTicker.showMiniName |
false |
Show abbreviated stock names |
codeTicker.stockSortType |
custom |
Sort method: custom, changeAsc, changeDesc |
Appearance
| Setting |
Default |
Description |
codeTicker.riseColor |
#808080 |
Color for rising stocks (default: gray) |
codeTicker.fallColor |
#808080 |
Color for falling stocks (default: gray) |
codeTicker.profitColor |
#808080 |
Color for profit display |
codeTicker.lossColor |
#808080 |
Color for loss display |
Advanced
| Setting |
Default |
Description |
codeTicker.alertThreshold |
5.0 |
Alert threshold percentage |
codeTicker.stockCosts |
{} |
Cost price mapping (use command to set) |
codeTicker.stockMiniNames |
{} |
Custom mini name mapping (use command to set) |
Commands
Click the status bar indicator to open the action menu:
| Action |
Description |
| View Stocks |
View current stock list and real-time status |
| Add Stock |
Add a new stock to monitor |
| Remove Stock |
Remove a stock from the list |
| Refresh Data |
Manually refresh stock data |
| Hide CodeTicker |
Hide all stock displays |
Command Palette
| Command |
Palette Name |
Description |
codeTicker.addStock |
CodeTicker: Add Stock |
Add new stock |
codeTicker.removeStock |
CodeTicker: Remove Stock |
Remove stock from list |
codeTicker.toggleVisibility |
CodeTicker: Toggle Visibility |
Emergency hide/show |
codeTicker.refreshData |
CodeTicker: Refresh Data |
Force data refresh |
codeTicker.setCostPrice |
CodeTicker: Set Cost Price |
Set cost price for P/L tracking |
codeTicker.setMiniName |
CodeTicker: Set Mini Name |
Set custom mini name for stock |
Disguise Modes
Status Bar Mode
- Shows stock price/change in the bottom status bar
- Auto-rotates through multiple stocks
- Looks like encoding or build info
- Shows stock list in the activity bar
- Disguised as "Remote Tracking" (looks like Git sync)
- Collapsible groups by market (A-Share, HK, US)
Terminal Mode
- Shows stock data in terminal output channel
- Disguised as sync logs with
[sync] prefix
- Each stock on a separate line
All Mode
- Shows all modes simultaneously
- Useful for testing or maximum visibility
Cost Price & Profit/Loss Tracking
Set cost prices for your stocks to track profit/loss in real-time:
- Open Command Palette (
Ctrl+Shift+P)
- Run
CodeTicker: Set Cost Price
- Select a stock and enter the cost price
- Profit/loss percentage will appear in all display modes:
- Status Bar:
茅台:1856↑2.3% [+3.1%]
- Sidebar:
↑ 茅台 1856.00 ↑2.3% [+3.1%]
- Terminal:
[sync] 茅台 @ 1856.00 ↑2.3% [+3.1%]
The profit/loss is calculated as: (current price - cost price) / cost price × 100%
You can also set custom mini names using CodeTicker: Set Mini Name command.
Usage
- Click the status bar indicator
- Select "Add Stock"
- Enter a stock code (e.g.,
sh600519 for 贵州茅台)
- Stock data appears in your chosen disguise mode
Add Stock with Cost Price
You can set the cost price when adding a stock using the format code:cost:
sh600519:1800 - Add 贵州茅台 with cost price ¥1800
sz600900:28 - Add 长江电力 with cost price ¥28
sz300750:240.50 - Add 宁德时代 with cost price ¥240.50
If the stock already exists, only the cost price will be updated.
Note: This format also works in Settings UI. When you click "Add Item" in CodeTicker > Stocks, you can directly enter sz600900:28. The plugin will automatically parse and set the cost price.
| Market |
Format |
Example |
| Shanghai A-Share |
sh + 6 digits |
sh600519 (贵州茅台) |
| Shenzhen A-Share |
sz + 6 digits |
sz000858 (五粮液) |
| ChiNext (创业板) |
sz + 6 digits |
sz300750 (宁德时代) |
| Hong Kong |
hk + 5 digits |
hk00700 (腾讯) |
| US Stock |
us + ticker |
usAAPL (Apple) |
Keyboard Shortcuts
Ctrl+Shift+H (Windows/Linux) / Cmd+Shift+H (Mac): Toggle visibility
Troubleshooting
No status bar indicator?
- Check that stocks are configured in settings
- Verify you're not in "hidden" mode (
Ctrl+Shift+H to toggle)
Data not refreshing?
- Check network connectivity
- Verify refresh interval setting
- Run "Refresh Data" command manually
Stocks not showing in sidebar?
- Make sure
disguiseMode is set to sidebar or all
- Check that stocks are configured
Privacy
CodeTicker collects no personal data. All processing happens locally. Network requests are limited to public data endpoints (Sina Finance API) for stock data.
License
MIT
CodeTicker - Monitor stocks while coding, stay hidden.