← Back to Skills Marketplace
美股雷达
by
Bear Xiong
· GitHub ↗
· v1.0.0
· MIT-0
36
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install us-stock-radar-gold3bear
Description
美股行情与舆情监控工具。当用户询问「美股怎么样」「纳指」「标普」「道指」「美股大盘」「今晚美股」「US股」「美股行情」「美股期货」「NQ」「ES」时使用。支持Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。
README (SKILL.md)
美股雷达 (US-Stock Radar)
数据源总览
| 数据源 | 用途 | 稳定性 |
|---|---|---|
| Yahoo Finance | 主要指数(SPY/QQQ/DIA/IWM)实时行情 | ⭐⭐⭐ |
| Yahoo Finance | 个股行情(NVDA/AAPL/MSFT/TSLA等) | ⭐⭐⭐ |
| TradingView 嵌入页 | NQ/ES 期货实时图表(浏览器截图) | ⭐⭐ |
| Google News RSS | 美股突发新闻 | ⭐⭐⭐ |
实时行情查询
NY Fed 宏观利率 API
import requests
def get_macro_rates():
"""NY Fed 官方利率(SOFR/EFFR/OBFR/TGCR/BGCR)"""
url = "https://markets.newyorkfed.org/api/rates/all/latest.json"
headers = {"User-Agent": "Mozilla/5.0", "Accept": "application/json"}
r = requests.get(url, headers=headers, timeout=10)
return r.json()["refRates"]
# 返回: SOFR=3.64%, EFFR=3.64%, OBFR=3.64%, TGCR=3.62%, BGCR=3.62%
FRED 国债收益率
def get_treasury_yields():
"""10Y 和 2Y 国债收益率(无需 API key)"""
for sid, name in [("DGS10", "10Y"), ("DGS2", "2Y")]:
url = f"https://fred.stlouisfed.org/graph/fredgraph.csv?id={sid}&vintage_date=2026-04-24"
r = requests.get(url, timeout=10)
last = r.text.strip().split('\
')[-1] # 格式: "2026-04-22,4.30"
Yahoo Finance(主要指数)
import requests
US_INDICES = {
"^GSPC": "标普500",
"^DJI": "道琼斯",
"^IXIC": "纳斯达克",
"^VIX": "VIX恐慌指数",
"NQ=F": "纳斯达克期货(NQ)",
"ES=F": "标普期货(ES)",
"CL=F": "WTI原油",
"GC=F": "黄金",
"SI=F": "白银",
}
def get_us_indices():
"""批量获取美股指数 + 期货 + 大宗商品"""
symbols = ",".join(US_INDICES.keys())
url = f"https://query1.finance.yahoo.com/v7/finance/quote?symbols={symbols}"
headers = {"User-Agent": "Mozilla/5.0"}
r = requests.get(url, headers=headers, timeout=10)
results = r.json()["quoteResponse"]["result"]
out = {}
for item in results:
sym = item["symbol"]
name = US_INDICES.get(sym, sym)
price = item.get("regularMarketPrice", 0)
prev = item.get("regularMarketPreviousClose", 0)
chg = item.get("regularMarketChange", 0)
pct = item.get("regularMarketChangePercent", 0)
arrow = "🔴" if chg > 0 else "🟢" if chg \x3C 0 else "⚪"
out[sym] = f"{arrow} {name}: {price} {chg:+.2f}({pct:+.2f}%)"
return out
Yahoo Finance(个股行情)
import requests
MAJOR_STOCKS = {
"NVDA": "英伟达",
"AAPL": "苹果",
"MSFT": "微软",
"GOOGL": "谷歌",
"AMZN": "亚马逊",
"META": "Meta",
"TSLA": "特斯拉",
"AMD": "AMD",
"NFLX": "Netflix",
"CRM": "Salesforce",
}
def get_us_stocks(symbols):
"""获取美股个股行情,支持多代码"""
if isinstance(symbols, str):
symbols = [symbols]
sym_str = ",".join([s.upper() for s in symbols])
url = f"https://query1.finance.yahoo.com/v7/finance/quote?symbols={sym_str}"
headers = {"User-Agent": "Mozilla/5.0"}
r = requests.get(url, headers=headers, timeout=10)
results = r.json()["quoteResponse"]["result"]
for item in results:
sym = item["symbol"]
name = item.get("shortName", sym)
price = item.get("regularMarketPrice", 0)
prev = item.get("regularMarketPreviousClose", 0)
chg = item.get("regularMarketChange", 0)
pct = item.get("regularMarketChangePercent", 0)
arrow = "🔴" if chg > 0 else "🟢" if chg \x3C 0 else "⚪"
print(f"{arrow} {name}({sym}): {price} {chg:+.2f}({pct:+.2f}%)")
主流代码速查
| 股票/指数 | 代码 | 板块 |
|---|---|---|
| 标普500 ETF | SPY | 大盘 |
| 纳指100 ETF | QQQ | 科技 |
| 道指 ETF | DIA | 蓝筹 |
| 小盘股 | IWM | 风险偏好 |
| 英伟达 | NVDA | AI/芯片 |
| 苹果 | AAPL | 科技 |
| 特斯拉 | TSLA | 新能源 |
| AMD | AMD | 芯片 |
| 谷歌 | GOOGL | 科技/AI |
| 亚马逊 | AMZN | 电商/云 |
| Meta | META | 社交/AI |
| 微软 | MSFT | 科技/云 |
舆情监控
Google News Live(突发新闻)
https://news.google.com/rss/search?q=US+stock+market+when:1h
https://news.google.com/rss/search?q=Nasdaq+S%26P+500+when:1h
https://news.google.com/rss/search?q=Treasury+yield+Fed+when:1h
https://news.google.com/rss/search?q=Nvidia+AI+stock+when:1h
X/Twitter 美股舆情
使用 browser 工具访问 @bearfrom2077:
https://x.com/search?q=%24NVDA+%24TSLA+stock&f=live
https://x.com/search?q=nasdaq+fed+rate&f=live
https://x.com/search?q=S%26P+500+earnings&f=live
核心关键词:
$NVDA/$TSLA/$AMD— 个股讨论S&P 500/Nasdaq— 大盘Fed rate/Treasury— 宏观CPI/jobs report— 数据发布
情报解读框架
| 指标 | 阈值 | 信号 |
|---|---|---|
| VIX | > 20 | 恐慌加剧 |
| VIX | \x3C 15 | 乐观 |
| 纳指 vs 标普 | 纳指强 > 1% | 科技主线 |
| NQ期货 | 盘前大跌 > 1% | A股/港股承压 |
| 黄金 | 突破 2000 | 避险情绪 |
| 10年美债 | 突破 4.5% | 股市压力 |
| SOFR vs Fed Rate | 低于目标区间下限 | 流动性充裕 |
| 10Y - 2Y 利差 | 倒挂加深 | 经济衰退预警 |
| 10Y - 2Y 利差 | 利差扩大 | 衰退风险缓解 |
分析顺序:
- SOFR/EFFR — 基准利率,了解美联储立场
- 10Y/2Y 国债收益率 — 利率走廊和经济预期
- 10Y-2Y 利差 — 衰退概率
- VIX — 市场情绪温度计
- NQ/ES 期货 — 盘前大盘方向
- SPY/QQQ/DIA — 三大指数
- 科技巨头(NVDA/AAPL/MSFT)— 主线
- 黄金/原油 — 宏观背景
- 给出综合判断
Cron 配置建议
| 频率 | 内容 | 适用场景 |
|---|---|---|
| 每15分钟 | NQ + ES 期货 | A股开盘前参考 |
| 每30分钟 | SPY + QQQ + VIX | 盘中监控 |
| 每小时 | 科技巨头 + 黄金原油 | 宏观背景 |
| 有问才查 | 个股行情 | 被动触发 |
快速查询命令
cd C:\Users\gold3\.openclaw\workspace\skills\us-stock-radar\scripts
# 美股主要指数+期货+大宗商品
python us_index.py
# 个股行情(传入股票代码)
python us_quote.py NVDA TSLA AAPL
# 科技巨头组合
python tech_giants.py
# 美股仪表盘(指数+巨头)
python dashboard.py
Usage Guidance
该技能总体上与其描述一致且没有明显恶意行为,但在安装/运行前请注意:1) 源代码会向公开站点发起网络请求(Yahoo Finance、NY Fed、FRED、Finviz、Google News、X 等),如果你不希望向这些站点发送查询,请勿启用;2) scripts/us_index.py 在 Finviz 兜底逻辑中使用 bs4(BeautifulSoup),且所有脚本需要 requests 库,元数据未声明依赖,建议在隔离环境(虚拟环境或容器)中运行并先手动安装 requirements(requests, beautifulsoup4, lxml);3) SKILL.md 建议使用“browser tool”对 TradingView/X 做截图/抓取,这会在代理/agent 浏览器上下文中访问第三方网页——确认你接受该行为;4) 代码通过 subprocess 直接运行 Python 脚本,运行前可手动审阅脚本以确认无本地文件/凭据访问需求;5) 若希望更严格的安全性,要求作者补充依赖声明并去掉或明确对浏览器自动化的用途和范围。若需要,我可以帮你生成一个 minimal requirements.txt(requests, beautifulsoup4, lxml)并列出运行前应验证的安全检查清单。
Capability Analysis
Type: OpenClaw Skill
Name: us-stock-radar-gold3bear
Version: 1.0.0
The skill bundle is a functional tool for monitoring US stock market data, indices, and macro rates. It retrieves information from legitimate sources including Yahoo Finance, the New York Fed, and FRED (St. Louis Fed). While the scripts use `subprocess` to orchestrate internal calls between `dashboard.py` and `us_quote.py`, and the documentation includes a hardcoded local path (`C:\Users\gold3\...`), these appear to be artifacts of development rather than indicators of malice. No evidence of data exfiltration, unauthorized remote execution, or harmful prompt injection was found.
Capability Tags
Capability Assessment
Purpose & Capability
技能名和描述(美股行情 + 舆情监控)与代码和 SKILL.md 中的行为一致:调用 Yahoo Finance、NY Fed、FRED、Finviz、Google News RSS,并建议用浏览器工具查看 X/Twitter 或 TradingView 图表。未请求与该目的不相关的凭据或系统路径。
Instruction Scope
SKILL.md 明确指导从公开数据源抓取行情与新闻,并建议使用浏览器工具访问 X/Twitter 和 TradingView 嵌入页。指令不会读取用户本地凭证或非相关文件,但会向多个外部站点发出请求(Yahoo/Fed/FRED/Finviz/Google News/X),这会把查询内容发送到这些公开站点;同时 SKILL.md 建议在本地路径下运行脚本(.openclaw workspace),这只是运行位置约定。
Install Mechanism
无安装规范(instruction-only),这降低了安装风险。但脚本依赖 requests 和在 finviz 兜底路径中使用的 bs4 (BeautifulSoup) 等 Python 包,SKILL.md/metadata 未声明这些依赖,可能导致运行失败。没有发现来自不可信 URL 的二进制下载或可疑安装步骤。
Credentials
不要求任何环境变量或凭据。所有外部交互均针对公共数据源,未请求敏感令牌或键,环境访问要求与其目的相称。
Persistence & Privilege
技能没有设置 always:true,默认可被模型调用(平台默认)。脚本通过 subprocess 调用同目录下的 Python 文件,这与技能功能一致;没有修改其他技能或系统级配置的行为。
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install us-stock-radar-gold3bear - After installation, invoke the skill by name or use
/us-stock-radar-gold3bear - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
首发:标普/纳指/道指、VIX、NQ期货、黄金原油、SOFR宏观利率
Metadata
Frequently Asked Questions
What is 美股雷达?
美股行情与舆情监控工具。当用户询问「美股怎么样」「纳指」「标普」「道指」「美股大盘」「今晚美股」「US股」「美股行情」「美股期货」「NQ」「ES」时使用。支持Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。 It is an AI Agent Skill for Claude Code / OpenClaw, with 36 downloads so far.
How do I install 美股雷达?
Run "/install us-stock-radar-gold3bear" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 美股雷达 free?
Yes, 美股雷达 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 美股雷达 support?
美股雷达 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 美股雷达?
It is built and maintained by Bear Xiong (@gold3bear); the current version is v1.0.0.
More Skills