← Back to Skills Marketplace
港股雷达
by
Bear Xiong
· GitHub ↗
· v1.0.0
· MIT-0
67
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install hk-stock-radar
Description
港股行情与舆情监控工具。当用户询问「港股怎么样」「恒生指数」「港股大盘」「港股涨跌」「HK股」「港股行情监控」「南向资金」时使用。支持东方财富港股API、新浪财经港股接口、Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install hk-stock-radar - After installation, invoke the skill by name or use
/hk-stock-radar - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
首发:恒生/恒生科技/国企指数、南向资金、行业涨跌
Metadata
Frequently Asked Questions
What is 港股雷达?
港股行情与舆情监控工具。当用户询问「港股怎么样」「恒生指数」「港股大盘」「港股涨跌」「HK股」「港股行情监控」「南向资金」时使用。支持东方财富港股API、新浪财经港股接口、Yahoo Finance获取实时行情,以及Google News RSS和X/Twitter舆情监控。 It is an AI Agent Skill for Claude Code / OpenClaw, with 67 downloads so far.
How do I install 港股雷达?
Run "/install hk-stock-radar" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 港股雷达 free?
Yes, 港股雷达 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 港股雷达 support?
港股雷达 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 港股雷达?
It is built and maintained by Bear Xiong (@gold3bear); the current version is v1.0.0.
More Skills