free-stock-global-quotes-news

global-quotes: free stock quotes and news. Use when: user asks for global stock price, quote, ticker symbol, or company news for US (e.g. AAPL), HK (0700.HK), or China A-shares (000001.SZ, 600000.SS). Uses free sources: Yahoo/Finnhub for US, Tencent/EastMoney/AkShare for CN/HK.

3,891 stars

Best use case

free-stock-global-quotes-news is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

global-quotes: free stock quotes and news. Use when: user asks for global stock price, quote, ticker symbol, or company news for US (e.g. AAPL), HK (0700.HK), or China A-shares (000001.SZ, 600000.SS). Uses free sources: Yahoo/Finnhub for US, Tencent/EastMoney/AkShare for CN/HK.

Teams using free-stock-global-quotes-news should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/free-stock-global-quotes-news/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/antaeus001/free-stock-global-quotes-news/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/free-stock-global-quotes-news/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How free-stock-global-quotes-news Compares

Feature / Agentfree-stock-global-quotes-newsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

global-quotes: free stock quotes and news. Use when: user asks for global stock price, quote, ticker symbol, or company news for US (e.g. AAPL), HK (0700.HK), or China A-shares (000001.SZ, 600000.SS). Uses free sources: Yahoo/Finnhub for US, Tencent/EastMoney/AkShare for CN/HK.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Yahoo Finance Skill

Get quotes and basic market data from Yahoo Finance (no API key).

## When to Use

- "苹果股价" / "AAPL 价格" / "特斯拉今天涨了多少"
- "港股腾讯" / "0700.HK 行情"
- "茅台股价" / "600519.SS" / "000001.SZ 平安银行"
- Any request for stock quote, current price, or day change
- 美股公司新闻:用 `scripts/news.py`(需 FINNHUB_API_KEY)

## Symbol Format

| Market   | Example    | Format   |
|----------|------------|----------|
| US       | AAPL, MSFT | Ticker   |
| Hong Kong| 0700.HK    | Code.HK  |
| Shanghai | 600519.SS  | Code.SS  |
| Shenzhen | 000001.SZ  | Code.SZ  |

## Commands

### A-shares / HK quotes (CN/HK, no keys; 腾讯→东财→AkShare)

Use `cn_quote.py` for A 股 / 港股,依次尝试 **腾讯行情 → 东方财富 Push2 → AkShare**,直到某个可用就停止。

```bash
# A-shares
python3 scripts/cn_quote.py 600519.SS
python3 scripts/cn_quote.py 000001.SZ
python3 scripts/cn_quote.py 300750.SZ

# HK stocks
python3 scripts/cn_quote.py 0700.HK
python3 scripts/cn_quote.py hk00700
```

- 无需任何 API key。
- 优先使用腾讯行情 (`qt.gtimg.cn`),失败时尝试东方财富 Push2 接口(仅 A 股),再尝试本地安装的 AkShare(如果存在)。

### Single or multiple quotes (unified entry: US + A-share/HK)

**一个脚本覆盖美股与 A 股/港股**:`quote.py` 会根据 symbol 自动选择数据源——A 股/港股(`*.SS` / `*.SZ` / `*.HK` 等)走 cn_quote(腾讯→东财→AkShare),美股及其他走 Yahoo/Finnhub。Agent 只需调 `scripts/quote.py` 即可。

```bash
python3 scripts/quote.py AAPL
python3 scripts/quote.py 0700.HK 9988.HK
python3 scripts/quote.py 600519.SS 000001.SZ
```

### With time range (for previous close / context)

```bash
python3 scripts/quote.py AAPL --range 5d
python3 scripts/quote.py MSFT --range 1mo
```

### JSON output

```bash
python3 scripts/quote.py AAPL --json
```

### Company news(新闻:A股/港股 东方财富→AkShare;美股 Finnhub)

**A股/港股**:依次使用 **东方财富 → AkShare**,直到某个可用即停(无需 API key,服务器需安装 AkShare)。  
**美股**:使用 Finnhub,需设置 `FINNHUB_API_KEY`。

```bash
# A 股 / 港股
python3 scripts/news.py 600519.SS
python3 scripts/news.py 贵州茅台 --limit 5
python3 scripts/news.py 0700.HK

# 美股
python3 scripts/news.py AAPL
python3 scripts/news.py MSFT --limit 5 --from 2025-02-01 --to 2025-02-25
```

- `--limit`:最多返回条数,默认 10。
- `--from` / `--to`:日期 YYYY-MM-DD(仅美股 Finnhub 使用),默认最近 7 天。
- `--json`:输出原始 JSON。
- **港股个股新闻**:AkShare 对港股个股新闻支持有限,可能返回空,属正常情况。

### Range options (quote)

- `1d` — today (default)
- `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`

## Path

From the skill directory (e.g. workspace `skills/yahoo-finance/`):

```bash
python3 scripts/quote.py <SYMBOL> [--range 1d|5d|1mo|...] [--json]
```

From workspace root, use the full path to the skill's `scripts/quote.py` so the agent can invoke it via `exec`.

## Server 403 (e.g. datacenter IP blocked by Yahoo)

On servers, Yahoo often returns 403. Two options:

1. **Finnhub fallback (recommended)**  
   Free API key at https://finnhub.io. Set `FINNHUB_API_KEY` in the environment (e.g. in `~/.openclaw/.env` or your process env). The script will use Finnhub when Yahoo returns 403. US symbols (AAPL, MSFT) work; HK/CN symbols may differ.

2. **Proxy(代理)**  
   脚本会读取环境变量 `HTTPS_PROXY`、`HTTP_PROXY`,请求会经代理发出,可避免机房 IP 被 Yahoo 封。

   **优先:用户/进程级**(仅影响当前 skill,推荐)  
   在 gateway 可读到的环境里设置即可,例如 `~/.openclaw/.env` 中加入 `HTTPS_PROXY=...` 和 `HTTP_PROXY=...`。或当前 shell 测试:`export HTTPS_PROXY=http://127.0.0.1:7890` 后执行 `python3 scripts/quote.py AAPL`。

   **可选:systemd 全局**(仅当你用 systemd 跑 gateway 且希望所有请求走代理时)  
   编辑 `/etc/systemd/system/openclaw-gateway.service` 在 `[Service]` 下增加 `Environment=HTTPS_PROXY=...` / `HTTP_PROXY=...`,然后 `sudo systemctl daemon-reload && sudo systemctl restart openclaw-gateway`。注意这会对该服务下所有请求生效。

**可选环境变量**(仅 `quote.py`):`OPENCLAW_QUOTE_TIMEOUT`(默认 12 秒)、`OPENCLAW_QUOTE_RETRY_DELAY`(单 symbol 顺序时的间隔,默认 0.4 秒)、`OPENCLAW_QUOTE_CACHE_TTL`(结果缓存秒数,0=关闭)。多 symbol 时默认**并行**请求以提升性能,可通过 `OPENCLAW_QUOTE_PARALLEL=0` 关闭;`OPENCLAW_QUOTE_MAX_WORKERS`(默认 6)控制并行度。**失败重试**:`quote.py` 单次 HTTP 请求默认最多重试 2 次(共 3 次),5xx/超时/断线会指数退避;可通过 `OPENCLAW_QUOTE_RETRIES=0` 关闭。`cn_quote.py` 与 `news.py` 同样对单次请求做最多 2 次重试。

## Notes

- Yahoo: real-time/near-real-time for **美股 / 港股 / A 股**,但在服务器机房 IP 上可能 403,需要配合代理使用。
- Finnhub fallback: 只保证 **美股**(AAPL/MSFT 等)有稳定数据;A 股 / 港股 在免费档通常无有效行情或直接 403。
- 建议:港股 / A 股 查询优先走 Yahoo(必要时加 HTTPS_PROXY),美股在 Yahoo 403 时可以用 Finnhub 作为备份。

## 可改进点 (Possible improvements)

- **测试**:对解析逻辑做单元测试(mock HTTP),便于改版不 regression。
- **cn_quote 港股**:AkShare 单股接口仅 A 股;港股仍走腾讯/东财,无单股历史接口时保持现状。

Related Skills

trending-news-aggregator

3891
from openclaw/skills

智能热点新闻聚合器 - 自动抓取多平台热点新闻, AI分析趋势,支持定时推送和热度评分。 核心功能: - 每天自动聚合多平台热点(微博、知乎、百度等) - 智能分类(科技、财经、社会、国际等) - 热度评分算法 - 增量检测(标记新增热点) - AI趋势分析

Data & Research

exa-web-search-free

3891
from openclaw/skills

Free AI search via Exa MCP. Web search for news/info, code search for docs/examples from GitHub/StackOverflow, company research for business intel. No API key needed.

Data & Research

news-hot-scraper

3891
from openclaw/skills

This skill should be used when users need to scrape hot news topics from Chinese platforms (微博、知乎、B站、抖音、今日头条、腾讯新闻、澎湃新闻), generate summaries, and cite sources. It supports both API-based and direct scraping methods, and offers both extractive and abstractive summarization techniques.

Data & Research

openclaw-stock-skill

3891
from openclaw/skills

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Data & Research

us-stock-analyst

3891
from openclaw/skills

Professional US stock analysis with financial data, news, social sentiment, and multi-model AI. Comprehensive reports at $0.02-0.10 per analysis.

Data & Research

stock-watchlist

3891
from openclaw/skills

Query real-time stock prices, basic quote fields, and manage a Markdown watchlist for A-share, Hong Kong, and US stocks. Use when users ask in Chinese or by ticker/code to search stocks, inspect current price and quote basics, or maintain a watchlist stored in a Markdown file.

Personal Finance

jarvis-stock-price - 股票价格查询

3880
from openclaw/skills

**版本**: 1.0.0

Data & Research

jarvis-stock-monitor

3880
from openclaw/skills

全功能智能股票监控预警系统 Pro 版。支持成本百分比、均线金叉死叉、RSI 超买超卖、成交量异动、跳空缺口、动态止盈等 7 大预警规则。基础功能免费,高级功能 SkillPay 付费。

Finance & Trading

financial-news

3891
from openclaw/skills

财经新闻监控技能 - 财经新闻追踪、自动推送、重要新闻提醒

SKILL: stock-checker

3891
from openclaw/skills

## Description

akshare-a-stock

3891
from openclaw/skills

A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。

variflight-global-flight-fares

3891
from openclaw/skills

Variflight Global Flight Fares searches one-way flight fares from the Variflight ticket API by departure IATA city code, arrival IATA city code, and departure date.