chstockdata 0.4.2__tar.gz → 0.4.3__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.
- {chstockdata-0.4.2/src/chstockdata.egg-info → chstockdata-0.4.3}/PKG-INFO +43 -4
- {chstockdata-0.4.2 → chstockdata-0.4.3}/README.md +42 -3
- {chstockdata-0.4.2 → chstockdata-0.4.3}/pyproject.toml +1 -1
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/__init__.py +8 -1
- chstockdata-0.4.3/src/chstockdata/daily_fund_flow.py +526 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3/src/chstockdata.egg-info}/PKG-INFO +43 -4
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata.egg-info/SOURCES.txt +35 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/002-sh600000-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/010-sz300750-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/014-sh688981-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/017-sh688432-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/018-sz000004-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/019-sz000005-p1.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/020-sz300750-p2.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/021-sz300750-p3.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/022-sz300750-p4.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/023-sz300750-p5.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/024-sz300750-p6.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/025-sz300750-p7.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/026-sz300750-p8.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/027-sz300750-p9.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/028-sz300750-p10.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/029-sz300750-p11.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/030-sz300750-p12.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/031-sz300750-p13.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/032-sh688981-p2.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/033-sh688981-p3.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/034-sh688981-p4.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/035-sh688981-p5.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/036-sh688981-p6.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/037-sh688981-p7.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/038-sh688981-p8.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/039-sh688981-p9.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/040-sh688981-p10.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/041-sh688981-p11.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/042-sh688981-p12.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/043-sh688981-p13.bin +1 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/README.md +21 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/calendar.json +257 -0
- chstockdata-0.4.3/tests/fixtures/daily_fund_flow/manifest.json +698 -0
- chstockdata-0.4.3/tests/test_daily_fund_flow.py +462 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_delisting_structured.py +2 -2
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_fund_corporate_actions.py +2 -2
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_rh1_git_line_endings.py +10 -1
- {chstockdata-0.4.2 → chstockdata-0.4.3}/LICENSE +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/MANIFEST.in +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/NOTICE +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_history_responses.jsonl +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_final_responses.jsonl +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_followup_responses.jsonl +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/docs/audits/evidence/2026-10-10-v0.4.2-tdx-historical-execution/tdx_opening_page_responses.jsonl +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/scripts/check_release_version.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/scripts/check_rh1_static.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/setup.cfg +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/_easy_tdx_bridge.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/a_stock.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/adjusted_bars.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/block_trades.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/board_flow.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/capabilities.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/chips.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/config.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/corporate_actions.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/daily_bars.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/delisting.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/etf_options.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/fetch_result.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/hot_rank.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/investor_qa.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/limit_up.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/market_breadth.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/mcp_server.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/northbound_data.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/northbound_store.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/opening_evidence.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/opening_known_events.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/point_in_time.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/policy_news.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/policy_news_models.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/policy_news_registry.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/policy_news_sources.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/provenance.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/py.typed +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/quote_chain.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/refresh_vipdoc.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/routing_observation.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/source_context.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/suspension.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/tdx_bridge.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/tradability.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/trading_calendar.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/utils.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/vendor_errors.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata/vipdoc_history.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata.egg-info/dependency_links.txt +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata.egg-info/entry_points.txt +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata.egg-info/requires.txt +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/src/chstockdata.egg-info/top_level.txt +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/block_trades/eastmoney-600519-2025-12-12-sanitized.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/market_breadth/real_2026-09-04_close.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/market_breadth/real_2026-09-07_intraday.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/opening/159509-20260911.pdf +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/opening/manifest.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/opening/sse_688432_interval.bin +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/opening/szse_159509_announcements_control.bin +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/opening/szse_159915_announcements.bin +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/fixtures/vipdoc/price_scale_20221230.json +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_cls_v1.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_daily_lhb.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_earnings_forecast.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_eastmoney_fix.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_em_post.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_financial_yoy_alignment.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_fundamentals_fix.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_interface_fix.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_kline_vipdoc_chain.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_lhb_seat_dimension.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_listing_status.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_macro_indicators.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_margin_valuation.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_pledge_buyback.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_push2_source_scan.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_quote_fallback.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_research_reports.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_silent_failure_sentinel.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_tdx_fallback.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_tencent_quote_fix.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_ticker_routing.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_astock_v0221_fix.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_board_flow.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_cached_ohlcv_structured.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_calendar_consumers.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_capability_isolation.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_chip_distribution.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_config_and_warmup_regression.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_daily_bars_contract.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_daily_bars_legacy_compat.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_daily_bars_routing.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_daily_bars_schema.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_data_layer_live_smoke.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_easy_tdx_bridge.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_etf_options.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_fetch_result_core.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_free_block_trades.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_free_market_breadth.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_free_northbound_history.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_historical_opening_evidence.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_hot_rank.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_investor_qa.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_limit_up.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_live_capability_probes.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_market_date.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_mcp_server.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_mootdx_capability_health.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_mootdx_capability_isolation.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_mootdx_server_selection.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_refresh_vipdoc_history.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_release_version.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_routing_observation.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_structured_semantics_phase11.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_suspension_source_semantics.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_suspension_structured.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_tdx_bridge_health.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_tdx_request_hygiene.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_tradability.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_trading_calendar_structured.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/tests/test_vipdoc_history.py +0 -0
- {chstockdata-0.4.2 → chstockdata-0.4.3}/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.
|
|
3
|
+
Version: 0.4.3
|
|
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,18 @@ 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
|
-
|
|
278
|
+
Version 0.4.3 adds the Owner-accepted DR04-P public API
|
|
279
|
+
`get_sina_daily_fund_flow` and the public `FundFlowCalendar`, `FundFlowBudget`
|
|
280
|
+
and `DailyFundFlowResult` types for lossless Sina daily `r0_net` observations.
|
|
281
|
+
Install with `python -m pip install chstockdata==0.4.3`.
|
|
282
|
+
See the [consumer contract and usage](docs/dr04-p-daily-fund-flow.md) and
|
|
283
|
+
[v0.4.3 release notes](docs/releases/v0.4.3.md).
|
|
284
|
+
Consumers supply a qualified trading calendar and explicit request budget.
|
|
285
|
+
Numeric completeness does not establish zero-value semantics, source finality,
|
|
286
|
+
historical PIT, full-market coverage or strategy qualification; DR04-M remains
|
|
287
|
+
outside this release.
|
|
288
|
+
|
|
289
|
+
## Structured API (v0.4.2)
|
|
279
290
|
|
|
280
291
|
The structured surface is additive and returns `FetchResult` objects. The
|
|
281
292
|
quote route keeps its provider functions injectable; `quote_fetchers` below is
|
|
@@ -333,8 +344,36 @@ hot rank / popularity rank / concept hits, insider transactions, shareholder
|
|
|
333
344
|
pledge / buyback, corporate actions, earnings forecast, research reports, news
|
|
334
345
|
wires, policy news, macro indicators, trading calendar, delisting / suspension
|
|
335
346
|
info, and more. See `chstockdata/__init__.py` for the full export list. The
|
|
336
|
-
|
|
337
|
-
|
|
347
|
+
current release version is `0.4.3`
|
|
348
|
+
([PyPI](https://pypi.org/project/chstockdata/0.4.3/) /
|
|
349
|
+
[GitHub Release](https://github.com/joycoding2000/chstockdata/releases/tag/v0.4.3)).
|
|
350
|
+
The structured API is additive: it does not deprecate the legacy API.
|
|
351
|
+
`0.3.0` remains the formal compatibility baseline for existing consumers
|
|
352
|
+
that have not yet migrated; migration is not assumed.
|
|
353
|
+
|
|
354
|
+
### Historical capability boundaries
|
|
355
|
+
|
|
356
|
+
Suspension data is a current-day snapshot of the Eastmoney latest-event
|
|
357
|
+
list, not a historical as-of database. Historical and future dates fail
|
|
358
|
+
closed (`failed_structure`, limitation `historical_suspension_unavailable`):
|
|
359
|
+
an empty or non-matching latest-event response — including a cached one —
|
|
360
|
+
never proves that a security was tradable on a past date.
|
|
361
|
+
`fetch_tradability` returns `tradable=True` only on an explicit suspension
|
|
362
|
+
negative (`suspended=False` under a success / normal-empty status); missing
|
|
363
|
+
or unusable suspension evidence stays `tradable=None`
|
|
364
|
+
(`suspension_unknown`). A complete historical point-in-time suspension
|
|
365
|
+
database is not provided in this release.
|
|
366
|
+
|
|
367
|
+
`fetch_historical_opening_evidence` (policy `R2.1`) is a bounded opening
|
|
368
|
+
execution evidence capability exported in v0.4.2. Consumers — for example
|
|
369
|
+
SIOS, which uses it only in its explicitly selected `HISTORICAL_OPENING_R21`
|
|
370
|
+
mode — opt in deliberately. It reports positive trading activity in the
|
|
371
|
+
Asia/Shanghai `[09:30:00, 09:31:00)` window together with certified official
|
|
372
|
+
halt events. It does not guarantee that a specific order filled at exactly
|
|
373
|
+
09:30:00, and it says nothing about order queue position or individual fill
|
|
374
|
+
probability. It does not replace complete historical PIT suspension coverage:
|
|
375
|
+
certified official vetoes and source conflicts still force `UNKNOWN` or
|
|
376
|
+
blocked results, and missing evidence stays fail-closed.
|
|
338
377
|
|
|
339
378
|
## Data sources
|
|
340
379
|
|
|
@@ -30,7 +30,18 @@ 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
|
-
|
|
33
|
+
Version 0.4.3 adds the Owner-accepted DR04-P public API
|
|
34
|
+
`get_sina_daily_fund_flow` and the public `FundFlowCalendar`, `FundFlowBudget`
|
|
35
|
+
and `DailyFundFlowResult` types for lossless Sina daily `r0_net` observations.
|
|
36
|
+
Install with `python -m pip install chstockdata==0.4.3`.
|
|
37
|
+
See the [consumer contract and usage](docs/dr04-p-daily-fund-flow.md) and
|
|
38
|
+
[v0.4.3 release notes](docs/releases/v0.4.3.md).
|
|
39
|
+
Consumers supply a qualified trading calendar and explicit request budget.
|
|
40
|
+
Numeric completeness does not establish zero-value semantics, source finality,
|
|
41
|
+
historical PIT, full-market coverage or strategy qualification; DR04-M remains
|
|
42
|
+
outside this release.
|
|
43
|
+
|
|
44
|
+
## Structured API (v0.4.2)
|
|
34
45
|
|
|
35
46
|
The structured surface is additive and returns `FetchResult` objects. The
|
|
36
47
|
quote route keeps its provider functions injectable; `quote_fetchers` below is
|
|
@@ -88,8 +99,36 @@ hot rank / popularity rank / concept hits, insider transactions, shareholder
|
|
|
88
99
|
pledge / buyback, corporate actions, earnings forecast, research reports, news
|
|
89
100
|
wires, policy news, macro indicators, trading calendar, delisting / suspension
|
|
90
101
|
info, and more. See `chstockdata/__init__.py` for the full export list. The
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
current release version is `0.4.3`
|
|
103
|
+
([PyPI](https://pypi.org/project/chstockdata/0.4.3/) /
|
|
104
|
+
[GitHub Release](https://github.com/joycoding2000/chstockdata/releases/tag/v0.4.3)).
|
|
105
|
+
The structured API is additive: it does not deprecate the legacy API.
|
|
106
|
+
`0.3.0` remains the formal compatibility baseline for existing consumers
|
|
107
|
+
that have not yet migrated; migration is not assumed.
|
|
108
|
+
|
|
109
|
+
### Historical capability boundaries
|
|
110
|
+
|
|
111
|
+
Suspension data is a current-day snapshot of the Eastmoney latest-event
|
|
112
|
+
list, not a historical as-of database. Historical and future dates fail
|
|
113
|
+
closed (`failed_structure`, limitation `historical_suspension_unavailable`):
|
|
114
|
+
an empty or non-matching latest-event response — including a cached one —
|
|
115
|
+
never proves that a security was tradable on a past date.
|
|
116
|
+
`fetch_tradability` returns `tradable=True` only on an explicit suspension
|
|
117
|
+
negative (`suspended=False` under a success / normal-empty status); missing
|
|
118
|
+
or unusable suspension evidence stays `tradable=None`
|
|
119
|
+
(`suspension_unknown`). A complete historical point-in-time suspension
|
|
120
|
+
database is not provided in this release.
|
|
121
|
+
|
|
122
|
+
`fetch_historical_opening_evidence` (policy `R2.1`) is a bounded opening
|
|
123
|
+
execution evidence capability exported in v0.4.2. Consumers — for example
|
|
124
|
+
SIOS, which uses it only in its explicitly selected `HISTORICAL_OPENING_R21`
|
|
125
|
+
mode — opt in deliberately. It reports positive trading activity in the
|
|
126
|
+
Asia/Shanghai `[09:30:00, 09:31:00)` window together with certified official
|
|
127
|
+
halt events. It does not guarantee that a specific order filled at exactly
|
|
128
|
+
09:30:00, and it says nothing about order queue position or individual fill
|
|
129
|
+
probability. It does not replace complete historical PIT suspension coverage:
|
|
130
|
+
certified official vetoes and source conflicts still force `UNKNOWN` or
|
|
131
|
+
blocked results, and missing evidence stays fail-closed.
|
|
93
132
|
|
|
94
133
|
## Data sources
|
|
95
134
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "chstockdata"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.3"
|
|
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" }
|
|
@@ -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,
|
|
@@ -168,7 +174,7 @@ from .delisting import fetch_delisting_status
|
|
|
168
174
|
from .tradability import fetch_tradability
|
|
169
175
|
from .opening_evidence import fetch_historical_opening_evidence, OfficialOpeningEvent
|
|
170
176
|
|
|
171
|
-
__version__ = "0.4.
|
|
177
|
+
__version__ = "0.4.3"
|
|
172
178
|
|
|
173
179
|
__all__ = [
|
|
174
180
|
# config
|
|
@@ -195,6 +201,7 @@ __all__ = [
|
|
|
195
201
|
"get_corporate_buyback",
|
|
196
202
|
# money flow / microstructure
|
|
197
203
|
"get_fund_flow", "get_dragon_tiger_board", "get_block_trades",
|
|
204
|
+
"get_sina_daily_fund_flow", "DailyFundFlowResult", "FundFlowBudget", "FundFlowCalendar",
|
|
198
205
|
"get_northbound_flow", "get_market_breadth", "get_margin_trading",
|
|
199
206
|
"get_valuation_history", "get_industry_comparison", "get_concept_blocks",
|
|
200
207
|
"get_daily_dragon_tiger", "get_board_fund_flow",
|