block-trade-analyzer

Block Trade Analyzer (block-trade-analyzer): Historical block trade queries for A-share individual stocks, providing transaction price, premium/discount rate, traded volume, and buyer/seller brokerage details. Data sources: Eastmoney Data Center (primary HTTP direct) with akshare as a fallback. Zero configuration; requires only pip install requests to run.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "block-trade-analyzer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7006227457c635f3d7953d126df838543b2c806e140b83ec3b183ed049cc88b5. Verify the upstream source and version against https://skillhub.cn/skills/user_1b4883f8/block-trade-analyzer before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Block Trade Analyzer (block-trade-analyzer): Historical block trade queries for A-share individual stocks, providing transaction price, premium/discount rate, traded volume, and buyer/seller brokerage details. Data sources: Eastmoney Data Center (primary HTTP direct) with akshare as a fallback. Zero configuration; requires only pip install requests to run.

0 Downloads

Introduction source: third_party · user_1b4883f8 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
python3 scripts/block_trade_analyzer.py 002415 --json
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "block-trade-analyzer"
description: 大宗交易分析 — A 股个股的历史大宗交易查询。成交价、溢价/折价率、成交量、买卖方营业部明细。数据源:东方财富数据中心(主力 HTTP 直连)+ akshare(fallback)。零配置,pip install requests 即可使用。

block-trade-analyzer 🏦

概述

A 股大宗交易查询工具。输入股票代码,快速获取该标的的历史大宗交易记录,包括成交价、当日收盘价、溢价/折价率、成交量、买方营业部、卖方营业部。

与 ClawHub / SkillHub 上其他股票查询技能的区别:

特性 block-trade-analyzer 其他股票 skill
✅ 买卖方营业部明细 完整显示(含机构专用) ❌ 仅显示价格和成交量
✅ 折溢价计算 成交价 vs 收盘价,自动算溢价/折价 % ❌ 无溢价数据
✅ 双数据源容灾 东财直查 → akshare fallback ❌ 单一数据源,断了就空了
✅ 零配置安装 只需 requests,无 API Key ❌ 需要 Tushare token / 数据库配置
✅ 输出可读 终端友好 + 完整 JSON —

适用场景

  • 甄别减持意图:机构折价甩货 vs 游资溢价抢筹,一目了然
  • 跟踪主力动向:同一营业部反复出现,可能是持续操作信号
  • 配合其他信号:大宗连续折价 + B1 候选票 → 提高警惕,暂缓介入
  • 异常价格发现:大宗成交价远偏离市价,可能暗含场外协议

使用方式

命令行动

# 查询单只股票(默认最近 20 笔)
python3 scripts/block_trade_analyzer.py 600519

# JSON 格式输出
python3 scripts/block_trade_analyzer.py 002415 --json

# 指定更多笔数
python3 scripts/block_trade_analyzer.py 600519 --pages=50

# 查看用法
python3 scripts/block_trade_analyzer.py --help

作为 Python 库调用

from scripts.block_trade_analyzer import fetch_eastmoney, fetch_akshare_fallback

# 东财主力查
rows = fetch_eastmoney("600519", page_size=20)

# akshare fallback
rows = fetch_akshare_fallback("002415", days_back=5)

for r in rows:
    print(f"{r['date']} {r['premium_pct']}% {r['buyer']}")

作为 OpenClaw Skill 调用

安装后,Agent 会在你提到「大宗交易」「折价」「营业部」等关键词时自动触发,查询指定股票的大宗交易明细。(也可手动触发:查一下 600519 的大宗交易)

示例输出

📊 600519 大宗交易 (近20笔)
  2026-07-21 | 价1318.81 | 溢+0.83% | 量127600股 | 瑞银证券有限责任公司上海花园石桥路证券营
  2026-07-21 | 价1198.00 | 溢-8.41% | 量2800股 | 长江证券股份有限公司深圳福华路证券营业部
  2026-07-20 | 价1309.30 | 溢-1.37% | 量156200股 | 机构专用
  2026-07-17 | 价1152.77 | 溢-8.00% | 量141700股 | 华泰证券股份有限公司上海分公司
  2026-07-17 | 价1300.00 | 溢+3.75% | 量3300股 | 华泰证券股份有限公司南京止马营证券营业部
  2026-07-07 | 价1193.12 | 溢+0.36% | 量143000股 | 瑞银证券有限责任公司上海花园石桥路证券营
  ... 还有14笔

输出字段说明

字段 类型 说明
date string 交易日期(YYYY-MM-DD)
price float 大宗成交价(元)
close float 当日收盘价(元)
premium_pct float 溢价/折价百分比。正值=溢价(高于市价买入),负值=折价(低于市价买入)
vol int 成交量(股,不是手)
amount float 成交金额(元)
buyer string 买方营业部名称("机构专用" 表示机构席位)
seller string 卖方营业部名称("机构专用" 表示机构席位)

信号解读指南

信号解读仅供参考,不构成投资建议。

溢价成交(溢价率 > 0)

溢价幅度 可能含义 关注度
+0%~+2% 正常小幅溢价,资金态度中性 ⭐
+2%~+5% 买方愿意高买,积极看多信号 ⭐⭐
+5% 以上 大幅溢价,强烈买盘意愿,但需警惕对倒 ⭐⭐⭐

折价成交(溢价率 < 0)

折价幅度 可能含义 关注度
-0%~-3% 大宗交易正常折价区间,无特殊含义 —
-3%~-8% 常见折价区间,卖方让利出货,注意配合其他信号 ⭐
-8%~-15% 大幅折价,减持意图明显,需警惕后续抛压 ⭐⭐
-15% 以下 极端折价,可能含场外协议或迫于流动性抛售 ⭐⭐⭐

买卖方身份

身份标识 可能含义
机构专用(买方) 机构通过大宗拿货,相对看好
机构专用(卖方) 机构减持,可能是获利了结或止损
游资营业部(买方) 游资接盘,短线博弈
同一营业部反复出现 可能是同一主力持续操作该标的,值得跟踪

组合模式

模式 解读
连续溢价 + 机构买入 中线资金建仓信号,偏积极
连续折价 + 机构卖出 机构持续减持,需谨慎
同一日既有溢价又有折价 对倒或不同资金方分歧,观望
历史首次出现大宗交易 可能有大资金开始关注该标的

参数说明

参数 默认 说明
[股票代码] — 6 位数字代码,必填。支持前缀(如 sh600519)自动清洗
--json / -j 关闭 启用 JSON 格式输出(标准输出后半段以 ---JSON--- 分隔)
--pages=N 20 最多返回记录数(东财接口一次最多返回约 50 条)

依赖

依赖 必要性 用途
requests 必需 调用东方财富数据中心 API
akshare 可选 fallback 数据源,东财接口不可用时自动降级使用

安装命令:

pip install requests
# 可选(推荐安装以增强可靠性):
pip install akshare

数据源

优先级 数据源 特点
主力 东方财富数据中心 (datacenter-web.eastmoney.com) ⚡ HTTP 直连,按股票代码查,返回含收盘价(可算溢价率)
Fallback akshare → stock_dzjy_mrmx 🛡️ 最近 N 日全市场明细过滤,无收盘价,无法算溢价率

两个数据源都不可用时会返回空结果,并提示无交易记录。

安全与隐私

  • 零外部传输:所有数据在本地获取,不向第三方发送
  • 无 API Key:不需要注册任何服务
  • 只读操作:仅调用公开 HTTP 接口,不写任何数据到第三方

目录结构

block-trade-analyzer/
├── SKILL.md                              ← 本文件(技能描述 & 使用说明)
└── scripts/
    └── block_trade_analyzer.py           ← 核心脚本(自包含,零外部依赖)

常见问题

Q:为什么有些记录的溢价率是 0.00%? A:溢价率 = (成交价 - 收盘价) / 收盘价 × 100。当成交价等于收盘价时溢价为 0;当数据来源为 akshare fallback(不含收盘价)时,溢价率显示为 0 且 price=volume=0,仅显示日期和营业部信息。

Q:东财接口被封怎么办? A:工具自动降级到 akshare fallback。如果 akshare 也未安装,会提示安装。东财 datacenter-web 接口目前未被封禁,且我们内置了 1 秒请求间隔 + 随机抖动的限流器。

Q:支持港股或美股吗? A:仅支持 A 股(6 位代码)。港股和美股暂无覆盖计划。

Q:为什么我的股票查不到交易记录? A:可能的原因:① 该股票近期确实没有大宗交易(约 70% 的 A 股在任何 3 个月内无大宗交易);② 股票代码错误;③ 数据源暂时不可用(东财 API 偶有暂时波动)。

性能

场景 耗时
东财直查,有数据(20笔) ~1-2 秒(含限流间隔)
东财直查,无数据 ~1 秒
akshare fallback(5 天) ~3-5 秒

版权与许可

  • 协议:MIT License
  • 数据来源:东方财富数据中心(公开 HTTP 接口)
  • 免责声明:本工具仅供学习研究和参考,所有数据均来自公开市场信息,不构成任何投资建议。投资有风险,决策需谨慎。
  • 开放贡献:欢迎 PR 和 Issue。数据源如有更好替代方案,欢迎讨论。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供 A 股大宗交易查询,满足金融分析实际需求
  • 支持买卖方营业部明细和溢价/折价率计算,功能差异化明显
  • 双数据源容灾设计提升可靠性
Trigger Precision85/100

Highlights

  • 触发词精准覆盖大宗交易相关场景
  • 边界清晰,能有效区分于其他股票查询工具
Structure and Standards95/100

Highlights

  • 文档结构完整,涵盖使用、示例、解读、参数、依赖等全方位说明
  • 提供信号解读指南,增强用户理解
  • frontmatter 完整,格式规范
Execution Reliability70/100

Areas to improve

  • 引用文件缺失 Reported severity: Minor

    SKILL.md 中引用了 scripts/block_trade_analyzer.py 文件,但该文件未包含在传入内容中

    Recommendation: 请补充 scripts/block_trade_analyzer.py 文件以确保功能完整性

Highlights

  • 数据源明确(东方财富 + akshare fallback)
  • 内置请求限流和降级机制
  • 零配置安装,依赖简单
Evidence Verifiability (mean of the first four)81/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.