美股雷达

v1.0.0

美股行情与舆情监控工具。当用户询问「美股怎么样」「纳指」「标普」「道指」「美股大盘」「今晚美股」「US股」「美股行情」「美股期货」「NQ」「ES」时使用。支持Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。

0· 47·0 current·0 all-time
byBear Xiong@gold3bear

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for gold3bear/us-stock-radar-gold3bear.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "美股雷达" (gold3bear/us-stock-radar-gold3bear) from ClawHub.
Skill page: https://clawhub.ai/gold3bear/us-stock-radar-gold3bear
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install us-stock-radar-gold3bear

ClawHub CLI

Package manager switcher

npx clawhub@latest install us-stock-radar-gold3bear
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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 文件,这与技能功能一致;没有修改其他技能或系统级配置的行为。
Assessment
该技能总体上与其描述一致且没有明显恶意行为,但在安装/运行前请注意: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)并列出运行前应验证的安全检查清单。

Like a lobster shell, security has layers — review code before you run it.

latestvk970qdewmjn365xah25wzt4y3n85kx79
47downloads
0stars
1versions
Updated 1d ago
v1.0.0
MIT-0

美股雷达 (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('\n')[-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 < 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 < 0 else "⚪"
        print(f"{arrow} {name}({sym}): {price} {chg:+.2f}({pct:+.2f}%)")

主流代码速查

股票/指数代码板块
标普500 ETFSPY大盘
纳指100 ETFQQQ科技
道指 ETFDIA蓝筹
小盘股IWM风险偏好
英伟达NVDAAI/芯片
苹果AAPL科技
特斯拉TSLA新能源
AMDAMD芯片
谷歌GOOGL科技/AI
亚马逊AMZN电商/云
MetaMETA社交/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< 15乐观
纳指 vs 标普纳指强 > 1%科技主线
NQ期货盘前大跌 > 1%A股/港股承压
黄金突破 2000避险情绪
10年美债突破 4.5%股市压力
SOFR vs Fed Rate低于目标区间下限流动性充裕
10Y - 2Y 利差倒挂加深经济衰退预警
10Y - 2Y 利差利差扩大衰退风险缓解

分析顺序:

  1. SOFR/EFFR — 基准利率,了解美联储立场
  2. 10Y/2Y 国债收益率 — 利率走廊和经济预期
  3. 10Y-2Y 利差 — 衰退概率
  4. VIX — 市场情绪温度计
  5. NQ/ES 期货 — 盘前大盘方向
  6. SPY/QQQ/DIA — 三大指数
  7. 科技巨头(NVDA/AAPL/MSFT)— 主线
  8. 黄金/原油 — 宏观背景
  9. 给出综合判断

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

Comments

Loading comments...