← 返回 Skills 市场
kadinxu

港股卖空数据

作者 KadinXu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
251
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hk-stock-short-selling
功能描述
Get Hong Kong stock short selling data (daily and historical) from HKEX and ETNet. 免费获取港股每日和历史卖空数据。
使用说明 (SKILL.md)

港股卖空数据 HK Stock Short Selling

获取港股每日卖空数据,数据来自港交所官网 + ETNet(免费公开)。

功能 Features

  1. 当天卖空数据 - 获取指定股票的当日卖空数据(港交所)
  2. 历史数据查询 - 获取个股历史卖空数据(ETNet,可查3个月)
  3. 排行榜 - 获取卖空金额/股数排行榜
  4. 持仓监控 - 监控持仓股票的卖空情况

数据源 Data Source

安装 Installation

pip install requests pandas beautifulsoup4

使用方法 Usage

命令行

# 获取单只股票当天卖空数据
python3 hk_short_selling.py 2513

# 获取多只股票
python3 hk_short_selling.py 2513 100 700

# 获取当天全部数据
python3 hk_short_selling.py --all

# 获取排行榜
python3 hk_short_selling.py --top 20

获取历史数据

from hk_short_selling import ETNetHistoricalScraper

scraper = ETNetHistoricalScraper()

# 获取个股历史卖空数据
# 参数: 股票代码(去掉前导0), 获取页数
df = scraper.get_stock_short_selling_history('2513', pages=5)

# 返回字段:
# - date: 交易日期
# - short_volume: 卖空股数
# - short_amount: 卖空金额 (港元)
# - short_pct: 卖空占成交比例 (%)
# - turnover: 股票成交金额
# - avg_5d: 5日平均卖空金额
# - total_short_value: 当日全市场卖空总额
# - pct_of_total: 该股占全市场卖空比例

数据字段 Fields

字段 说明
stock_code 股票代码 (5位)
stock_name 股票名称
short_volume 卖空股数
short_amount 卖空金额 (港元)
short_pct 卖空占成交比例 (%)
market 主板/创业板
date 数据日期

示例 Examples

from hk_short_selling import HKShortSeller, ETNetHistoricalScraper

# 获取当天数据
seller = HKShortSeller()
df = seller.get_today_data(stock_codes=['2513', '100', '700'])
print(df)

# 获取历史数据
scraper = ETNetHistoricalScraper()
df_hist = scraper.get_stock_short_selling_history('700', pages=3)
print(df_hist)

# 获取排行榜
top10 = seller.get_top(n=10, by='amount')
print(top10)

注意事项 Notes

  1. 当天数据每日更新,通常在收市后晚上可获取
  2. 只有当日有卖空交易的股票才会出现
  3. 历史数据通过ETNet获取,约3个月历史
安全使用建议
This skill appears to do what it claims: it scrapes public HKEX and ETNet pages and saves CSV files locally. Before installing or running: (1) review or run the code in a virtual environment (venv) and inspect the data directory (~/.openclaw/workspace/data/hk-short) it will create; (2) confirm you are comfortable with periodic web scraping against those sites and their terms of use; (3) run network activity in a sandbox if you want to be cautious; and (4) be aware parsing is brittle so validate outputs against the source pages. There are no credentials requested and no obvious malicious behavior.
功能分析
Type: OpenClaw Skill Name: hk-stock-short-selling Version: 1.0.0 The skill bundle provides legitimate tools for scraping Hong Kong stock short-selling data from official and public financial sources (HKEX and ETNet). The Python scripts (hk_short_selling.py and hkex_historical_short_selling.py) use standard libraries like requests, pandas, and BeautifulSoup to fetch and process data, which is then stored locally in a workspace directory. There is no evidence of data exfiltration, unauthorized network calls, or malicious instructions in the documentation.
能力评估
Purpose & Capability
Name/description (HK short-selling data) align with the included Python modules and scripts which fetch pages from hkex.com.hk and etnet.com.hk, parse tables, produce DataFrames and save CSVs. Required resources (no env vars, no binaries) match the implementation.
Instruction Scope
SKILL.md tells the agent/user to install requests/pandas/beautifulsoup4 and run the provided scripts or import classes — this matches the code. The code performs network requests to the two documented hosts and reads/writes CSV files under a user data directory (default ~/.openclaw/workspace/data/hk-short). This file I/O is expected for a historical-data tool but users should be aware it stores files in their home directory.
Install Mechanism
There is no automatic install spec; SKILL.md suggests pip-installing common libraries (requests, pandas, beautifulsoup4). That is typical and proportionate for the task and does not pull code from untrusted URLs.
Credentials
The skill requests no environment variables or credentials. Network access is limited to public HKEX/ETNet pages. No tokens, secrets, or unrelated service credentials are requested.
Persistence & Privilege
always:false and no special platform privileges. The skill creates and writes CSV files under a default path in the user's home directory (~/.openclaw/workspace/data/hk-short) — normal for a data-collection tool but worth noting. The skill does not modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hk-stock-short-selling
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hk-stock-short-selling 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of hk-stock-short-selling skill. - Retrieve daily and historical HK stock short selling data from HKEX and ETNet. - Supports: current day data, up to 3 months history lookup, top stock rankings, and portfolio short monitoring. - Provides command-line and Python interface for data access. - Clear documentation for usage, data sources, and field definitions.
元数据
Slug hk-stock-short-selling
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

港股卖空数据 是什么?

Get Hong Kong stock short selling data (daily and historical) from HKEX and ETNet. 免费获取港股每日和历史卖空数据。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 251 次。

如何安装 港股卖空数据?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hk-stock-short-selling」即可一键安装,无需额外配置。

港股卖空数据 是免费的吗?

是的,港股卖空数据 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

港股卖空数据 支持哪些平台?

港股卖空数据 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 港股卖空数据?

由 KadinXu(@kadinxu)开发并维护,当前版本 v1.0.0。

💬 留言讨论