← 返回 Skills 市场
港股雷达
作者
Bear Xiong
· GitHub ↗
· v1.0.0
· MIT-0
67
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hk-stock-radar
功能描述
港股行情与舆情监控工具。当用户询问「港股怎么样」「恒生指数」「港股大盘」「港股涨跌」「HK股」「港股行情监控」「南向资金」时使用。支持东方财富港股API、新浪财经港股接口、Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。
使用说明 (SKILL.md)
港股雷达 (HK-Stock Radar)
数据源总览
| 数据源 | 用途 | 稳定性 |
|---|---|---|
| 东方财富港股板块API | 行业/概念板块涨跌排行、热点追踪 | ⭐⭐⭐ |
| 新浪财经港股接口 | 个股实时行情(最稳定) | ⭐⭐⭐ |
| Yahoo Finance | 恒生指数实时行情 | ⭐⭐ |
| akshare | 港股实时行情、沪深港通 | ⭐⭐ |
实时行情查询
恒生指数实时行情
import requests
def get_hsi():
"""恒生指数 + 国企指数 + 恒生科技"""
url = "https://hq.sinajs.cn/list=hkHSI,hkHSTECH,hkHSCEI"
headers = {"Referer": "http://finance.sina.com.cn"}
r = requests.get(url, headers=headers, timeout=10)
r.encoding = 'gbk'
results = {}
for line in r.text.strip().split('\
'):
if '=' not in line:
continue
_, data = line.split('=')
vals = data.replace('"', '').replace(';', '').split(',')
if len(vals) \x3C 6:
continue
name = vals[0]
price = float(vals[1])
chg = float(vals[4])
pct = float(vals[5])
results[name] = {"price": price, "chg": chg, "pct": pct}
return results
新浪财经港股个股行情
import requests
def get_hk_quote(codes):
"""查询港股实时行情
codes: str or list, e.g. 'hk00700' or ['hk00700', 'hk09988']
"""
if isinstance(codes, str):
codes = [codes]
url = f"https://hq.sinajs.cn/list={','.join(codes)}"
headers = {"Referer": "http://finance.sina.com.cn"}
r = requests.get(url, headers=headers, timeout=10)
r.encoding = 'gbk'
results = []
for line in r.text.strip().split('\
'):
if '=' not in line:
continue
_, data = line.split('=')
code = _[-7:].replace('"', '') # e.g. hk00700
vals = data.replace('"', '').replace(';', '').split(',')
if len(vals) \x3C 6:
continue
try:
name = vals[0]
price = float(vals[1])
prev = float(vals[2])
chg = price - prev
pct = chg / prev * 100
high = float(vals[4])
low = float(vals[5])
volume = float(vals[3]) / 1e6 # 成交量(手)
arrow = "🔴" if pct > 0 else "🟢" if pct \x3C 0 else "⚪"
results.append({
"code": code, "name": name, "price": price,
"chg": chg, "pct": pct, "high": high, "low": low,
"volume": volume, "arrow": arrow
})
except (ValueError, IndexError):
continue
return results
东方财富港股板块 API
import requests
def get_hk_sector_ranking():
"""港股行业板块涨跌排行"""
url = "http://push2.eastmoney.com/api/qt/clist/get"
params = {
"pn": 1, "pz": 30, "po": 1, "np": 1,
"fltt": 2, "invt": 2,
"fid": "f3",
"fs": "m:1+t:23", # 港股行业板块
"fields": "f12,f14,f2,f3,f5,f6"
}
headers = {"Referer": "http://quote.eastmoney.com/"}
r = requests.get(url, params=params, headers=headers, timeout=10)
diff = r.json()["data"]["diff"]
return [{"板块": x["f14"], "现价": x["f2"], "涨跌幅": x["f3"],
"成交额": x["f6"]} for x in diff]
沪深港通(南向资金)
import akshare as ak
def get_southbound_flow():
"""南向资金净流入"""
df = ak.stock_hsgt_north_net_flow_em()
# 沪深港通北向资金
return df.tail(5) # 最近5个交易日
主流港股代码速查
| 股票 | 代码 | 名称 |
|---|---|---|
| 腾讯 | hk00700 | 腾讯控股 |
| 阿里 | hk09988 | 阿里巴巴 |
| 美团 | hk03690 | 美团 |
| 比亚迪 | hk01211 | 比亚迪股份 |
| 京东 | hk09618 | 京东集团 |
| 小米 | hk01810 | 小米集团 |
| 恒生指数 | hkHSI | 恒生指数 |
| 恒生科技 | hkHSTECH | 恒生科技指数 |
| 国企指数 | hkHSCEI | 恒生国企指数 |
舆情监控
Google News Live(突发新闻)
https://news.google.com/rss/search?q=港股+恒生+今日+when:1h
https://news.google.com/rss/search?q=香港股市+2026+when:1h
https://news.google.com/rss/search?q=南向资金+港股+when:1h
X/Twitter 港股舆情
使用 browser 工具访问已登录的 @bearfrom2077:
https://x.com/search?q=港股%20恒生指数&f=live
https://x.com/search?q=南向资金&f=live
https://x.com/search?q=hkstocks%20hangseng&f=live
核心关键词组合:
港股 恒生— 大盘情绪南向资金— 外资态度HK IPO— 新股动态科技股 港股— 板块热点
情报解读框架
| 指标 | 阈值 | 信号 |
|---|---|---|
| 恒生指数跌幅 | > 1.5% | 系统性风险预警 |
| 南向资金净流入 | > 50亿/日 | 内地资金抄底 |
| 南向资金净流出 | > 30亿/日 | 谨慎信号 |
| 腾讯/阿里/美团 | 同时下跌 > 2% | 科技股出逃 |
| 防御板块(银行/公用)领涨 | 资金抱团 | 非系统性风险 |
分析顺序:
- 恒生指数 + 国企指数 + 恒生科技(大盘方向)
- 科技股(腾讯/阿里/美团/小米)— 港股主线
- 南向资金(内地钱往哪走)
- 板块涨跌(资金在哪里)
- 交叉验证 + 给出判断
Cron 配置建议
| 频率 | 内容 | 适用场景 |
|---|---|---|
| 每15分钟 | 恒生指数 + 恒生科技 | 盘中监控 |
| 每30分钟 | 科技股四巨头(腾讯/阿里/美团/小米) | 港股主线 |
| 每小时 | 港股板块排行 + 舆情 | 热点追踪 |
| 有问才查 | 个股行情 | 被动触发 |
快速查询命令
cd C:\Users\gold3\.openclaw\workspace\skills\hk-stock-radar\scripts
# 恒生指数
python hk_index.py
# 个股行情(传入港股代码)
python hk_quote.py hk00700
# 港股板块
python hk_sector.py
# 南向资金
python southbound.py
安全使用建议
This skill mostly does what it says: it fetches market data from sina/eastmoney and uses akshare for southbound flows. Before installing: 1) Decide whether you want an agent/tool to access your logged-in browser session — SKILL.md asks to use an already-logged-in X account (privacy risk). 2) Confirm you trust the external endpoints used (hq.sinajs.cn, push2.eastmoney.com, akshare), and be aware network calls will be made. 3) The repo contains hardcoded example paths (C:\Users\gold3) and a minor mismatch (mentions Yahoo but no code uses it) — these are signs the package was copied from a dev environment; review scripts locally first. 4) Ensure you install akshare/pandas in a controlled environment if you want southbound functionality. If you do not want the agent to access your browser or authenticated sessions, remove or ignore the X/Twitter instructions in SKILL.md before enabling the skill.
功能分析
Type: OpenClaw Skill
Name: hk-stock-radar
Version: 1.0.0
The skill bundle is a legitimate tool for monitoring Hong Kong stock market data, indices, and sentiment. It uses public APIs from Sina Finance and EastMoney, and the Python library 'akshare' for financial data. The code in scripts like hk_index.py and hk_quote.py is functional and aligned with the stated purpose, with no evidence of data exfiltration, malicious execution, or persistence mechanisms.
能力评估
Purpose & Capability
Name/description match the code: scripts call Sina (sinajs.cn), EastMoney, and akshare for indices, quotes, sectors and southbound flows. The SKILL.md mentions Yahoo Finance but no code uses Yahoo — minor inconsistency but not critical.
Instruction Scope
SKILL.md explicitly instructs the agent to use a browser tool to visit X/Twitter searches using an already-logged-in account '@bearfrom2077' and provides hardcoded example filesystem paths (C:\Users\gold3\...). That asks the agent to access an authenticated user session and a specific local path, which is beyond just polling public APIs and may expose or rely on the user's browser session.
Install Mechanism
No install spec (instruction-only) — lower install risk. Scripts require Python packages (requests, akshare, pandas). southbound.py prints a pip install suggestion but there's no automated installer; this is consistent with an instruction-only package.
Credentials
The skill declares no credentials or env vars, yet instructs using a specific logged-in X account via a browser tool. That implicitly asks for access to the user's authenticated browser session (not declared), which is disproportionate to declared requirements and a privacy risk.
Persistence & Privilege
always is false, no install actions that persist or modify other skills, and no requests to store credentials or change agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hk-stock-radar - 安装完成后,直接呼叫该 Skill 的名称或使用
/hk-stock-radar触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
首发:恒生/恒生科技/国企指数、南向资金、行业涨跌
元数据
常见问题
港股雷达 是什么?
港股行情与舆情监控工具。当用户询问「港股怎么样」「恒生指数」「港股大盘」「港股涨跌」「HK股」「港股行情监控」「南向资金」时使用。支持东方财富港股API、新浪财经港股接口、Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 67 次。
如何安装 港股雷达?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hk-stock-radar」即可一键安装,无需额外配置。
港股雷达 是免费的吗?
是的,港股雷达 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
港股雷达 支持哪些平台?
港股雷达 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 港股雷达?
由 Bear Xiong(@gold3bear)开发并维护,当前版本 v1.0.0。
推荐 Skills