Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
xiaonan0527 avatar

Yahoo Finance

  • 101 installs
  • 3 repo stars
  • Updated March 8, 2026
  • xiaonan0527/openclaw-stock-market-skills

Give your coding agent live quotes, company profiles, and symbol search across HK, A-share, and US tickers via Yahoo Finance without building HTTP plumbing yourself.

About

Yahoo Finance is an agent skill that wraps Yahoo’s public quote APIs in a small Node script you can call from the terminal or import into tooling. Solo and indie builders use it when a stock-trading bot, portfolio assistant, or research agent needs current prices, issuer metadata, or symbol discovery across Hong Kong, mainland China, and US listings without maintaining scrapers. The workflow is deliberately narrow: run quote for a ticker, profile for fundamentals-style company blocks, or search for fuzzy name matches. Because responses come straight from Yahoo, you should treat rate limits and occasional outages as production concerns and cache or backoff in your own layer. It fits Claude Code, Cursor, and similar agents that can execute Node and need procedural steps for finance integrations rather than one-off chat guesses about tickers.

  • CLI commands for quote, company profile, and ticker search via query.mjs
  • Supports HK (.HK), Shanghai/Shenzhen (.SS/.SZ), and US symbols (e.g. AAPL, TSLA)
  • HTTPS client with retry logic and explicit handling for HTTP 429 rate limits
  • Dual base URLs (query1 and query2 finance.yahoo.com) for resilient fetches
  • Runnable examples for 0700.HK, 9988.HK, and Xiaomi search out of the box

Yahoo Finance by the numbers

  • 101 all-time installs (skills.sh)
  • +1 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #522 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 27, 2026 (Skillselion catalog sync)
npx skills add https://github.com/xiaonan0527/openclaw-stock-market-skills --skill yahoo-finance

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs101
repo stars3
Security audit3 / 3 scanners passed
Last updatedMarch 8, 2026
Repositoryxiaonan0527/openclaw-stock-market-skills

What it does

Give your coding agent live quotes, company profiles, and symbol search across HK, A-share, and US tickers via Yahoo Finance without building HTTP plumbing yourself.

Files

SKILL.mdMarkdownGitHub ↗

Yahoo Finance 股票查询 Skill

使用 Yahoo Finance API 查询全球股票市场数据,支持港股、A股、美股等市场。

功能

1. 实时股票报价 - 获取股票的实时报价(延迟约15分钟) 2. 公司基本信息 - 查询公司概况、行业、市值等信息 3. 历史价格数据 - 获取历史价格数据(支持多种时间范围和间隔) 4. 搜索股票 - 根据公司名称或代码搜索股票

支持的市场

  • 港股(Hong Kong Stock Exchange)
  • A股(Shanghai & Shenzhen Stock Exchange)
  • 美股(US Stock Markets)
  • 全球其他市场

股票代码格式

港股

  • 腾讯控股:0700.HK
  • 阿里巴巴:9988.HK
  • 小米集团:1810.HK
  • 美团:3690.HK
  • 比亚迪:1211.HK

A股

  • 上证指数:000001.SS
  • 贵州茅台:600519.SS
  • 五粮液:000858.SZ
  • 宁德时代:300750.SZ

美股

  • 苹果:AAPL
  • 特斯拉:TSLA
  • 微软:MSFT

使用方法

1. 查询实时股票报价

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs quote 0700.HK

2. 查询公司基本信息

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs profile 9988.HK

3. 获取历史价格数据

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs history 0700.HK --range 1mo --interval 1d

4. 搜索股票

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs search "Tencent"

参数说明

历史数据范围 (--range)

  • 1d - 1天
  • 5d - 5天
  • 1mo - 1个月
  • 3mo - 3个月
  • 6mo - 6个月
  • 1y - 1年
  • 2y - 2年
  • 5y - 5年
  • 10y - 10年
  • ytd - 年初至今
  • max - 最大范围

数据间隔 (--interval)

  • 1m, 2m, 5m, 15m, 30m, 60m, 90m - 分钟级
  • 1h - 小时
  • 1d - 日线
  • 5d - 5日线
  • 1wk - 周线
  • 1mo - 月线
  • 3mo - 季线

示例

查询腾讯股价

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs quote 0700.HK

输出:

📈 0700.HK 实时报价:

交易所:   HKSE
货币:     HKD
当前价格: HKD 385.60
开盘价:   HKD 382.00
最高价:   HKD 388.20
最低价:   HKD 380.40
前收盘:   HKD 383.00
涨跌额:   HKD 2.60
涨跌幅:   0.68%
成交量:   25,432,100

查询阿里巴巴公司信息

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs profile 9988.HK

获取小米最近3个月的日K线

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs history 1810.HK --range 3mo --interval 1d

搜索比亚迪

node ~/.openclaw/workspace-stock/yahoo-finance/scripts/query.mjs search "BYD"

模块导入使用

在其他脚本中导入使用:

import { fetchQuote, fetchProfile, fetchHistory, fetchSearch } from '../yahoo-finance/scripts/query.mjs';

// 查询腾讯股价
const quote = await fetchQuote('0700.HK');
console.log(quote.regularMarketPrice);

// 查询公司信息
const profile = await fetchProfile('9988.HK');
console.log(profile.longName);

// 获取历史数据
const history = await fetchHistory('1810.HK', '1mo', '1d');
console.log(history.close);

// 搜索股票
const results = await fetchSearch('Tencent');
console.log(results.quotes);

注意事项

1. 数据延迟:Yahoo Finance 免费数据通常有15分钟左右的延迟 2. 请求频率:虽然没有明确的请求限制,但建议合理使用,避免过于频繁的请求 3. 数据准确性:数据仅供参考,不构成投资建议 4. API 稳定性:Yahoo Finance 是非官方 API,可能会有变动

技术细节

  • 使用 Node.js 原生 https 模块
  • RESTful API 调用
  • JSON 格式输出
  • 支持命令行和模块导入两种使用方式
  • 完全免费,无需 API Key

Related skills

FAQ

Is Yahoo Finance safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.