美股行情与舆情监控工具,支持用户查询美股大盘、纳指、标普、道指及美股期货(NQ、ES)等,实时行情通过Yahoo Finance获取,舆情监控覆盖Google News RSS和X/Twitter。微信公众号:PM熊叔(打造一人公司的投研团队)
数据源用途稳定性Yahoo Finance主要指数(SPY/QQQ/DIA/IWM)实时行情⭐⭐⭐Yahoo Finance个股行情(NVDA/AAPL/MSFT/TSLA等)⭐⭐⭐TradingView 嵌入页NQ/ES 期货实时图表(浏览器截图)⭐⭐Google News RSS美股突发新闻⭐⭐⭐
python
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%
python
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"
python
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
python
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科技/云
text
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
使用 browser 工具访问 @bearfrom2077:
text
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 利差利差扩大衰退风险缓解
分析顺序:
频率内容适用场景每15分钟NQ + ES 期货A股开盘前参考每30分钟SPY + QQQ + VIX盘中监控每小时科技巨头 + 黄金原油宏观背景有问才查个股行情被动触发
bash
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