运行时依赖
安装命令
点击复制技能文档
Stock Price 检查er
获取 current stock prices from Yahoo Finance using the yfinance 库.
Quick Commands cd 技能s/stock-price-检查er
# 检查 stock price python3 stock-price.py NVDA
# 检查 another stock python3 stock-price.py AAPL
Usage Examples
检查 NVIDIA stock:
python3 stock-price.py NVDA
检查 VOO (S&P 500 ETF):
python3 stock-price.py VOO
检查 QQQ (Nasdaq-100 ETF):
python3 stock-price.py QQQ
检查 any stock symbol:
python3 stock-price.py TSLA python3 stock-price.py MSFT python3 stock-price.py AAPL
输出 格式化 { "symbol": "NVDA", "price": 189.52, "change": 3.05, "change_percent": 1.64, "previous_close": 186.47, "market_cap": 4614243483648, "volume": 112439494, "fifty_two_week_high": 212.19, "fifty_two_week_low": 86.62 }
Technical Notes Uses yfinance 库 to fetch data from Yahoo Finance No API key required Handles errors gracefully Works with most major stocks and ETFs Returns comprehensive data including market cap, volume, and 52-week range Troubleshooting If the stock symbol is invalid, the script will return an error Some data (like market cap) may not be avAIlable for all symbols