Commit Graph
102 Commits
Author SHA1 Message Date
GitHubandClaude Opus 4.7 7572b16614 chore: bump version to 1.4.2
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 18:07:48 +08:00
GitHubandClaude Opus 4.7 3410b922ad fix: include ZHUOYAO function in MyTT.py (missing from 1.4.1 release)
The 1.4.1 commit added the indicator registry entry in indicator.py but
forgot to include the actual ZHUOYAO() function definition in MyTT.py.
Also includes lint cleanups (trailing semicolons, import formatting).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 18:07:31 +08:00
GitHubandClaude Opus 4.7 6b06f9eb40 feat: add ZHUOYAO indicator (multi-period momentum resonance), bump to 1.4.1
Add 捉妖大师 (ZHUOYAO) indicator to the indicator registry. Outputs
ZY_LONG/ZY_MID/ZY_SHORT/ZY_TREND four lines based on 20/60/120-day
ROC with EMA smoothing for trend resonance detection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 17:49:30 +08:00
GitHubandClaude Opus 4.7 bcddf5a052 feat: add technical indicator calculation (30 indicators via MyTT), bump to 1.4.0
Integrate MyTT library to provide 30 technical indicators (MACD, KDJ, RSI,
BOLL, DMI, ATR, etc.) accessible via API and CLI with automatic EMA warm-up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 16:05:40 +08:00
Justin Gu 95e225d6d7 Merge branch 'main' of https://github.com/handsomejustin/easy_tdx 2026-05-27 00:39:19 +08:00
GitHubandClaude Opus 4.7 280af9ecf5 feat: add board-summary and board-ranking CLI commands, bump to 1.3.1
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 23:28:41 +08:00
Justin Gu 6959e66e14 Merge branch 'main' of https://github.com/handsomejustin/easy_tdx 2026-05-26 22:58:28 +08:00
GitHubandClaude Opus 4.7 c825515ee6 ci: disable sigstore attestations to fix 502 from rekor
Sigstore's rekor server returning intermittent 502 Bad Gateway,
blocking all publishes. Attestations are optional; disable until
the service stabilizes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 22:50:28 +08:00
GitHubandClaude Opus 4.7 72652b9f8b feat: add get_board_ranking() for board change-pct ranking
New MacClient/AsyncMacClient method that ranks all boards of a given
type (industry/concept) by change_pct, amount, main_net_amount, or vol.
Aggregates member quotes via get_board_summary() for each board.

Also bumps version to 1.3.0 and updates README + CLI version.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 22:46:52 +08:00
GitHubandClaude Opus 4.7 2ec36e01bf skill: add publish skill for PyPI release workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:25:10 +08:00
GitHubandClaude Opus 4.7 30d04440f7 chore: bump version to 1.2.1
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:23:17 +08:00
GitHubandClaude Opus 4.7 00986c1898 ci: add PyPI trusted publisher workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 18:19:50 +08:00
GitHubandClaude Opus 4.7 76e344df80 docs: add get_board_summary() to README
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 17:46:31 +08:00
GitHubandClaude Opus 4.7 ba032da9ed feat: add get_board_summary() for board capital flow aggregation
New MacClient/AsyncMacClient method that aggregates board member quotes
into total amount, main force net inflow (1d/3d/5d), and up/down counts.
Includes example demo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 17:35:00 +08:00
Justin Gu 462779b47d Merge branch 'main' of https://github.com/handsomejustin/easy_tdx
# Conflicts:
#	README.md
#	examples/01_connection/async_connect.py
#	examples/02_market_info/market_stat.py
#	examples/02_market_info/security_list.py
#	examples/02_market_info/security_list_all.py
#	examples/02_market_info/security_quotes.py
#	examples/03_kline/index_bars.py
#	examples/03_kline/security_bars.py
#	examples/04_minute/history_minute_data.py
#	examples/04_minute/minute_time_data.py
#	examples/05_transaction/history_transaction.py
#	examples/05_transaction/transaction_data.py
#	examples/06_finance/company_info.py
#	examples/06_finance/finance_info.py
#	examples/06_finance/price_limits.py
#	examples/06_finance/xdxr_info.py
#	examples/07_block/block_info.py
#	examples/08_fund_flow/fund_flow.py
#	examples/08_fund_flow/history_fund_flow.py
#	examples/09_file_download/report_file.py
#	pyproject.toml
#	src/easy_tdx/client.py
2026-05-23 00:30:56 +08:00
GitHubandClaude Opus 4.7 4820b4a049 feat: v1.1.0 - MAC protocol, CLI tool, extended markets, unified client
- Add MacClient/AsyncMacClient with full MAC protocol support (quotes, kline
  with adjustment, tick charts, transactions, boards, capital flow, auction,
  unusual, symbol info, server info)
- Add MacExClient/AsyncMacExClient for extended markets (HK, US, futures)
- Add UnifiedTdxClient auto-routing between A-share and extended markets
- Add `easy-tdx` CLI tool with JSON default output, Agent-friendly
- Add field bitmap protocol for custom quote field selection
- Fix quote-list missing fields (default to BASIC+VOLUME preset)
- Add config.py with centralized host management and auto-discovery
- Add 50+ examples covering all APIs (01-20)
- Rewrite README with CLI-first, Agent-friendly documentation
- Bump version to 1.1.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 22:44:45 +08:00
GitHubandClaude Opus 4.7 67a0415c38 chore: remove uv.lock and add to .gitignore
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 13:25:15 +08:00
GitHubandClaude Opus 4.7 0e8eba0cfd chore: remove .omc directory from tracking and add to .gitignore
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 13:14:45 +08:00
Justin Gu d7547f7c4c docs: update README to reflect merged datetime fields in DataFrame output 2026-05-22 04:22:27 +08:00
Justin Gu f693cbe218 docs: update README to reflect merged datetime fields in DataFrame output 2026-05-22 04:22:27 +08:00
Justin Gu 02701952ca feat: merge datetime fields in DataFrame output, hide MinuteBar internal fields
- K-line: daily+ periods output 'date' only, minute periods output 'datetime'
- Transactions (tick-by-tick): combine date param + hour/minute into 'datetime'
- XdxrRecord, HistoricalFundFlow: year/month/day merged to 'date'
- MinuteBar: rename unknown_1 to _unknown_1 (hidden from DataFrame)
- MinuteBar: add datetime column computed from bar index (A-share 240-bar pattern)
- get_minute_time_data: use history endpoint only (current-day endpoint broken in pytdx too)
- Update all examples to reflect new DataFrame column names
2026-05-22 04:19:07 +08:00
Justin Gu 00825eb24a feat: merge datetime fields in DataFrame output, hide MinuteBar internal fields
- K-line: daily+ periods output 'date' only, minute periods output 'datetime'
- Transactions (tick-by-tick): combine date param + hour/minute into 'datetime'
- XdxrRecord, HistoricalFundFlow: year/month/day merged to 'date'
- MinuteBar: rename unknown_1 to _unknown_1 (hidden from DataFrame)
- MinuteBar: add datetime column computed from bar index (A-share 240-bar pattern)
- get_minute_time_data: use history endpoint only (current-day endpoint broken in pytdx too)
- Update all examples to reflect new DataFrame column names
2026-05-22 04:19:07 +08:00
GitHubandClaude Opus 4.7 0d7f7aead1 docs: rewrite README introduction with ecosystem context
Position easy-tdx within the tdx open-source lineage (pytdx, mootdx,
xmtdx), acknowledging foundational contributions while highlighting
the protocol-level rewrite and technical characteristics.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 23:43:56 +08:00
GitHubandClaude Opus 4.7 50491f9aae feat!: rename project from xmtdx to easy-tdx
- Package directory: src/xmtdx/ -> src/easy_tdx/
- Import path: from easy_tdx import ...
- pip install easy-tdx
- Add LICENSE (MIT) with upstream attribution (pytdx, xmtdx)
- Add NOTICE with detailed attribution
- Update all examples, tests, scripts, docs
- Bump version to 1.0.0

BREAKING CHANGE: import path changed from `xmtdx` to `easy_tdx`

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 23:21:21 +08:00
GitHubandClaude Opus 4.7 9c5672b4d2 feat: add extended market, offline data reader, rewrite README
- Add ExTdxClient/AsyncExTdxClient for futures, HK stocks, etc (port 7727)
- Add offline module: read daily bars, minute bars, blocks, gbbq, financials
  from local TDX installation directory (inspired by pytdx)
- Add examples 09 (file download) and 10 (offline data reading)
- Rewrite README with comprehensive API docs and code examples
- Add TdxFileNotFoundError and TdxOfflineError exceptions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 23:03:08 +08:00
GitHubandClaude Opus 4.7 321043f9a5 feat: add professional financial data support via calc server
Add CALC_HOSTS, financial file list/record parsing (codec/financial.py),
new client methods (get_financial_file_list, get_financial_file,
get_financial_records) with async counterparts, and example 09 demo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 20:15:42 +08:00
GitHubandClaude Opus 4.7 7fd6e610cf feat: add examples (01-08), fix index bars parsing, add ruff hook
- Add example scripts for all API categories (connection, market info,
  kline, minute, transaction, finance, block, fund flow)
- Fix GetIndexBarsCmd: index bar records have 4 extra bytes (advance/
  decline counts) that were not consumed, causing pos drift and
  corrupted dates/volumes for all records after the first
- Fix price_limits.py example (SecurityQuote has no name attr)
- Fix finance_info.py display (scientific notation -> formatted numbers)
- Add PostToolUse ruff hook (scripts/ruff_hook.py)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 18:36:50 +08:00
Justin Gu ace1099ab0 chore: add CLAUDE.md and .claude config 2026-05-21 13:02:27 +08:00
Justin Gu 604f7cdf57 feat: expand KNOWN_HOSTS with 42 servers from TDX connect.cfg 2026-05-21 13:00:00 +08:00
minionszyw b3c1c555af Bump version to 0.1.1 2026-04-22 19:47:21 +08:00
minionszyw 7c085f7537 Normalize xdxr per-share fields 2026-04-22 19:42:34 +08:00
minionszyw d6788e67b3 Document BJ security list limitation 2026-04-22 19:05:38 +08:00
minionszyw 91f6a884d5 Fix security list pre-close decoding 2026-04-22 18:50:07 +08:00
minionszyw 41cb3bfd28 Fix current minute data client path 2026-04-22 18:34:59 +08:00
minionszyw aa3b1ac319 Fix transport and fund flow protocol edge cases 2026-04-22 17:54:13 +08:00
M 4cb48daabb Add live fallbacks for history fund flow and price limits 2026-04-15 21:23:13 +08:00
M 96f14f70bc Fix protocol regressions and clarify experimental APIs 2026-04-15 21:02:26 +08:00
M daaba7dc13 feat: 补全 A 股历史资金流向序列功能
1. 新增命令:实现 GetHistoryFundFlowCmd (0x052d Category 22) 用于拉取历史资金分布。
2. 新增模型:增加 HistoricalFundFlow 结构,支持超大/大/中/小单的双向统计。
3. 客户端 API:TdxClient/AsyncTdxClient 增加 get_history_fund_flow() 接口。
4. 单元测试:在 test_a_share_extensions.py 中增加响应包解析逻辑验证。
5. 文档更新:README.md 同步 API 及数据模型定义。
2026-04-15 15:26:51 +08:00
M 4dabbf6d15 feat: A 股深度数据补全与全市场覆盖方案
1. 全市场覆盖:增加北交所 (Market.BJ) 支持,实现沪深京三市 A 股 100% 物理一致获取。
2. 资金流向:实现 get_fund_flow() 接口,基于 Tick 数据实现超大/大/中/小单加权统计。
3. 行业挂载:实现 tdxhy.cfg 解析,支持全量 A 股列表自动关联通达信/申万行业标签。
4. 市场统计:完善 get_market_stat() 接口,支持获取全 A 股涨跌家数及成交额。
5. 健壮性与测试:补全 a_share_extensions 单元测试,重构心跳测试以消除外部依赖,全量测试 100% 通过。
6. 文档对齐:README.md 同步更新特性、API 列表及数据模型。
2026-04-15 12:57:28 +08:00
M 0352229fa3 cleanup: 删除开发过程中的中间验证脚本 2026-04-15 11:15:54 +08:00
M ad2fc9c84c feat: 实现全量 A 股列表获取与行业信息自动挂载
1. 编解码器:新增 codec/industry.py 用于解析 tdxhy.cfg 行业配置。
2. 数据模型:SecurityInfo 增加 industry_tdx 和 industry_sw 字段。
3. 客户端 API:增加 get_security_list_all(),支持分页拉取全市场 A 股并自动匹配行业标签。
4. 通讯优化:更新 KNOWN_HOSTS 包含更稳定的华为云及招商证券节点。
5. 文档更新:README.md 同步 API 及数据模型变更。
2026-04-14 22:57:45 +08:00
M b049511010 feat: 增加全市场涨跌统计功能并更新特性文档
1. 核心模型:增加 MarketStat dataclass。
2. 客户端 API:TdxClient 和 AsyncTdxClient 增加 get_market_stat() 方法。
3. 实现细节:基于通达信统计指数 880005 解析上涨、下跌、平盘及成交额数据。
4. 文档更新:README.md 特性章节添加保活机制与全市场统计说明。
2026-04-14 19:06:24 +08:00
M 081f851c6d feat: AsyncTdxClient 增加心跳保活机制
1. 在 AsyncTdxClient 中增加后台心跳任务,默认每 60 秒发送一次请求。
2. 支持在连接成功后自动启动,并在连接关闭时自动停止心跳任务。
3. 增加单元测试 tests/unit/test_heartbeat.py 验证心跳循环与清理逻辑。
2026-04-14 18:11:05 +08:00
M 2fbc7b9782 feat: 完善实时行情字段并增加大文件拉取功能
1. 行情增强:解析 SecurityQuote 中的 limit_up (涨停价) 和 limit_down (跌停价)。
2. 新增命令:实现 GetReportFileCmd (0x06B9),支持从服务器拉取 base_info.zip 等大文件。
3. 客户端 API:TdxClient/AsyncTdxClient 增加 get_report_file 方法,支持自动分片。
4. 验证脚本:增加 verify_limits.py 和 verify_report_file.py 实测脚本。
5. 文档更新:README.md 同步 API 变更及数据模型更新。
2026-04-14 17:57:54 +08:00
M fcd14c1d49 feat: 增加板块信息(block_info)获取与解析功能
1. 核心模型:增加 TdxBlock dataclass。
2. 协议命令:实现 GetBlockInfoMetaCmd 与 GetBlockInfoCmd。
3. 编解码器:增加 codec/block.py,支持 .dat 板块文件二进制解析。
4. 客户端 API:TdxClient 和 AsyncTdxClient 增加 get_block_info(),支持分片拉取。
5. 测试与验证:增加单元测试 tests/unit/test_block_info.py 及实测脚本。
6. 文档更新:README.md 同步 API 及安装说明。
2026-04-14 17:23:54 +08:00
MandClaude Sonnet 4.6 74ae6b6975 fix: xdxr_info 股本字段改用 _decode_volume 解码,单位万股
股本字段(category 2–10 的 panqian_liutong / panhou_liutong /
qian_zongguben / hou_zongguben)与成交量字段使用相同的通达信自定义
4 字节浮点格式;原 float(uint32) 直解差约 374 倍。

改用 _decode_volume 后,最近一条 hou_zongguben(3,330,583.75 万股)
与 FinanceInfo.zong_guben / 10000(3,330,583.75 万股)完全吻合。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:38:45 +08:00
M 22edefcfd2 docs: 调整 README.md 结构,提升用户友好度 2026-04-14 13:52:20 +08:00
M 9e7b72a98f docs: 更新 README.md 内容 2026-04-14 13:39:42 +08:00
minionszyw 16c237d5a0 Harden transport and decode paths 2026-04-11 21:47:08 +08:00
minionszywandClaude Sonnet 4.6 68bd74e0c3 docs: 补充 README.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 20:59:27 +08:00