stocks

Fetch stock quotes, price history, and crypto prices from Yahoo Finance via CLI.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill stocks-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stocks
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/optional-skills/finance/stocks
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill stocks-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Getting quick market data usually requires paid APIs, API keys, or heavy libraries. This Skill retrieves stock quotes, historical prices, ticker search, comparisons, and crypto prices using only Python's standard library and Yahoo Finance's public endpoints. ## Core Features & Use Cases - Real-Time Quotes: Get current price, change, volume, and 52-week high/low for one or more tickers like AAPL, MSFT, or TSLA. - History & Comparison: Pull daily OHLCV history over ranges from 1 month to 5 years, and compare multiple tickers side by side. - Crypto Prices: Query crypto prices such as BTC, ETH, or SOL with automatic -USD suffix handling. - Use Case: Ask for a comparison of AAPL, MSFT, and GOOGL and receive a JSON report with prices, percent changes, and 52-week performance for each. ## Quick Start Ask the agent to get the current stock quote for AAPL using the stocks skill.

Frequently Asked Questions about stocks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a stock quote from Yahoo Finance in Python?▼

Run the stocks_client.py script with the quote command followed by ticker symbols, such as python3 stocks_client.py quote AAPL MSFT. It returns JSON with price, change, volume, and 52-week high and low using only the Python standard library.

How to get historical stock price data without an API key?▼

Use the history command with a symbol and a range flag, for example python3 stocks_client.py history NVDA --range 6mo. It fetches daily OHLCV data from Yahoo Finance's unofficial endpoint and includes stats like min, max, average, and total return.

Does this stock quote tool require installing Python packages?▼

No external packages are required. The script uses only Python 3.8+ standard library modules like urllib, json, and argparse, so no pip installs or API keys are needed for basic quotes, history, search, compare, and crypto commands.

Why do market cap and PE ratio return null in Yahoo Finance quotes?▼

Yahoo's crumb-protected fields can return null when the session crumb is not established. Set the ALPHA_VANTAGE_KEY environment variable with a free Alpha Vantage key to backfill market cap, PE ratio, and 52-week levels.

Can this tool place stock orders or connect to a brokerage account?▼

No, it is strictly read-only market data retrieval. It supports quote, search, history, compare, and crypto commands but has no order placement, trading, or account integration capabilities.

What are the limitations of using Yahoo Finance's unofficial API?▼

The endpoints are unofficial and can change or rate-limit without notice, causing requests to fail. Adding small delays between bulk requests helps avoid rate-limiting, and there is no guaranteed uptime or data SLA.