Command-line tool for getting real-time stock prices, historical data, and market analysis from Yahoo Finance.
npx skills add DeGrandis/stock_cliNo dependencies required - uses only Node.js built-in modules (https).
node index.js price <SYMBOL>node index.js history <SYMBOL> [range]Available ranges: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
Returns current market data:
- Current Price: Latest trading price
- Daily Change: Dollar amount and percentage change
- Last Update: Timestamp of quote
Returns comprehensive historical analysis:
- Summary Statistics: Starting/ending price, total change, period high/low
- Volatility Metrics: Price range and percentage volatility
- Volume Analysis: Average daily trading volume
- Recent Prices Table: Last 10 days with close, high, low, volume
# Apple stock price 🍎
node index.js price AAPL
# Bitcoin price in USD ₿
node index.js price BTC-USD
# S&P 500 Index 📊
node index.js price ^GSPC# Apple stock over last month 📅
node index.js history AAPL 1mo
# Output:
# === AAPL Historical Data (1mo) ===
# Period: 1/21/2026 to 2/20/2026
# Data Points: 22 days
#
# SUMMARY:
# Starting Price: $247.65
# Ending Price: $264.58
# Change: +$16.93 (+6.84%)
# Period High: $280.91
# Period Low: $244.68
# Volatility: $36.23 (14.81%)
# Avg Volume: 54.94M shares/day
# Tesla over the past year 🚗
node index.js history TSLA 1y
# Bitcoin 6-month trend ₿
node index.js history BTC-USD 6mo
# S&P 500 year-to-date performance 📈
node index.js history ^GSPC ytd- Stocks: Use ticker symbols (AAPL, MSFT, GOOGL, etc.)
- Cryptocurrencies: Use format CRYPTO-USD (BTC-USD, ETH-USD, etc.)
- Market Indices: Use ^ prefix (^GSPC for S&P 500, ^DJI for Dow Jones)
- ETFs: Standard ticker symbols (SPY, QQQ, etc.)
- 📊 Real-time Prices: Current market data with daily changes
- 📈 Historical Analysis: Price trends with summary statistics
- 💹 Volatility Metrics: Period highs, lows, and price ranges
- 📉 Volume Analysis: Trading activity and average volume
- 🔍 Recent Data Table: Last 10 days of trading with full OHLC data
- 🌍 Multi-Asset Support: Stocks, crypto, indices, and ETFs
- ⚡ Zero Dependencies: Pure Node.js with built-in
httpsmodule
- Trend Analysis 📊: "Has AAPL been going up or down this month?"
- Comparison ⚖️: "Which is more volatile, TSLA or AAPL?"
- Pattern Detection 🔍: Identify volume spikes and price drops
- Investment Advice 💡: Provide context with historical performance
- Summary Statistics 📝: Quick answers without parsing full data
- Check current stock prices
- Analyze price trends over time
- Compare performance across periods
- Identify trading opportunities
- Track portfolio performance
- Research investment options
- Zero dependencies: Uses only Node.js built-in
httpsmodule - Data Source: Yahoo Finance API (
query1.finance.yahoo.com) - Update Frequency: Real-time during market hours
- No authentication required: Public data endpoint
- LLM-Optimized Output: Summary statistics + tabular data for easy parsing
- Prices update in real-time during market hours
- After-hours data may be delayed
- Cryptocurrency prices update 24/7
- Some symbols may require specific formatting (check Yahoo Finance for correct format)
MIT