← 返回
未分类 中文

Yahoo Finance News

Fetch recent finance news headlines for stock, ETF, and index symbols via Yahoo Finance (yfinance), with caching and structured JSON output.
通过 Yahoo Finance (yfinance) 获取股票、ETF 和指数代码的最新财经新闻标题,支持缓存和结构化 JSON 输出。
phonphrm phonphrm 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 621
下载
💾 6
安装
1
版本
#latest

概述

Finance News Skill

Attribution: based on finance skill patterns by @@anton-roos.

Fetch recent finance news for Yahoo symbols (stocks, ETFs, indices) using yfinance.

It is optimized for:

  • quick headline checks before market decisions
  • summarizing top stories by symbol
  • avoiding repeated requests with local cache

When to use

Use this skill when the user asks:

  • "What are the latest news for AAPL?"
  • "Show recent headlines for TSLA."
  • "Give me links and publication times for MSFT news."
  • "Any major news on ^GSPC today?"

If the user asks for multiple symbols, run the script once per symbol and merge/summarize results.

Common trigger phrases:

  • "latest news"
  • "stock news"
  • "ticker headlines"
  • "news for"
  • "market news"

Provider strategy

  • Default provider: Yahoo Finance via yfinance
  • No API key required
  • Data quality/availability is best-effort and may vary by symbol
  • News freshness and coverage can vary by region, source, and Yahoo response quality

Quick start (how you run it)

These scripts are intended to be run from a terminal. The agent should:

1) ensure dependencies installed

2) run the scripts

3) summarize results cleanly

Install:

cd {baseDir}
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate

Quick start (agent execution)

Run from this skill directory.

Install dependencies:

pip install -r {baseDir}/requirements.txt

Commands

1) Fetch recent news (JSON)

Examples:

python {baseDir}/scripts/market_news.py AAPL
python {baseDir}/scripts/market_news.py TSLA --limit 15
python {baseDir}/scripts/market_news.py ^GSPC --limit 10

2) Force refresh (skip cache)

python {baseDir}/scripts/market_news.py NVDA --no-cache

3) Tune cache behavior

python {baseDir}/scripts/market_news.py AAPL --ttl 60
python {baseDir}/scripts/market_news.py AAPL --ttl 0 --no-cache

4) Multi-symbol workflow

python {baseDir}/scripts/market_news.py AAPL --limit 8
python {baseDir}/scripts/market_news.py MSFT --limit 8
python {baseDir}/scripts/market_news.py NVDA --limit 8

Then produce one consolidated summary grouped by symbol.


Agent workflow

1) Detect requested symbol(s) and desired depth (limit, default 10).

2) Run the script for each symbol.

3) Parse JSON and extract top items by recency and relevance.

4) For every returned news item, include its URL (url preferred, fallback to link).

5) Return a concise human summary plus per-item links.

6) If there are zero items, say so clearly and suggest retry (--no-cache) or another symbol.


Output expectations

  • Script output is JSON with: symbol, source, fetched_at_*, count, items, note.
  • Each item usually includes: title, publisher, published_at_unix, published_at_utc, url, link, summary.
  • User-facing response should include:
  • top headlines (up to requested limit)
  • publish time (UTC)
  • source/publisher
  • direct URL/link for each headline

Mandatory rule:

  • Do not output a headline without a URL.
  • For each item, use url first; if missing, use link.
  • If both are missing, write URL not available for that item.

Recommended item format:

- <title>
	Publisher: <publisher>
	Published (UTC): <published_at_utc>
	URL: <url or link>

Suggested response structure:

1) One-line market/news context (if obvious).

2) Bulleted top headlines.

3) Caveat if coverage is sparse or stale.


Safety / correctness

  • Do not claim coverage is complete or real-time.
  • Mention Yahoo/yfinance is unofficial and best-effort.
  • If Yahoo is unreachable or rate-limited, report failure and suggest retrying with lower frequency.
  • Avoid trading advice phrasing; present informational summaries.

Failure handling

  • count = 0: return "No recent items found" and suggest --no-cache retry.
  • Network/provider error: surface error briefly, then propose retry.
  • Repeated rate-limit symptoms: increase cache TTL and reduce request frequency.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-30 16:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 208 📥 65,057
professional

All-Market Financial Data Hub

financial-ai-analyst
基于东方财富数据库,支持自然语言查询金融数据,覆盖A股、港股、美股、基金、债券等资产,提供实时行情、公司信息、估值、财务报表等,适用于投资研究、交易复盘、市场监控、行业分析、信用研究、财报审计、资产配置等场景,满足机构与个人需求。返回结果为
★ 136 📥 43,591
professional

Stock Monitor

thirtyfang
全功能智能股票监控预警系统。支持成本百分比、均线金叉死叉、RSI超买超卖、成交量异动、跳空缺口、动态止盈等7大预警规则。符合中国投资者习惯(红涨绿跌)。
★ 101 📥 33,522