Agent skill

Yahoo Finance

by gauss314 in gauss314/skills

API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.

MITAuto-check passedBackend & APIs

Install Yahoo Finance

skills CLI
$ npx skills add gauss314/skills --skill yahoo-finance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gauss314/skills yahoo-finance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/yahoo-finance .claude/skills/yahoo-finance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yahoo-finance
GitHub stars
248
Token cost
~2.7k tokens
SKILL.md length
620 words
Files
6 (incl. scripts, references)
Skills in repo
32
Repo updated
First seen
Licence
MIT

At a glance

API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.

  • Works in 5 steps: Históricos OHLCV — v8/finance/chart → Quote — v7/finance/quote → Fundamentos — v10/finance/quoteSummary → …
  • Tasks that involve Stock and market analysis
  • SKILL.md covers ⚠️ Importante, Documentación completa, Autenticación: Cookie + Crumb and Endpoints — Resumen rápido, plus 5 more sections
  • Runs Python scripts from its folder; calls python; reaches query1.finance.yahoo.com and query2.finance.yahoo.com

What it does

Yahoo Finance is an agent skill from gauss314/skills. API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/API_REFERENCE.md`, `scripts/batch_fetch.py` and `scripts/download_historical.py`).

It sits in Backend & APIs, covering Stock and market analysis and Rate limiting. It works with yfinance. The repository describes itself as: Financial market data consumption skills for claude code and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Stock and market analysis
  • Tasks that involve Rate limiting

Example prompts

  • “/yahoo-finance”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Históricos OHLCV — v8/finance/chart
  2. Quote — v7/finance/quote
  3. Fundamentos — v10/finance/quoteSummary
  4. Opciones — v7/finance/options
  5. Búsqueda + Noticias — v1/finance/search

What it can do on your machine

Read from SKILL.md and the folder at commit 5156f81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • query1.finance.yahoo.com
    • query2.finance.yahoo.com
    • fc.yahoo.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yahoo Finance loads about 2.7k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 32 tokens; SKILL.md has 620 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from gauss314/skills at commit 5156f81, republished under its MIT licence (© gauss314). 620 words, ~2,719 tokens.

Download SKILL.mdSave it as .claude/skills/yahoo-finance/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
yahoo-finance
description
API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.
license
MIT

Yahoo Finance — API Directa (sin yfinance)

API no oficial de Yahoo Finance. Accedé a datos de acciones, ETFs, crypto, forex, bonos, índices, opciones, fundamentos y noticias mediante requests HTTP directos sin usar yfinance ni ningún wrapper.

Base URL: https://query1.finance.yahoo.com Alternativa: https://query2.finance.yahoo.com


⚠️ Importante

  • Yahoo no tiene API pública oficial desde 2017. Estos endpoints son no oficiales y pueden cambiar sin aviso.
  • Algunos endpoints requieren autenticación via cookie + crumb (abajo se explica).
  • El endpoint v8/finance/chart funciona sin autenticación (solo User-Agent de navegador).
  • Siempre implementar rate limiting y manejo de errores.

Documentación completa

Para referencia exhaustiva de todos los endpoints, campos, JSON structures, códigos de error, tickers internacionales, estrategias de rate limiting y ejemplos detallados, ver:

📖 references/API_REFERENCE.md

Ese documento incluye:

  • Los 33 módulos de quoteSummary con cada campo documentado
  • JSON responses completas de cada endpoint
  • Tickers internacionales (.BA para Argentina, .SA para Brasil, etc.)
  • WebSocket streaming
  • Screener, lookup, trending
  • Estrategias de rate limiting con exponential backoff y rotación de User-Agent

Varios endpoints requieren un crumb (token CSRF) que se obtiene con cookies de sesión.

python
import requests

BASE = "https://query1.finance.yahoo.com"
HEADERS = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
}

def yahoo_session():
    """Retorna requests.Session con cookie A3 y crumb."""
    s = requests.Session()
    s.headers.update(HEADERS)
    s.get("https://fc.yahoo.com", timeout=10)
    crumb = s.get(f"{BASE}/v1/test/getcrumb", timeout=10).text.strip()
    s.params = {"crumb": crumb}
    return s

# Uso:
# s = yahoo_session()
# r = s.get("https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL,MSFT")
Endpoints según autenticación
Sin auth (solo User-Agent)Requieren crumb
v8/finance/chart (históricos)v7/finance/quote (precios)
v1/finance/search (búsqueda)v10/finance/quoteSummary (fundamentos)
v1/finance/trending (tendencias)v7/finance/options (opciones)
v1/finance/lookup (lookup)v6/finance/recommendationsbysymbol

Endpoints — Resumen rápido

1. Históricos OHLCV — v8/finance/chart

GET https://query1.finance.yahoo.com/v8/finance/chart/{symbol}?range=1y&interval=1d

ParámetroEjemplos
range1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, 10y, ytd, max
interval1m, 5m, 15m, 1h, 1d, 1wk, 1mo
eventsdiv,splits (incluye dividendos y splits)
python
import requests
headers = {"User-Agent": "Mozilla/5.0 (...) Chrome/120.0.0.0 Safari/537.36"}
r = requests.get("https://query1.finance.yahoo.com/v8/finance/chart/AAPL",
                 params={"range": "1y", "interval": "1d", "events": "div,splits"},
                 headers=headers)
data = r.json()["chart"]["result"][0]
# data["timestamp"] -> fechas Unix
# data["indicators"]["quote"][0] -> open, high, low, close, volume
# data["indicators"]["adjclose"][0] -> precios ajustados
# data["events"] -> dividendos y splits
2. Quote — v7/finance/quote
python
s = yahoo_session()
r = s.get("https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL,MSFT,GOOGL")
quotes = r.json()["quoteResponse"]["result"]
for q in quotes:
    print(q["symbol"], q["regularMarketPrice"], q["regularMarketChangePercent"])

Campos: regularMarketPrice, regularMarketChangePercent, marketCap, trailingPE, fiftyTwoWeekHigh/Low, dividendYield, volume, marketState (PRE/REGULAR/POST/CLOSED).

3. Fundamentos — v10/finance/quoteSummary
python
s = yahoo_session()
r = s.get("https://query1.finance.yahoo.com/v10/finance/quoteSummary/AAPL",
          params={"modules": "assetProfile,financialData,defaultKeyStatistics,incomeStatementHistory,balanceSheetHistory,cashflowStatementHistory,earnings,recommendationTrend"})
fundamentals = r.json()["quoteSummary"]["result"][0]
profile = fundamentals["assetProfile"]           # sector, industry, employees, description
financials = fundamentals["financialData"]        # EBITDA, revenue, margins, ROE, ROA
stats = fundamentals["defaultKeyStatistics"]      # beta, shares, PE, PEG, short info

Hay 33 módulos disponibles. Ver lista completa en API_REFERENCE.md sección 4.

4. Opciones — v7/finance/options
python
s = yahoo_session()
r = s.get("https://query1.finance.yahoo.com/v7/finance/options/AAPL")
data = r.json()["optionChain"]["result"][0]
expirations = data["expirationDates"]
strikes = data["strikes"]
options = data["options"][0]  # calls + puts
python
r = requests.get("https://query1.finance.yahoo.com/v1/finance/search",
                 params={"q": "Apple", "quotesCount": 3, "newsCount": 5},
                 headers=HEADERS)
data = r.json()
# data["quotes"] -> tickers encontrados
# data["news"] -> noticias relacionadas

Scripts

ScriptDescripción
batch_fetch.pyBatch multi-ticker con token bucket + ThreadPoolExecutor. Quote batching (todos en 1 request). Charts en paralelo respetando rate limit.
fetch_all.pyScript integral: fetch de histórico + quote + fundamentals + opciones + search + recomendaciones. Genérico para cualquier ticker con argumentos CLI.
fetch_quote.pyFetch rápido de quote + fundamentals por ticker.
download_historical.pyDescarga históricos OHLCV a CSV.
batch_fetch.py — Batch multi-ticker con rate limiting
# Test seguro (3 tickers, solo chart, 2 req/s)
py scripts/batch_fetch.py --tickers AAPL,MSFT,NVDA --chart --rate 2.0

# Batch completo (quote en 1 request + charts en paralelo)
py scripts/batch_fetch.py --tickers AAPL,MSFT,NVDA,GOOGL,META,AMZN,TSLA --all --rate 2.0 --workers 4

# Solo quotes (siempre 1 request, imposible rate-limit)
py scripts/batch_fetch.py --tickers AAPL,MSFT,NVDA,GOOGL --quote

# Personalizar rate + workers
py scripts/batch_fetch.py --tickers AAPL,MSFT,NVDA --all --rate 1.5 --workers 3 --range 5y

Flags clave:

  • --rate : tokens/segundo del token bucket (default: 2.0 — máximo seguro)
  • --burst : tokens acumulables para ráfagas (default: 5)
  • --workers : hilos en paralelo (default: 4)

Arquitectura:

  1. Fase 1 — Quote batch: todos los tickers en 1 sola request (v7/finance/quote?symbols=AAPL,MSFT,...)
  2. Fase 2 — Token bucket: ThreadPoolExecutor con TokenBucket thread-safe compartido entre workers. Cada worker adquiere un token antes de cada request. A 2 req/s con burst=5, se pueden lanzar hasta 5 requests instantáneas sin bloquear; luego el bucket estabiliza el throughput.
Show full SKILL.md (213 more words)Show less
fetch_all.py — El script principal
python scripts/fetch_all.py --ticker AAPL --all                     # Todo lo disponible
python scripts/fetch_all.py --ticker GGAL --all --range 5y --interval 1d  # GGAL con 5 años
python scripts/fetch_all.py --ticker MSFT --chart --range max        # Histórico completo
python scripts/fetch_all.py --ticker NVDA --quote --fundamentals     # Quote + fundamentals
python scripts/fetch_all.py --ticker TSLA --all --all-modules        # Todos los módulos (~33)
python scripts/fetch_all.py --ticker AAPL --options                  # Solo opciones
python scripts/fetch_all.py -t AAPL -o mi_data.json -q               # Output a archivo, quiet

Flags principales:

  • --all : fetch de todo (chart, quote, fundamentals, options, search, recommendations)
  • --chart : histórico OHLCV
  • --quote : precio en tiempo real
  • --fundamentals : fundamentos (quoteSummary)
  • --options : cadena de opciones
  • --search : búsqueda y noticias
  • --range / --interval : control del histórico
  • --modules / --all-modules : módulos de quoteSummary
  • --output : archivo JSON de salida
Prueba real con GGAL (testeado)
>> Chart (1y, 1d)... OK 250 bars
>> Quote...             OK Price: $50.33 (-1.62%)
>> Fundamentals...      OK 12 módulos (core)
>> Options...           OK 5 expiration dates, 17 calls, 19 puts
>> Search+News...       OK 5 news items
Guardado en: ggal_temp.json  (123 KB)

Tickers internacionales

Yahoo Finance usa sufijos para mercados fuera de EE.UU.:

MercadoSufijoEjemplo
Argentina (BCBA).BAGGAL.BA, YPFD.BA
Brasil (Bovespa).SAPETR4.SA, VALE3.SA
México (BMV).MXWALMEX.MX
Crypto-USDBTC-USD, ETH-USD
Forex=XEURUSD=X
Índices^^GSPC (S&P 500)

Ver lista completa en API_REFERENCE.md sección 14.


Rate Limits

LímiteComportamiento
~2 req/sSeguro
3-5 req/sProbabilidad alta de 429
>10 req/sIP block temporal

Siempre usar time.sleep(0.5) entre requests e implementar exponential backoff.

Para fetch multi-ticker, usar batch_fetch.py que implementa token bucket a 2 req/s con burst de 5. A diferencia de yfinance (que no tiene rate limiter y lanza N threads simultáneos), batch_fetch garantiza que el throughput agregado no supere el límite seguro.


Errores Comunes

ErrorCausaSolución
401 UnauthorizedFalta crumbUsar yahoo_session()
429 Too Many RequestsRate limitEsperar 30-60s
Bad RequestCrumb expiradoRegenerar crumb
result vacíoTicker inválidoVerificar con search primero
Python-requests blockUser-Agent defaultSetear uno de navegador

Estructura del skill

skills/yahoo-finance/
├── SKILL.md                          # Este archivo (quickstart)
├── references/
│   └── API_REFERENCE.md              # Documentación completa de todos los endpoints
└── scripts/
    ├── batch_fetch.py                # Batch multi-ticker con rate limiting (recomendado)
    ├── fetch_all.py                  # Script integral
    ├── fetch_quote.py                # Quote + fundamentals rápido
    └── download_historical.py        # Históricos a CSV

© gauss314, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/yahoo-finance of gauss314/skills.

  • SKILL.md
  • references/API_REFERENCE.md
  • scripts/batch_fetch.py
  • scripts/download_historical.py
  • scripts/fetch_all.py
  • scripts/fetch_quote.py

Open the folder on GitHubat commit 5156f81

Compare with similar skills

Yahoo Finance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yahoo Finance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yahoo Finance this skillgauss314/skills248—~2.7kAutomated safety check: PassMIT
YfinanceSilvioBaratto/optimizer176—~4kAutomated safety check: NotesCustom licence
Investlongsizhuo/openInvest108—~5.9kAutomated safety check: NotesMIT
Stock Analysis24mlight/StockClaw1012 repos~2kAutomated safety check: NotesMIT
Web3 PolymarketPolymarket/agent-skills1921 repos~2kAutomated safety check: PassNone
Regimejackson-video-resources/markov-hedge-fund-method484—~1.6kAutomated safety check: PassCustom licence

Similar skills

  • Yfinance

    SilvioBaratto/optimizer

    Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…

    176 GitHub stars~4k tokensUpdated 4 days ago
    Business, Finance & HRAuto-check: notes
  • Invest

    longsizhuo/openInvest

    openInvest multi-asset AI investment committee — daily use. An agent skill from longsizhuo/openInvest.

    108 GitHub stars~5.9k tokensUpdated today
    Business, Finance & HRAuto-check: notes
  • Stock Analysis

    24mlight/StockClaw

    Analyze stocks and cryptocurrencies using Yahoo Finance data.

    101 GitHub starsUsed in 2 repos~2k tokens
    Business, Finance & HRAuto-check: notes
  • Web3 Polymarket

    Polymarket/agent-skills

    Polymarket integration for prediction market trading on Polygon.

    192 GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Regime

    jackson-video-resources/markov-hedge-fund-method

    Detect the market regime (Bull / Bear / Sideways) for ANY asset and turn it into a tradeable signal or a risk filter.

    484 GitHub stars~1.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Stock Value Analyzer

    FunnyKun/stock-value-analyzer

    基于邱国鹭《投资中最简单的事》方法论的股票价值分析器(v2.0 双层架构)。通过"三好原则"(好行业、好公司、好价格)系统评估一只股票是否值得投资。v2.0 在原定性框架之上注入一套可量化、可复现的硬模型层——反向 DCF 反解市场隐含增速、情景概率加权估值、EPV 盈利能力价值、分行业估值路由、杜邦三/五因子分解、ROIC vs WACC、Piotroski F-Score、Beneish…

    141 GitHub stars~3.3k tokensUpdated 3 mo ago
    Business, Finance & HRAuto-check passed

More from gauss314/skills

All 32 skills in this repo
  • Backtesting

    gauss314/skills

    Academic backtesting framework for quantitative research. An agent skill from gauss314/skills.

    248 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Google Finance

    gauss314/skills

    Datos de Google Finance via batchexecute (API RPC interna sin auth ni API key).

    248 GitHub stars~3.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Historyofmarket

    gauss314/skills

    History of Market (historyofmarket.com) — API publica con 88 datasets historicos de indices US desde 1871.

    248 GitHub stars~1.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Indec

    gauss314/skills

    Datos macro y sociales de Argentina via la API oficial Series de Tiempo del Estado (apis.datos.gob.ar/series).

    248 GitHub stars~3k tokensUpdated 3 mo ago
    Auto-check passed
  • Morningstar

    gauss314/skills

    Morningstar Screener via API JSON publica: descarga masiva de 53 universes (102K+ listings, 39 paises, NYSE/Nasdaq/BCBA/etc) con 33 campos (precio, market cap, ratios, retornos…

    248 GitHub stars~2.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Option Pricing

    gauss314/skills

    Pricing completo de opciones europeas y americanas. An agent skill from gauss314/skills.

    248 GitHub stars~4.7k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Yahoo Finance

What does Yahoo Finance do?

API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers. Yahoo Finance is an agent skill from gauss314/skills. API no oficial de Yahoo Finance: precios, históricos, fundamentales, opciones, noticias en JSON puro sin wrappers.

When should I use Yahoo Finance?

Yahoo Finance fits situations like: tasks that involve Stock and market analysis; tasks that involve Rate limiting.

How do I install Yahoo Finance in Claude Code?

Run `npx skills add gauss314/skills --skill yahoo-finance -a claude-code`. Or copy the skill folder (skills/yahoo-finance in gauss314/skills) into .claude/skills/yahoo-finance in your project. Claude Code loads it when a task matches its description.

How do I install Yahoo Finance in Codex?

Run `npx skills add gauss314/skills --skill yahoo-finance -a codex`. Or copy the skill folder (skills/yahoo-finance in gauss314/skills) into .agents/skills/yahoo-finance in your project. Codex loads it when a task matches its description.

Can I use Yahoo Finance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gauss314/skills --skill yahoo-finance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yahoo-finance, .gemini/skills/yahoo-finance, .github/skills/yahoo-finance and .opencode/skills/yahoo-finance in your project.

What does Yahoo Finance need to run?

Going by SKILL.md and its folder, Yahoo Finance needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Yahoo Finance access the network?

SKILL.md names 3 domains. In commands or code: query1.finance.yahoo.com, query2.finance.yahoo.com and fc.yahoo.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Yahoo Finance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Yahoo Finance use?

Yahoo Finance is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yahoo Finance use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Yahoo Finance?

Skills that share tags, products or a category with Yahoo Finance: Yfinance (SilvioBaratto/optimizer, 176 stars), Invest (longsizhuo/openInvest, 108 stars), Stock Analysis (24mlight/StockClaw, 101 stars) and Web3 Polymarket (Polymarket/agent-skills, 192 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yahoo Finance?

gauss314 (a GitHub user) maintains it in gauss314/skills, which has 248 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on June 14, 2026.

Source: gauss314/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.