chstockdata 0.4.2__tar.gz → 0.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. {chstockdata-0.4.2/src/chstockdata.egg-info → chstockdata-0.4.4}/PKG-INFO +44 -4
  2. {chstockdata-0.4.2 → chstockdata-0.4.4}/README.md +43 -3
  3. {chstockdata-0.4.2 → chstockdata-0.4.4}/pyproject.toml +6 -2
  4. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/__init__.py +25 -2
  5. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/a_stock.py +45 -9
  6. chstockdata-0.4.4/src/chstockdata/daily_fund_flow.py +526 -0
  7. chstockdata-0.4.4/src/chstockdata/data/industry/README.md +65 -0
  8. chstockdata-0.4.4/src/chstockdata/data/industry/classifications_2025H2.jsonl +5463 -0
  9. chstockdata-0.4.4/src/chstockdata/data/industry/classifications_2026H1.jsonl +5521 -0
  10. chstockdata-0.4.4/src/chstockdata/data/industry/sessions.json +343 -0
  11. chstockdata-0.4.4/src/chstockdata/data/industry/universe_2026-10-22.csv +5224 -0
  12. chstockdata-0.4.4/src/chstockdata/data/industry/universe_2026-10-22.meta.json +41 -0
  13. chstockdata-0.4.4/src/chstockdata/data/industry/versions.json +115 -0
  14. chstockdata-0.4.4/src/chstockdata/etf_total_return.py +281 -0
  15. chstockdata-0.4.4/src/chstockdata/industry_membership.py +1011 -0
  16. chstockdata-0.4.4/src/chstockdata/market_supply.py +188 -0
  17. {chstockdata-0.4.2 → chstockdata-0.4.4/src/chstockdata.egg-info}/PKG-INFO +44 -4
  18. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata.egg-info/SOURCES.txt +59 -0
  19. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/002-sh600000-p1.bin +1 -0
  20. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/010-sz300750-p1.bin +1 -0
  21. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/014-sh688981-p1.bin +1 -0
  22. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/017-sh688432-p1.bin +1 -0
  23. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/018-sz000004-p1.bin +1 -0
  24. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/019-sz000005-p1.bin +1 -0
  25. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/020-sz300750-p2.bin +1 -0
  26. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/021-sz300750-p3.bin +1 -0
  27. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/022-sz300750-p4.bin +1 -0
  28. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/023-sz300750-p5.bin +1 -0
  29. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/024-sz300750-p6.bin +1 -0
  30. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/025-sz300750-p7.bin +1 -0
  31. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/026-sz300750-p8.bin +1 -0
  32. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/027-sz300750-p9.bin +1 -0
  33. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/028-sz300750-p10.bin +1 -0
  34. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/029-sz300750-p11.bin +1 -0
  35. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/030-sz300750-p12.bin +1 -0
  36. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/031-sz300750-p13.bin +1 -0
  37. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/032-sh688981-p2.bin +1 -0
  38. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/033-sh688981-p3.bin +1 -0
  39. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/034-sh688981-p4.bin +1 -0
  40. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/035-sh688981-p5.bin +1 -0
  41. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/036-sh688981-p6.bin +1 -0
  42. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/037-sh688981-p7.bin +1 -0
  43. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/038-sh688981-p8.bin +1 -0
  44. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/039-sh688981-p9.bin +1 -0
  45. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/040-sh688981-p10.bin +1 -0
  46. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/041-sh688981-p11.bin +1 -0
  47. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/042-sh688981-p12.bin +1 -0
  48. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/043-sh688981-p13.bin +1 -0
  49. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/README.md +21 -0
  50. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/calendar.json +257 -0
  51. chstockdata-0.4.4/tests/fixtures/daily_fund_flow/manifest.json +698 -0
  52. chstockdata-0.4.4/tests/fixtures/financial_contract/300452_financial_contract.json +75 -0
  53. chstockdata-0.4.4/tests/fixtures/financial_contract/600518_fzb_2017_reconstructed.json +40 -0
  54. chstockdata-0.4.4/tests/fixtures/financial_contract/600518_llb_2016_2019.json +2872 -0
  55. chstockdata-0.4.4/tests/fixtures/financial_contract/600518_lrb_2016_2019.json +3444 -0
  56. chstockdata-0.4.4/tests/fixtures/financial_contract/eastmoney_600518_2020.json +1 -0
  57. chstockdata-0.4.4/tests/fixtures/financial_contract/eastmoney_600519_2025.json +1 -0
  58. chstockdata-0.4.4/tests/fixtures/financial_contract/provenance.json +26 -0
  59. chstockdata-0.4.4/tests/test_daily_fund_flow.py +462 -0
  60. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_delisting_structured.py +2 -2
  61. chstockdata-0.4.4/tests/test_dr05_financial_contract.py +291 -0
  62. chstockdata-0.4.4/tests/test_etf_total_return.py +276 -0
  63. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_fund_corporate_actions.py +2 -2
  64. chstockdata-0.4.4/tests/test_industry_membership.py +419 -0
  65. chstockdata-0.4.4/tests/test_market_supply.py +119 -0
  66. chstockdata-0.4.4/tests/test_receive_vipdoc_snapshot.py +91 -0
  67. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_rh1_git_line_endings.py +10 -1
  68. chstockdata-0.4.4/tests/test_sios_h01_delivery.py +159 -0
  69. chstockdata-0.4.4/tests/test_sios_h01_final_repair.py +176 -0
  70. {chstockdata-0.4.2 → chstockdata-0.4.4}/LICENSE +0 -0
  71. {chstockdata-0.4.2 → chstockdata-0.4.4}/MANIFEST.in +0 -0
  72. {chstockdata-0.4.2 → chstockdata-0.4.4}/NOTICE +0 -0
  73. {chstockdata-0.4.2 → chstockdata-0.4.4}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_history_responses.jsonl +0 -0
  74. {chstockdata-0.4.2 → chstockdata-0.4.4}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_final_responses.jsonl +0 -0
  75. {chstockdata-0.4.2 → chstockdata-0.4.4}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_followup_responses.jsonl +0 -0
  76. {chstockdata-0.4.2 → chstockdata-0.4.4}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_responses.jsonl +0 -0
  77. {chstockdata-0.4.2 → chstockdata-0.4.4}/scripts/check_release_version.py +0 -0
  78. {chstockdata-0.4.2 → chstockdata-0.4.4}/scripts/check_rh1_static.py +0 -0
  79. {chstockdata-0.4.2 → chstockdata-0.4.4}/setup.cfg +0 -0
  80. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/_easy_tdx_bridge.py +0 -0
  81. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/adjusted_bars.py +0 -0
  82. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/block_trades.py +0 -0
  83. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/board_flow.py +0 -0
  84. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/capabilities.py +0 -0
  85. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/chips.py +0 -0
  86. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/config.py +0 -0
  87. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/corporate_actions.py +0 -0
  88. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/daily_bars.py +0 -0
  89. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/delisting.py +0 -0
  90. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/etf_options.py +0 -0
  91. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/fetch_result.py +0 -0
  92. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/hot_rank.py +0 -0
  93. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/investor_qa.py +0 -0
  94. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/limit_up.py +0 -0
  95. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/market_breadth.py +0 -0
  96. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/mcp_server.py +0 -0
  97. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/northbound_data.py +0 -0
  98. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/northbound_store.py +0 -0
  99. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/opening_evidence.py +0 -0
  100. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/opening_known_events.json +0 -0
  101. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/point_in_time.py +0 -0
  102. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/policy_news.py +0 -0
  103. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/policy_news_models.py +0 -0
  104. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/policy_news_registry.py +0 -0
  105. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/policy_news_sources.py +0 -0
  106. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/provenance.py +0 -0
  107. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/py.typed +0 -0
  108. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/quote_chain.py +0 -0
  109. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/refresh_vipdoc.py +0 -0
  110. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/routing_observation.py +0 -0
  111. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/source_context.py +0 -0
  112. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/suspension.py +0 -0
  113. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/tdx_bridge.py +0 -0
  114. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/tradability.py +0 -0
  115. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/trading_calendar.py +0 -0
  116. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/utils.py +0 -0
  117. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/vendor_errors.py +0 -0
  118. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata/vipdoc_history.py +0 -0
  119. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata.egg-info/dependency_links.txt +0 -0
  120. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata.egg-info/entry_points.txt +0 -0
  121. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata.egg-info/requires.txt +0 -0
  122. {chstockdata-0.4.2 → chstockdata-0.4.4}/src/chstockdata.egg-info/top_level.txt +0 -0
  123. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/block_trades/eastmoney-600519-2025-12-12-sanitized.json +0 -0
  124. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/market_breadth/real_2026-09-04_close.json +0 -0
  125. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/market_breadth/real_2026-09-07_intraday.json +0 -0
  126. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/opening/159509-20260911.pdf +0 -0
  127. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/opening/manifest.json +0 -0
  128. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/opening/sse_688432_interval.bin +0 -0
  129. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/opening/szse_159509_announcements_control.bin +0 -0
  130. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/opening/szse_159915_announcements.bin +0 -0
  131. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/fixtures/vipdoc/price_scale_20221230.json +0 -0
  132. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_cls_v1.py +0 -0
  133. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_daily_lhb.py +0 -0
  134. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_earnings_forecast.py +0 -0
  135. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_eastmoney_fix.py +0 -0
  136. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_em_post.py +0 -0
  137. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_financial_yoy_alignment.py +0 -0
  138. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_fundamentals_fix.py +0 -0
  139. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_interface_fix.py +0 -0
  140. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_kline_vipdoc_chain.py +0 -0
  141. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_lhb_seat_dimension.py +0 -0
  142. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_listing_status.py +0 -0
  143. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_macro_indicators.py +0 -0
  144. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_margin_valuation.py +0 -0
  145. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_pledge_buyback.py +0 -0
  146. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_push2_source_scan.py +0 -0
  147. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_quote_fallback.py +0 -0
  148. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_research_reports.py +0 -0
  149. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_silent_failure_sentinel.py +0 -0
  150. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_tdx_fallback.py +0 -0
  151. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_tencent_quote_fix.py +0 -0
  152. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_ticker_routing.py +0 -0
  153. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_astock_v0221_fix.py +0 -0
  154. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_board_flow.py +0 -0
  155. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_cached_ohlcv_structured.py +0 -0
  156. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_calendar_consumers.py +0 -0
  157. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_capability_isolation.py +0 -0
  158. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_chip_distribution.py +0 -0
  159. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_config_and_warmup_regression.py +0 -0
  160. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_daily_bars_contract.py +0 -0
  161. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_daily_bars_legacy_compat.py +0 -0
  162. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_daily_bars_routing.py +0 -0
  163. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_daily_bars_schema.py +0 -0
  164. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_data_layer_live_smoke.py +0 -0
  165. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_easy_tdx_bridge.py +0 -0
  166. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_etf_options.py +0 -0
  167. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_fetch_result_core.py +0 -0
  168. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_free_block_trades.py +0 -0
  169. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_free_market_breadth.py +0 -0
  170. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_free_northbound_history.py +0 -0
  171. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_historical_opening_evidence.py +0 -0
  172. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_hot_rank.py +0 -0
  173. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_investor_qa.py +0 -0
  174. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_limit_up.py +0 -0
  175. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_live_capability_probes.py +0 -0
  176. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_market_date.py +0 -0
  177. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_mcp_server.py +0 -0
  178. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_mootdx_capability_health.py +0 -0
  179. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_mootdx_capability_isolation.py +0 -0
  180. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_mootdx_server_selection.py +0 -0
  181. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_refresh_vipdoc_history.py +0 -0
  182. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_release_version.py +0 -0
  183. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_routing_observation.py +0 -0
  184. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_structured_semantics_phase11.py +0 -0
  185. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_suspension_source_semantics.py +0 -0
  186. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_suspension_structured.py +0 -0
  187. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_tdx_bridge_health.py +0 -0
  188. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_tdx_request_hygiene.py +0 -0
  189. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_tradability.py +0 -0
  190. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_trading_calendar_structured.py +0 -0
  191. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_vipdoc_history.py +0 -0
  192. {chstockdata-0.4.2 → chstockdata-0.4.4}/tests/test_vipdoc_price_scale.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chstockdata
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Free China A-share market data toolkit: direct HTTP/TCP vendors (Tencent, mootdx/TDX, Eastmoney, Sina, THS, CLS, SSE/SZSE), no API keys, no mandatory third-party market-data SDK in the core path; optional mootdx/baostock integrations
5
5
  Author: joycoding2000
6
6
  License: Apache License
@@ -275,7 +275,19 @@ df = get_stock_data("600519", 365) # daily OHLCV, vipdoc/mootdx/Sina chain
275
275
  get_realtime_snapshot("600519") # realtime quote, Tencent -> mootdx -> Sina
276
276
  ```
277
277
 
278
- ## Structured API(v0.4.1 release candidate)
278
+ Version 0.4.4 adds four Owner-accepted, bounded capabilities: repeatable
279
+ A-share market-window supply with explicit coverage and UNKNOWN accounting;
280
+ current CAPCO industry membership with version identity and 31 retained
281
+ UNKNOWN members; named ETF split/cash-event total-return supply that keeps
282
+ the 2022-03-29 513500 gap as `INCOMPLETE`; and a narrow parent-net-profit
283
+ ROE correction in the free financial indicators. Install with
284
+ `python -m pip install chstockdata==0.4.4`.
285
+ See the [v0.4.4 release notes](docs/releases/v0.4.4.md).
286
+ These are bounded supplies: full Mishi `CURRENT_SCAN` / `HISTORICAL_REPLAY`,
287
+ SIOS H01-B full long-window NAV/metrics, historical PIT and full-market
288
+ DR01/DR05 qualification remain outside this release.
289
+
290
+ ## Structured API (v0.4.2)
279
291
 
280
292
  The structured surface is additive and returns `FetchResult` objects. The
281
293
  quote route keeps its provider functions injectable; `quote_fetchers` below is
@@ -333,8 +345,36 @@ hot rank / popularity rank / concept hits, insider transactions, shareholder
333
345
  pledge / buyback, corporate actions, earnings forecast, research reports, news
334
346
  wires, policy news, macro indicators, trading calendar, delisting / suspension
335
347
  info, and more. See `chstockdata/__init__.py` for the full export list. The
336
- candidate package version is `0.4.1`; `0.3.0` is the prior consumer
337
- compatibility baseline. This release candidate has not been published.
348
+ current release version is `0.4.4`
349
+ ([PyPI](https://pypi.org/project/chstockdata/0.4.4/) /
350
+ [GitHub Release](https://github.com/joycoding2000/chstockdata/releases/tag/v0.4.4)).
351
+ The structured API is additive: it does not deprecate the legacy API.
352
+ `0.3.0` remains the formal compatibility baseline for existing consumers
353
+ that have not yet migrated; migration is not assumed.
354
+
355
+ ### Historical capability boundaries
356
+
357
+ Suspension data is a current-day snapshot of the Eastmoney latest-event
358
+ list, not a historical as-of database. Historical and future dates fail
359
+ closed (`failed_structure`, limitation `historical_suspension_unavailable`):
360
+ an empty or non-matching latest-event response — including a cached one —
361
+ never proves that a security was tradable on a past date.
362
+ `fetch_tradability` returns `tradable=True` only on an explicit suspension
363
+ negative (`suspended=False` under a success / normal-empty status); missing
364
+ or unusable suspension evidence stays `tradable=None`
365
+ (`suspension_unknown`). A complete historical point-in-time suspension
366
+ database is not provided in this release.
367
+
368
+ `fetch_historical_opening_evidence` (policy `R2.1`) is a bounded opening
369
+ execution evidence capability exported in v0.4.2. Consumers — for example
370
+ SIOS, which uses it only in its explicitly selected `HISTORICAL_OPENING_R21`
371
+ mode — opt in deliberately. It reports positive trading activity in the
372
+ Asia/Shanghai `[09:30:00, 09:31:00)` window together with certified official
373
+ halt events. It does not guarantee that a specific order filled at exactly
374
+ 09:30:00, and it says nothing about order queue position or individual fill
375
+ probability. It does not replace complete historical PIT suspension coverage:
376
+ certified official vetoes and source conflicts still force `UNKNOWN` or
377
+ blocked results, and missing evidence stays fail-closed.
338
378
 
339
379
  ## Data sources
340
380
 
@@ -30,7 +30,19 @@ df = get_stock_data("600519", 365) # daily OHLCV, vipdoc/mootdx/Sina chain
30
30
  get_realtime_snapshot("600519") # realtime quote, Tencent -> mootdx -> Sina
31
31
  ```
32
32
 
33
- ## Structured API(v0.4.1 release candidate)
33
+ Version 0.4.4 adds four Owner-accepted, bounded capabilities: repeatable
34
+ A-share market-window supply with explicit coverage and UNKNOWN accounting;
35
+ current CAPCO industry membership with version identity and 31 retained
36
+ UNKNOWN members; named ETF split/cash-event total-return supply that keeps
37
+ the 2022-03-29 513500 gap as `INCOMPLETE`; and a narrow parent-net-profit
38
+ ROE correction in the free financial indicators. Install with
39
+ `python -m pip install chstockdata==0.4.4`.
40
+ See the [v0.4.4 release notes](docs/releases/v0.4.4.md).
41
+ These are bounded supplies: full Mishi `CURRENT_SCAN` / `HISTORICAL_REPLAY`,
42
+ SIOS H01-B full long-window NAV/metrics, historical PIT and full-market
43
+ DR01/DR05 qualification remain outside this release.
44
+
45
+ ## Structured API (v0.4.2)
34
46
 
35
47
  The structured surface is additive and returns `FetchResult` objects. The
36
48
  quote route keeps its provider functions injectable; `quote_fetchers` below is
@@ -88,8 +100,36 @@ hot rank / popularity rank / concept hits, insider transactions, shareholder
88
100
  pledge / buyback, corporate actions, earnings forecast, research reports, news
89
101
  wires, policy news, macro indicators, trading calendar, delisting / suspension
90
102
  info, and more. See `chstockdata/__init__.py` for the full export list. The
91
- candidate package version is `0.4.1`; `0.3.0` is the prior consumer
92
- compatibility baseline. This release candidate has not been published.
103
+ current release version is `0.4.4`
104
+ ([PyPI](https://pypi.org/project/chstockdata/0.4.4/) /
105
+ [GitHub Release](https://github.com/joycoding2000/chstockdata/releases/tag/v0.4.4)).
106
+ The structured API is additive: it does not deprecate the legacy API.
107
+ `0.3.0` remains the formal compatibility baseline for existing consumers
108
+ that have not yet migrated; migration is not assumed.
109
+
110
+ ### Historical capability boundaries
111
+
112
+ Suspension data is a current-day snapshot of the Eastmoney latest-event
113
+ list, not a historical as-of database. Historical and future dates fail
114
+ closed (`failed_structure`, limitation `historical_suspension_unavailable`):
115
+ an empty or non-matching latest-event response — including a cached one —
116
+ never proves that a security was tradable on a past date.
117
+ `fetch_tradability` returns `tradable=True` only on an explicit suspension
118
+ negative (`suspended=False` under a success / normal-empty status); missing
119
+ or unusable suspension evidence stays `tradable=None`
120
+ (`suspension_unknown`). A complete historical point-in-time suspension
121
+ database is not provided in this release.
122
+
123
+ `fetch_historical_opening_evidence` (policy `R2.1`) is a bounded opening
124
+ execution evidence capability exported in v0.4.2. Consumers — for example
125
+ SIOS, which uses it only in its explicitly selected `HISTORICAL_OPENING_R21`
126
+ mode — opt in deliberately. It reports positive trading activity in the
127
+ Asia/Shanghai `[09:30:00, 09:31:00)` window together with certified official
128
+ halt events. It does not guarantee that a specific order filled at exactly
129
+ 09:30:00, and it says nothing about order queue position or individual fill
130
+ probability. It does not replace complete historical PIT suspension coverage:
131
+ certified official vetoes and source conflicts still force `UNKNOWN` or
132
+ blocked results, and missing evidence stays fail-closed.
93
133
 
94
134
  ## Data sources
95
135
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chstockdata"
7
- version = "0.4.2"
7
+ version = "0.4.4"
8
8
  description = "Free China A-share market data toolkit: direct HTTP/TCP vendors (Tencent, mootdx/TDX, Eastmoney, Sina, THS, CLS, SSE/SZSE), no API keys, no mandatory third-party market-data SDK in the core path; optional mootdx/baostock integrations"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -62,7 +62,11 @@ Issues = "https://github.com/joycoding2000/chstockdata/issues"
62
62
  where = ["src"]
63
63
 
64
64
  [tool.setuptools.package-data]
65
- chstockdata = ["py.typed", "opening_known_events.json"]
65
+ chstockdata = [
66
+ "py.typed", "opening_known_events.json",
67
+ "data/industry/*.json", "data/industry/*.jsonl",
68
+ "data/industry/*.csv", "data/industry/*.md",
69
+ ]
66
70
 
67
71
  [tool.pytest.ini_options]
68
72
  testpaths = ["tests"]
@@ -85,6 +85,12 @@ from .a_stock import (
85
85
 
86
86
  # ── Reversed-ported upstream endpoints (v0.2.0) ─────────────────────────────
87
87
  from .board_flow import get_board_fund_flow
88
+ from .daily_fund_flow import (
89
+ DailyFundFlowResult,
90
+ FundFlowBudget,
91
+ FundFlowCalendar,
92
+ get_sina_daily_fund_flow,
93
+ )
88
94
  from .chips import chip_distribution, get_chip_distribution
89
95
  from .etf_options import (
90
96
  get_etf_option_chain,
@@ -111,6 +117,19 @@ from .vipdoc_history import (
111
117
  vipdoc_history_status,
112
118
  )
113
119
 
120
+ # Bounded v0.4.4 numerical supply; consumer and Owner gates remain separate.
121
+ from .market_supply import (
122
+ export_market_window,
123
+ read_market_package,
124
+ compare_market_packages,
125
+ )
126
+ from .etf_total_return import build_etf_total_return
127
+ from .industry_membership import (
128
+ get_current_industry_members,
129
+ load_capco_supply,
130
+ load_universe_snapshot,
131
+ )
132
+
114
133
  # ── Policy news ─────────────────────────────────────────────────────────────
115
134
  from .policy_news import get_policy_news_for_context
116
135
 
@@ -168,9 +187,12 @@ from .delisting import fetch_delisting_status
168
187
  from .tradability import fetch_tradability
169
188
  from .opening_evidence import fetch_historical_opening_evidence, OfficialOpeningEvent
170
189
 
171
- __version__ = "0.4.2"
190
+ __version__ = "0.4.4"
172
191
 
173
- __all__ = [
192
+ __all__ = [
193
+ "export_market_window", "read_market_package", "compare_market_packages",
194
+ "build_etf_total_return", "get_current_industry_members",
195
+ "load_capco_supply", "load_universe_snapshot",
174
196
  # config
175
197
  "configure", "get_config", "get_setting", "reset_config",
176
198
  "validate_vipdoc_history_config",
@@ -195,6 +217,7 @@ __all__ = [
195
217
  "get_corporate_buyback",
196
218
  # money flow / microstructure
197
219
  "get_fund_flow", "get_dragon_tiger_board", "get_block_trades",
220
+ "get_sina_daily_fund_flow", "DailyFundFlowResult", "FundFlowBudget", "FundFlowCalendar",
198
221
  "get_northbound_flow", "get_market_breadth", "get_margin_trading",
199
222
  "get_valuation_history", "get_industry_comparison", "get_concept_blocks",
200
223
  "get_daily_dragon_tiger", "get_board_fund_flow",
@@ -3656,6 +3656,12 @@ def get_free_financial_indicators(
3656
3656
  revenue = field(income_row, "营业收入", "主营业务收入")
3657
3657
  operating_cost = field(income_row, "营业成本", "主营业务成本")
3658
3658
  net_profit = field(income_row, "净利润", "归属于母公司股东的净利润")
3659
+ parent_net_profit = field(
3660
+ income_row,
3661
+ "归属于母公司所有者的净利润",
3662
+ "归属于母公司股东的净利润",
3663
+ "归属于母公司股东净利润",
3664
+ )
3659
3665
  total_assets = field(balance_row, "资产总计", "总资产")
3660
3666
  total_liabilities = field(balance_row, "负债合计", "总负债")
3661
3667
  parent_equity = field(
@@ -3747,11 +3753,24 @@ def get_free_financial_indicators(
3747
3753
  "归属于母公司股东的所有者权益",
3748
3754
  )
3749
3755
  roe = None
3750
- roe_basis = "不可用"
3751
- if report_period.endswith("12-31") and net_profit is not None and parent_equity is not None and previous_equity is not None:
3752
- roe = percent_ratio(net_profit, (parent_equity + previous_equity) / 2)
3753
- roe_basis = "年报净利润/平均归母权益"
3754
- elif net_profit is not None and parent_equity is not None and previous_equity is not None:
3756
+ roe_basis = "缺少归母净利润或归母权益基期"
3757
+ if report_period.endswith("12-31"):
3758
+ if (
3759
+ parent_net_profit is not None
3760
+ and parent_equity is not None
3761
+ and previous_equity is not None
3762
+ ):
3763
+ roe = percent_ratio(
3764
+ parent_net_profit, (parent_equity + previous_equity) / 2
3765
+ )
3766
+ roe_basis = "年报归母净利润/平均归母权益"
3767
+ elif parent_net_profit is None:
3768
+ roe_basis = "缺少归母净利润"
3769
+ elif parent_equity is None:
3770
+ roe_basis = "缺少期末归母权益"
3771
+ elif previous_equity is None:
3772
+ roe_basis = "缺少上年同期归母权益"
3773
+ elif parent_net_profit is not None and parent_equity is not None and previous_equity is not None:
3755
3774
  prior_year_end = f"{pd.Timestamp(report_period).year - 1}-12-31"
3756
3775
  prior_income_rows = reports["利润表"].loc[
3757
3776
  reports["利润表"]["报告日"].map(date_text) == prior_period
@@ -3761,17 +3780,33 @@ def get_free_financial_indicators(
3761
3780
  ]
3762
3781
  if not prior_income_rows.empty and not prior_annual_rows.empty:
3763
3782
  prior_same_profit = field(
3764
- prior_income_rows.iloc[0].to_dict(), "净利润", "归属于母公司股东的净利润"
3783
+ prior_income_rows.iloc[0].to_dict(),
3784
+ "归属于母公司所有者的净利润",
3785
+ "归属于母公司股东的净利润",
3786
+ "归属于母公司股东净利润",
3765
3787
  )
3766
3788
  prior_annual_profit = field(
3767
- prior_annual_rows.iloc[0].to_dict(), "净利润", "归属于母公司股东的净利润"
3789
+ prior_annual_rows.iloc[0].to_dict(),
3790
+ "归属于母公司所有者的净利润",
3791
+ "归属于母公司股东的净利润",
3792
+ "归属于母公司股东净利润",
3768
3793
  )
3769
3794
  if prior_same_profit is not None and prior_annual_profit is not None:
3770
3795
  roe = percent_ratio(
3771
- net_profit + prior_annual_profit - prior_same_profit,
3796
+ parent_net_profit + prior_annual_profit - prior_same_profit,
3772
3797
  (parent_equity + previous_equity) / 2,
3773
3798
  )
3774
- roe_basis = "TTM净利润/平均归母权益"
3799
+ roe_basis = "TTM归母净利润/平均归母权益"
3800
+ else:
3801
+ roe_basis = "缺少上年同期或上年年报归母净利润"
3802
+ else:
3803
+ roe_basis = "缺少上年同期或上年年报归母净利润"
3804
+ elif parent_net_profit is None:
3805
+ roe_basis = "缺少归母净利润"
3806
+ elif parent_equity is None:
3807
+ roe_basis = "缺少期末归母权益"
3808
+ elif previous_equity is None:
3809
+ roe_basis = "缺少上年同期归母权益"
3775
3810
 
3776
3811
  def rendered_amount(label: str, value: float | None) -> str:
3777
3812
  return f"- {label}: {value:.2f}" if value is not None else f"- {label}: 不可用"
@@ -3825,6 +3860,7 @@ def get_free_financial_indicators(
3825
3860
  rendered_amount("营业收入", revenue),
3826
3861
  rendered_amount("营业成本", operating_cost),
3827
3862
  rendered_amount("净利润", net_profit),
3863
+ rendered_amount("归母净利润", parent_net_profit),
3828
3864
  rendered_amount("总资产", total_assets),
3829
3865
  rendered_amount("总负债", total_liabilities),
3830
3866
  rendered_amount("归母权益", parent_equity),