carrotquant-data 1.2.2__tar.gz → 1.3.0__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.
- {carrotquant_data-1.2.2 → carrotquant_data-1.3.0}/PKG-INFO +70 -53
- {carrotquant_data-1.2.2 → carrotquant_data-1.3.0}/README.md +66 -49
- carrotquant_data-1.3.0/carrotquant_data.egg-info/PKG-INFO +344 -0
- carrotquant_data-1.3.0/carrotquant_data.egg-info/SOURCES.txt +49 -0
- carrotquant_data-1.3.0/carrotquant_data.egg-info/dependency_links.txt +1 -0
- carrotquant_data-1.3.0/carrotquant_data.egg-info/entry_points.txt +2 -0
- carrotquant_data-1.3.0/carrotquant_data.egg-info/requires.txt +11 -0
- carrotquant_data-1.3.0/carrotquant_data.egg-info/top_level.txt +1 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/__init__.py +5 -5
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/config/settings.py +4 -4
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/__init__.py +2 -2
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/accessors/__init__.py +3 -3
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/accessors/aindex.py +1 -1
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/accessors/ashare.py +1 -1
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/accessors/base.py +2 -2
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/cli.py +4 -4
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/python_api.py +10 -10
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/entrypoints/rest_api.py +7 -7
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/baostock_provider.py +4 -4
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/eastmoney_provider.py +4 -4
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/provider_manager.py +5 -5
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/tdx_provider.py +5 -5
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/data_reader.py +5 -5
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/metadata_manager.py +1 -1
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/metadata_reader.py +5 -5
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/utils/logger_utils.py +1 -1
- {carrotquant_data-1.2.2 → carrotquant_data-1.3.0}/pyproject.toml +13 -19
- carrotquant_data-1.3.0/setup.cfg +4 -0
- carrotquant_data-1.2.2/.github/workflows/tests.yml +0 -47
- carrotquant_data-1.2.2/.github/workflows/workflow.yml +0 -52
- carrotquant_data-1.2.2/.gitignore +0 -28
- carrotquant_data-1.2.2/.idea/.gitignore +0 -5
- carrotquant_data-1.2.2/.idea/CarrotQuant.Data.iml +0 -17
- carrotquant_data-1.2.2/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- carrotquant_data-1.2.2/.idea/misc.xml +0 -7
- carrotquant_data-1.2.2/.idea/modules.xml +0 -8
- carrotquant_data-1.2.2/.idea/vcs.xml +0 -6
- carrotquant_data-1.2.2/AGENTS.md +0 -381
- carrotquant_data-1.2.2/config/config.yaml.sample +0 -21
- carrotquant_data-1.2.2/demo/em/a_stock.py +0 -2023
- carrotquant_data-1.2.2/demo/em/concept_board_em.py +0 -302
- carrotquant_data-1.2.2/demo/em/dragon_tiger_em.py +0 -358
- carrotquant_data-1.2.2/demo/em/em_utils.py +0 -167
- carrotquant_data-1.2.2/demo/em/industry_board_em.py +0 -309
- carrotquant_data-1.2.2/demo/em/institutional_trade_daily_em.py +0 -353
- carrotquant_data-1.2.2/demo/tdx/compare_with_baostock.py +0 -195
- carrotquant_data-1.2.2/demo/tdx/explore_tdx.py +0 -124
- carrotquant_data-1.2.2/demo/tdx/mootdx_online_demo.py +0 -45
- carrotquant_data-1.2.2/demo/tdx/test_max_offset.py +0 -105
- carrotquant_data-1.2.2/demo/tdx/test_tdx_online.py +0 -178
- carrotquant_data-1.2.2/demo/tdx/test_tdx_provider.py +0 -85
- carrotquant_data-1.2.2/dev.bat +0 -25
- carrotquant_data-1.2.2/docs/python_sdk_guide.md +0 -407
- carrotquant_data-1.2.2/docs/rest_api_guide.md +0 -301
- carrotquant_data-1.2.2/docs/web_terminal_guide.md +0 -83
- carrotquant_data-1.2.2/examples/01_quickstart.py +0 -46
- carrotquant_data-1.2.2/examples/02_sync_data.py +0 -36
- carrotquant_data-1.2.2/examples/03_read_series.py +0 -36
- carrotquant_data-1.2.2/examples/04_read_events.py +0 -25
- carrotquant_data-1.2.2/examples/05_export_pandas.py +0 -25
- carrotquant_data-1.2.2/examples/05_read_concept_boards.py +0 -25
- carrotquant_data-1.2.2/examples/06_metadata_inspection.py +0 -32
- carrotquant_data-1.2.2/examples/README.md +0 -32
- carrotquant_data-1.2.2/scripts/download_tdx.py +0 -181
- carrotquant_data-1.2.2/scripts/download_test_data.ps1 +0 -76
- carrotquant_data-1.2.2/scripts/wizard.py +0 -229
- carrotquant_data-1.2.2/tests/conftest.py +0 -49
- carrotquant_data-1.2.2/tests/integration/__init__.py +0 -0
- carrotquant_data-1.2.2/tests/integration/test_cqdata_cli.py +0 -112
- carrotquant_data-1.2.2/tests/integration/test_cqdata_sdk.py +0 -92
- carrotquant_data-1.2.2/tests/integration/test_integration_fs_list.py +0 -51
- carrotquant_data-1.2.2/tests/integration/test_integration_tdx_sync.py +0 -94
- carrotquant_data-1.2.2/tests/integration/test_provider_baostock.py +0 -138
- carrotquant_data-1.2.2/tests/integration/test_provider_eastmoney.py +0 -181
- carrotquant_data-1.2.2/tests/integration/test_rest_api_integration.py +0 -105
- carrotquant_data-1.2.2/tests/integration/test_sync_defense.py +0 -300
- carrotquant_data-1.2.2/tests/integration/test_sync_full_flow.py +0 -180
- carrotquant_data-1.2.2/tests/integration/test_sync_multi_storage.py +0 -366
- carrotquant_data-1.2.2/tests/unit/__init__.py +0 -0
- carrotquant_data-1.2.2/tests/unit/test_accessors.py +0 -105
- carrotquant_data-1.2.2/tests/unit/test_config_settings.py +0 -54
- carrotquant_data-1.2.2/tests/unit/test_data_reader.py +0 -121
- carrotquant_data-1.2.2/tests/unit/test_entrypoint_python_api.py +0 -86
- carrotquant_data-1.2.2/tests/unit/test_entrypoint_rest_api.py +0 -302
- carrotquant_data-1.2.2/tests/unit/test_examples.py +0 -57
- carrotquant_data-1.2.2/tests/unit/test_logger_utils.py +0 -120
- carrotquant_data-1.2.2/tests/unit/test_metadata_manager.py +0 -146
- carrotquant_data-1.2.2/tests/unit/test_metadata_reader.py +0 -134
- carrotquant_data-1.2.2/tests/unit/test_provider_baostock.py +0 -215
- carrotquant_data-1.2.2/tests/unit/test_provider_eastmoney.py +0 -527
- carrotquant_data-1.2.2/tests/unit/test_provider_tdx.py +0 -568
- carrotquant_data-1.2.2/tests/unit/test_rest_api_boards.py +0 -107
- carrotquant_data-1.2.2/tests/unit/test_rest_api_sync.py +0 -84
- carrotquant_data-1.2.2/tests/unit/test_script_wizard.py +0 -66
- carrotquant_data-1.2.2/tests/unit/test_service_batch_sync.py +0 -115
- carrotquant_data-1.2.2/tests/unit/test_service_planner.py +0 -469
- carrotquant_data-1.2.2/tests/unit/test_storage_concurrency.py +0 -79
- carrotquant_data-1.2.2/tests/unit/test_storage_csv.py +0 -471
- carrotquant_data-1.2.2/tests/unit/test_storage_factory.py +0 -52
- carrotquant_data-1.2.2/tests/unit/test_storage_flat.py +0 -295
- carrotquant_data-1.2.2/tests/unit/test_storage_merger.py +0 -243
- carrotquant_data-1.2.2/tests/unit/test_storage_parquet.py +0 -383
- carrotquant_data-1.2.2/tests/unit/test_sync_and_metadata.py +0 -252
- carrotquant_data-1.2.2/tests/unit/test_sync_tracker.py +0 -54
- carrotquant_data-1.2.2/tests/unit/test_update_metadata.py +0 -349
- carrotquant_data-1.2.2/tests/unit/test_utils_time.py +0 -212
- carrotquant_data-1.2.2/uv.lock +0 -1087
- carrotquant_data-1.2.2/web/.gitignore +0 -29
- carrotquant_data-1.2.2/web/.oxlintrc.json +0 -8
- carrotquant_data-1.2.2/web/README.md +0 -32
- carrotquant_data-1.2.2/web/bun.lock +0 -509
- carrotquant_data-1.2.2/web/e2e/terminal.spec.ts +0 -15
- carrotquant_data-1.2.2/web/index.html +0 -13
- carrotquant_data-1.2.2/web/package.json +0 -39
- carrotquant_data-1.2.2/web/postcss.config.js +0 -6
- carrotquant_data-1.2.2/web/public/favicon.svg +0 -1
- carrotquant_data-1.2.2/web/public/icons.svg +0 -24
- carrotquant_data-1.2.2/web/src/App.tsx +0 -183
- carrotquant_data-1.2.2/web/src/__tests__/ConceptData.test.ts +0 -37
- carrotquant_data-1.2.2/web/src/__tests__/DataTable.test.ts +0 -40
- carrotquant_data-1.2.2/web/src/__tests__/SearchInput.test.ts +0 -38
- carrotquant_data-1.2.2/web/src/__tests__/apiClient.test.ts +0 -149
- carrotquant_data-1.2.2/web/src/__tests__/chartEngine.test.ts +0 -97
- carrotquant_data-1.2.2/web/src/__tests__/chartPerformance.test.ts +0 -25
- carrotquant_data-1.2.2/web/src/__tests__/indicators.test.ts +0 -58
- carrotquant_data-1.2.2/web/src/__tests__/marketDataHook.test.ts +0 -35
- carrotquant_data-1.2.2/web/src/__tests__/performance.test.ts +0 -65
- carrotquant_data-1.2.2/web/src/__tests__/pinyin.test.ts +0 -32
- carrotquant_data-1.2.2/web/src/__tests__/stockDictionary.test.ts +0 -42
- carrotquant_data-1.2.2/web/src/__tests__/transformers.test.ts +0 -72
- carrotquant_data-1.2.2/web/src/__tests__/viewsRender.test.tsx +0 -98
- carrotquant_data-1.2.2/web/src/components/DataTable.tsx +0 -164
- carrotquant_data-1.2.2/web/src/components/ErrorBoundary.tsx +0 -89
- carrotquant_data-1.2.2/web/src/components/FileExplorerModal.tsx +0 -260
- carrotquant_data-1.2.2/web/src/components/FloatingSyncWidget.tsx +0 -122
- carrotquant_data-1.2.2/web/src/components/HeaderBar.tsx +0 -91
- carrotquant_data-1.2.2/web/src/components/LogTerminal.tsx +0 -230
- carrotquant_data-1.2.2/web/src/components/SearchInput.tsx +0 -244
- carrotquant_data-1.2.2/web/src/components/SidebarNav.tsx +0 -144
- carrotquant_data-1.2.2/web/src/components/SyncModal.tsx +0 -333
- carrotquant_data-1.2.2/web/src/components/TableManagementGrid.tsx +0 -540
- carrotquant_data-1.2.2/web/src/components/TradingViewKLineChart.tsx +0 -158
- carrotquant_data-1.2.2/web/src/hooks/useConceptData.ts +0 -158
- carrotquant_data-1.2.2/web/src/hooks/useMarketData.ts +0 -176
- carrotquant_data-1.2.2/web/src/hooks/useTables.ts +0 -75
- carrotquant_data-1.2.2/web/src/index.css +0 -45
- carrotquant_data-1.2.2/web/src/main.tsx +0 -10
- carrotquant_data-1.2.2/web/src/services/apiClient.ts +0 -188
- carrotquant_data-1.2.2/web/src/services/chartEngine.ts +0 -259
- carrotquant_data-1.2.2/web/src/services/indicators.ts +0 -218
- carrotquant_data-1.2.2/web/src/services/pinyin.ts +0 -133
- carrotquant_data-1.2.2/web/src/services/stockDictionary.ts +0 -129
- carrotquant_data-1.2.2/web/src/services/transformers.ts +0 -161
- carrotquant_data-1.2.2/web/src/types/api.ts +0 -342
- carrotquant_data-1.2.2/web/src/views/ConceptIndustryView.tsx +0 -208
- carrotquant_data-1.2.2/web/src/views/DataManagementView.tsx +0 -159
- carrotquant_data-1.2.2/web/src/views/DataMatrixView.tsx +0 -162
- carrotquant_data-1.2.2/web/src/views/LogCenterView.tsx +0 -29
- carrotquant_data-1.2.2/web/src/views/SettingsView.tsx +0 -208
- carrotquant_data-1.2.2/web/src/views/StockDetailView.tsx +0 -130
- carrotquant_data-1.2.2/web/src/views/StockListView.tsx +0 -231
- carrotquant_data-1.2.2/web/tailwind.config.js +0 -27
- carrotquant_data-1.2.2/web/tsconfig.app.json +0 -29
- carrotquant_data-1.2.2/web/tsconfig.json +0 -7
- carrotquant_data-1.2.2/web/tsconfig.node.json +0 -23
- carrotquant_data-1.2.2/web/vite.config.ts +0 -28
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/config/__init__.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/__init__.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/base.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/data_cleaner.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/em_utils.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/provider/tdx_utils.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/__init__.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/sync_manager.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/sync_tracker.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/service/task_planner.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/static/assets/index-BDBCqr4Y.js +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/static/assets/index-Cpa46ehI.css +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/static/favicon.svg +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/static/icons.svg +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/static/index.html +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/__init__.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/base.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/csv_storage.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/data_merger.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/parquet_storage.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/storage/storage_factory.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/utils/__init__.py +0 -0
- {carrotquant_data-1.2.2/cqdata → carrotquant_data-1.3.0/cq/data}/utils/time_utils.py +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: carrotquant-data
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: 高性能、轻量级 A 股与指数金融数据增量同步与持久化流水线
|
|
5
5
|
Author-email: Carrot <11172391+CRThu@users.noreply.github.com>
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
7
8
|
Requires-Dist: baostock>=0.9.1
|
|
8
|
-
Requires-Dist:
|
|
9
|
+
Requires-Dist: curl_cffi>=0.7.4
|
|
9
10
|
Requires-Dist: fastapi>=0.135.1
|
|
10
11
|
Requires-Dist: loguru>=0.7.3
|
|
11
12
|
Requires-Dist: polars>=1.39.0
|
|
@@ -15,38 +16,39 @@ Requires-Dist: tdxpy>=0.2.7
|
|
|
15
16
|
Requires-Dist: tenacity>=9.1.4
|
|
16
17
|
Requires-Dist: typer>=0.24.1
|
|
17
18
|
Requires-Dist: uvicorn>=0.41.0
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
19
|
|
|
20
|
-
# CarrotQuant
|
|
20
|
+
# CarrotQuant Data (`carrotquant-data`)
|
|
21
21
|
|
|
22
|
-
](https://pypi.org/project/carrotquant-data/)
|
|
23
|
+
[](https://pypi.org/project/carrotquant-data/)
|
|
24
|
+
[](LICENSE)
|
|
24
25
|
|
|
25
|
-
CarrotQuant
|
|
26
|
+
**CarrotQuant Data** (`carrotquant-data`) 是专为量化交易与回测设计的本地金融数据同步与管理工具,支持多源拉取、增量同步与高效列式存储。
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## 🛠️ 特性 (Features)
|
|
28
29
|
|
|
29
|
-
- **多数据源支持**:内置 [Baostock](http://baostock.com/)、东方财富、[通达信 (tdxpy)](https://github.com/rainx/tdxPy)
|
|
30
|
-
- **灵活的存储格式**:原生支持 `csv`
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- **React Web
|
|
34
|
-
- **Python SDK
|
|
35
|
-
- **命令行工具 (CLI)**:统一的 `cqdata` 命令行工具,提供数据同步 (`cqdata sync`)、数据表探索 (`cqdata tables`)
|
|
36
|
-
- **REST API 服务**:基于 FastAPI 的
|
|
37
|
-
-
|
|
30
|
+
- **多数据源支持**:内置 [Baostock](http://baostock.com/)、东方财富、[通达信 (tdxpy)](https://github.com/rainx/tdxPy) 等金融数据源驱动,支持灵活扩展。
|
|
31
|
+
- **灵活的存储格式**:原生支持 `csv` 与列式存储 `parquet` 格式。
|
|
32
|
+
- **增量与全量同步**:基于时间戳水位线机制,支持断点续接(增量拉取)与全量覆盖更新。
|
|
33
|
+
- **多接入方式**:
|
|
34
|
+
- **React Web 终端**:基于 Bun + Vite + React 19 构建,集成 TradingView Lightweight Charts (3-Pane 图表)、多维搜索与数据管理面板。
|
|
35
|
+
- **Python SDK**:直观的 `import cq.data` API,支持高性能跨年份数据切片读取 (`cq.data.read`)、`columns` 按需投影与元数据探查。
|
|
36
|
+
- **命令行工具 (CLI)**:统一的 `cqdata` 命令行工具,提供数据同步 (`cqdata sync`)、数据表探索 (`cqdata tables`) 与服务启动 (`cqdata server`)。
|
|
37
|
+
- **REST API 服务**:基于 FastAPI 的 HTTP 服务,支持数据切片、任务调度与 SSE 实时日志流。
|
|
38
|
+
- **列式数据处理**:使用 [Polars](https://pola.rs/) 进行高效的数据清洗与结构转换。
|
|
38
39
|
|
|
39
40
|
## 📁 目录结构 (Project Structure)
|
|
40
41
|
|
|
41
42
|
```text
|
|
42
43
|
CarrotQuant.Data/
|
|
43
|
-
├──
|
|
44
|
-
│
|
|
45
|
-
│
|
|
46
|
-
│
|
|
47
|
-
│
|
|
48
|
-
│
|
|
49
|
-
│
|
|
44
|
+
├── cq/
|
|
45
|
+
│ └── data/ # 核心代码包 (import cq.data)
|
|
46
|
+
│ ├── entrypoints/ # 接入层 (python_api, cli, rest_api)
|
|
47
|
+
│ ├── config/ # 配置管理模块
|
|
48
|
+
│ ├── provider/ # 数据源驱动 (BaostockProvider, EastMoneyProvider, TDXProvider)
|
|
49
|
+
│ ├── service/ # 核心业务逻辑 (DataReader, MetadataReader, SyncManager 等)
|
|
50
|
+
│ ├── storage/ # 本地持久化存储 (CSVStorage, ParquetStorage)
|
|
51
|
+
│ └── utils/ # 通用工具箱
|
|
50
52
|
├── web/ # React Web 金融终端 (Bun + Vite 6 + React 19 + TradingView 3-Pane)
|
|
51
53
|
│ ├── src/ # 视图 View、组件 Component、Hooks 与转换服务
|
|
52
54
|
│ └── package.json
|
|
@@ -64,14 +66,14 @@ CarrotQuant.Data/
|
|
|
64
66
|
|
|
65
67
|
```mermaid
|
|
66
68
|
graph TB
|
|
67
|
-
subgraph Entrypoints["接入层 (
|
|
69
|
+
subgraph Entrypoints["接入层 (cq/data/entrypoints)"]
|
|
68
70
|
PYTHON_API["python_api.py<br/>(Python SDK)"]
|
|
69
71
|
CLI["cli.py<br/>(Typer CLI)"]
|
|
70
72
|
REST["rest_api.py<br/>(FastAPI REST)"]
|
|
71
73
|
WIZARD["wizard.py<br/>(交互向导)"]
|
|
72
74
|
end
|
|
73
75
|
|
|
74
|
-
subgraph Service["业务逻辑层 (
|
|
76
|
+
subgraph Service["业务逻辑层 (cq/data/service)"]
|
|
75
77
|
SM["SyncManager<br/>同步总调度"]
|
|
76
78
|
DR["DataReader<br/>切片与按列投影"]
|
|
77
79
|
MR["MetadataReader<br/>探查与过滤 API"]
|
|
@@ -79,14 +81,14 @@ graph TB
|
|
|
79
81
|
MM["MetadataManager<br/>元数据 IO"]
|
|
80
82
|
end
|
|
81
83
|
|
|
82
|
-
subgraph Provider["采集层 (
|
|
84
|
+
subgraph Provider["采集层 (cq/data/provider)"]
|
|
83
85
|
PM["ProviderManager"]
|
|
84
86
|
BP["BaostockProvider"]
|
|
85
87
|
EP["EastMoneyProvider"]
|
|
86
88
|
TDX_PROV["TDXProvider"]
|
|
87
89
|
end
|
|
88
90
|
|
|
89
|
-
subgraph Storage["存储层 (
|
|
91
|
+
subgraph Storage["存储层 (cq/data/storage)"]
|
|
90
92
|
SF["StorageFactory"]
|
|
91
93
|
CSV["CSVStorage"]
|
|
92
94
|
PQ["ParquetStorage"]
|
|
@@ -137,22 +139,31 @@ graph TB
|
|
|
137
139
|
|
|
138
140
|
## 🛠️ 安装指南 (Installation)
|
|
139
141
|
|
|
140
|
-
环境要求:**Python >= 3.12
|
|
142
|
+
环境要求:**Python >= 3.12**(支持 Python 3.12 / 3.13 / 3.14+)。
|
|
143
|
+
|
|
144
|
+
### 1. 通过 PyPI 安装 (推荐)
|
|
145
|
+
```bash
|
|
146
|
+
# 推荐使用 pip 直接安装
|
|
147
|
+
pip install carrotquant-data
|
|
148
|
+
|
|
149
|
+
# 或使用 uv 安装
|
|
150
|
+
uv add carrotquant-data
|
|
151
|
+
```
|
|
141
152
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
### 2. 源码克隆与本地开发安装
|
|
154
|
+
```bash
|
|
155
|
+
git clone https://github.com/CRThu/carrotquant-data.git
|
|
156
|
+
cd carrotquant-data
|
|
146
157
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
158
|
+
# 可编辑模式挂载命令行 cqdata
|
|
159
|
+
uv pip install -e .
|
|
160
|
+
```
|
|
150
161
|
|
|
151
162
|
## ⚙️ 配置说明 (Configuration)
|
|
152
163
|
|
|
153
164
|
CarrotQuant.Data 秉承 **“显式胜于隐式 (Explicit is better than implicit)”** 的配置契约,支持以下显式加载与覆盖方式(优先级从高到低):
|
|
154
165
|
|
|
155
|
-
1. **代码程序化修改**:直接设置单例属性 `
|
|
166
|
+
1. **代码程序化修改**:直接设置单例属性 `cq.data.settings.data_dir = "/path/to/data"` 或调用 `cq.data.configure("/path/to/config.yaml")`(最高优先级)。
|
|
156
167
|
2. **环境变量 `CQDATA_DATA_DIR`**:如 `export CQDATA_DATA_DIR="/my/data/path"`(适合 Docker / CLI / 自动化部署)。
|
|
157
168
|
3. **环境变量 `CQDATA_CONFIG_PATH`**:指定自定义 YAML 配置文件路径,如 `export CQDATA_CONFIG_PATH="/path/to/config.yaml"`。
|
|
158
169
|
4. **内置默认配置**:默认存储路径 `data_dir = "data"`,默认日志 `log_dir = "logs"`, `log_level = "INFO"`。
|
|
@@ -175,30 +186,30 @@ defaults:
|
|
|
175
186
|
|
|
176
187
|
## 🚀 快速开始 (Quick Start)
|
|
177
188
|
|
|
178
|
-
### 方式一:使用 Python SDK (`import
|
|
189
|
+
### 方式一:使用 Python SDK (`import cq.data`) - 推荐
|
|
179
190
|
|
|
180
191
|
在量化研究与 Python 策略脚本中直接读取本地清洗好的数据:
|
|
181
192
|
|
|
182
193
|
```python
|
|
183
|
-
import
|
|
194
|
+
import cq.data
|
|
184
195
|
|
|
185
196
|
# 0. (可选) 从 YAML 配置文件加载全局配置
|
|
186
|
-
|
|
197
|
+
cq.data.configure("./config.yaml")
|
|
187
198
|
|
|
188
199
|
# 或者直接修改属性
|
|
189
|
-
|
|
200
|
+
cq.data.settings.data_dir = "./custom_data"
|
|
190
201
|
|
|
191
202
|
# 1. OOP 便捷读取 (界面极简,干净清爽)
|
|
192
|
-
df_kline =
|
|
203
|
+
df_kline = cq.data.ashare.kline.get(symbols="sh.600000", start_date="2024-01-01")
|
|
193
204
|
|
|
194
205
|
# 2. 查阅代码清单、时间跨度、Schema 映射与物理总行数
|
|
195
|
-
symbols =
|
|
196
|
-
start_dt, end_dt =
|
|
197
|
-
schema =
|
|
198
|
-
total_rows =
|
|
206
|
+
symbols = cq.data.list_symbols("ashare.kline.1d.raw.baostock")
|
|
207
|
+
start_dt, end_dt = cq.data.get_time_range("ashare.kline.1d.raw.baostock")
|
|
208
|
+
schema = cq.data.get_schema("ashare.kline.1d.raw.baostock") # {'timestamp': 'Int64', ...}
|
|
209
|
+
total_rows = cq.data.get_row_count("ashare.kline.1d.raw.baostock") # 13570685
|
|
199
210
|
|
|
200
211
|
# 3. 统一切片读取 K 线时序数据 (支持 columns 按需挑选列,极节省内存)
|
|
201
|
-
df =
|
|
212
|
+
df = cq.data.read(
|
|
202
213
|
table_id="ashare.kline.1d.raw.baostock",
|
|
203
214
|
symbols=["sh.600000", "sz.000001"],
|
|
204
215
|
start_date="2024-01-01",
|
|
@@ -208,13 +219,13 @@ df = cqdata.read(
|
|
|
208
219
|
print(df)
|
|
209
220
|
|
|
210
221
|
# 4. 统一切片读取板块/龙虎榜事件数据
|
|
211
|
-
events_df =
|
|
222
|
+
events_df = cq.data.read(
|
|
212
223
|
table_id="ashare.concept.eastmoney",
|
|
213
224
|
symbols=["sh.600000"]
|
|
214
225
|
)
|
|
215
226
|
|
|
216
227
|
# 5. 代码中触发全自动数据同步
|
|
217
|
-
|
|
228
|
+
cq.data.sync(table_ids=["ashare.kline.1d.raw.baostock"], formats=["parquet"])
|
|
218
229
|
```
|
|
219
230
|
|
|
220
231
|
### 方式二:使用统一 CLI 命令行工具 (`cqdata`)
|
|
@@ -285,15 +296,21 @@ cqdata server --port 8888 --open
|
|
|
285
296
|
| `/` | GET | 内置托管的 React Web 金融终端主界面 |
|
|
286
297
|
| `/api/v1/health` | GET | 系统健康检查与服务运行状态探针 |
|
|
287
298
|
| `/api/v1/tables` | GET | 列出本地所有数据表总览 (平铺列表,含 `category` 属性) |
|
|
299
|
+
| `/api/v1/tables/detailed` | GET | 获取所有数据表及其各存储格式 (Parquet / CSV) 独立物理元数据 |
|
|
288
300
|
| `/api/v1/tables/{table_id}/formats` | GET | 获取指定表已存储的物理格式列表 (`['parquet', 'csv']`) |
|
|
289
301
|
| `/api/v1/tables/{table_id}/symbols` | GET | 获取指定表已下载的股票/证券代码列表 |
|
|
290
302
|
| `/api/v1/tables/{table_id}/time_range` | GET | 获取指定表的时间跨度 tuple `(start_datetime, end_datetime)` |
|
|
291
303
|
| `/api/v1/tables/{table_id}/schema` | GET | 获取指定表的字段列名与类型字典 |
|
|
292
304
|
| `/api/v1/tables/{table_id}/row_count` | GET | 获取指定表的记录总条数/行数 |
|
|
293
|
-
| `/api/v1/
|
|
305
|
+
| `/api/v1/tables/{table_id}/boards` | GET | 聚合板块概念/行业列表及各板块成分股计数,支持关键词搜索 |
|
|
306
|
+
| `/api/v1/query` | GET | 统一切片查询接口(支持 `symbols`, `board_code`, `start_date`, `end_date`, `columns`, `page`, `page_size`),按 `table_id` 自动智能路由 |
|
|
294
307
|
| `/api/v1/sync` | POST | 异步触发后台数据同步任务 |
|
|
295
|
-
| `/api/v1/tasks` | GET |
|
|
296
|
-
| `/api/v1/
|
|
308
|
+
| `/api/v1/tasks` | GET | 查询当前正在运行的同步任务列表 |
|
|
309
|
+
| `/api/v1/sync/status` | GET | 获取所有同步任务的详细进度状态(含百分比、当前代码与错误信息) |
|
|
310
|
+
| `/api/v1/logs/stream` | GET | SSE (Server-Sent Events) 实时系统与数据同步日志流 |
|
|
311
|
+
| `/api/v1/tdx/check` | GET | 检查通达信本地 `vipdoc` 目录有效性与代码统计 |
|
|
312
|
+
| `/api/v1/tdx/download` | POST | 后台从通达信官方服务器下载全量 `hsjday.zip` 日线包并自动解压 |
|
|
313
|
+
| `/api/v1/filesystem/list` | GET | 本地文件与目录探查接口 (供 Web 文件选择器使用) |
|
|
297
314
|
|
|
298
315
|
### 方式五:前端 UI 开发与热重载调试 (`web/`)
|
|
299
316
|
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
# CarrotQuant
|
|
1
|
+
# CarrotQuant Data (`carrotquant-data`)
|
|
2
2
|
|
|
3
|
-
](https://pypi.org/project/carrotquant-data/)
|
|
4
|
+
[](https://pypi.org/project/carrotquant-data/)
|
|
5
|
+
[](LICENSE)
|
|
5
6
|
|
|
6
|
-
CarrotQuant
|
|
7
|
+
**CarrotQuant Data** (`carrotquant-data`) 是专为量化交易与回测设计的本地金融数据同步与管理工具,支持多源拉取、增量同步与高效列式存储。
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## 🛠️ 特性 (Features)
|
|
9
10
|
|
|
10
|
-
- **多数据源支持**:内置 [Baostock](http://baostock.com/)、东方财富、[通达信 (tdxpy)](https://github.com/rainx/tdxPy)
|
|
11
|
-
- **灵活的存储格式**:原生支持 `csv`
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- **React Web
|
|
15
|
-
- **Python SDK
|
|
16
|
-
- **命令行工具 (CLI)**:统一的 `cqdata` 命令行工具,提供数据同步 (`cqdata sync`)、数据表探索 (`cqdata tables`)
|
|
17
|
-
- **REST API 服务**:基于 FastAPI 的
|
|
18
|
-
-
|
|
11
|
+
- **多数据源支持**:内置 [Baostock](http://baostock.com/)、东方财富、[通达信 (tdxpy)](https://github.com/rainx/tdxPy) 等金融数据源驱动,支持灵活扩展。
|
|
12
|
+
- **灵活的存储格式**:原生支持 `csv` 与列式存储 `parquet` 格式。
|
|
13
|
+
- **增量与全量同步**:基于时间戳水位线机制,支持断点续接(增量拉取)与全量覆盖更新。
|
|
14
|
+
- **多接入方式**:
|
|
15
|
+
- **React Web 终端**:基于 Bun + Vite + React 19 构建,集成 TradingView Lightweight Charts (3-Pane 图表)、多维搜索与数据管理面板。
|
|
16
|
+
- **Python SDK**:直观的 `import cq.data` API,支持高性能跨年份数据切片读取 (`cq.data.read`)、`columns` 按需投影与元数据探查。
|
|
17
|
+
- **命令行工具 (CLI)**:统一的 `cqdata` 命令行工具,提供数据同步 (`cqdata sync`)、数据表探索 (`cqdata tables`) 与服务启动 (`cqdata server`)。
|
|
18
|
+
- **REST API 服务**:基于 FastAPI 的 HTTP 服务,支持数据切片、任务调度与 SSE 实时日志流。
|
|
19
|
+
- **列式数据处理**:使用 [Polars](https://pola.rs/) 进行高效的数据清洗与结构转换。
|
|
19
20
|
|
|
20
21
|
## 📁 目录结构 (Project Structure)
|
|
21
22
|
|
|
22
23
|
```text
|
|
23
24
|
CarrotQuant.Data/
|
|
24
|
-
├──
|
|
25
|
-
│
|
|
26
|
-
│
|
|
27
|
-
│
|
|
28
|
-
│
|
|
29
|
-
│
|
|
30
|
-
│
|
|
25
|
+
├── cq/
|
|
26
|
+
│ └── data/ # 核心代码包 (import cq.data)
|
|
27
|
+
│ ├── entrypoints/ # 接入层 (python_api, cli, rest_api)
|
|
28
|
+
│ ├── config/ # 配置管理模块
|
|
29
|
+
│ ├── provider/ # 数据源驱动 (BaostockProvider, EastMoneyProvider, TDXProvider)
|
|
30
|
+
│ ├── service/ # 核心业务逻辑 (DataReader, MetadataReader, SyncManager 等)
|
|
31
|
+
│ ├── storage/ # 本地持久化存储 (CSVStorage, ParquetStorage)
|
|
32
|
+
│ └── utils/ # 通用工具箱
|
|
31
33
|
├── web/ # React Web 金融终端 (Bun + Vite 6 + React 19 + TradingView 3-Pane)
|
|
32
34
|
│ ├── src/ # 视图 View、组件 Component、Hooks 与转换服务
|
|
33
35
|
│ └── package.json
|
|
@@ -45,14 +47,14 @@ CarrotQuant.Data/
|
|
|
45
47
|
|
|
46
48
|
```mermaid
|
|
47
49
|
graph TB
|
|
48
|
-
subgraph Entrypoints["接入层 (
|
|
50
|
+
subgraph Entrypoints["接入层 (cq/data/entrypoints)"]
|
|
49
51
|
PYTHON_API["python_api.py<br/>(Python SDK)"]
|
|
50
52
|
CLI["cli.py<br/>(Typer CLI)"]
|
|
51
53
|
REST["rest_api.py<br/>(FastAPI REST)"]
|
|
52
54
|
WIZARD["wizard.py<br/>(交互向导)"]
|
|
53
55
|
end
|
|
54
56
|
|
|
55
|
-
subgraph Service["业务逻辑层 (
|
|
57
|
+
subgraph Service["业务逻辑层 (cq/data/service)"]
|
|
56
58
|
SM["SyncManager<br/>同步总调度"]
|
|
57
59
|
DR["DataReader<br/>切片与按列投影"]
|
|
58
60
|
MR["MetadataReader<br/>探查与过滤 API"]
|
|
@@ -60,14 +62,14 @@ graph TB
|
|
|
60
62
|
MM["MetadataManager<br/>元数据 IO"]
|
|
61
63
|
end
|
|
62
64
|
|
|
63
|
-
subgraph Provider["采集层 (
|
|
65
|
+
subgraph Provider["采集层 (cq/data/provider)"]
|
|
64
66
|
PM["ProviderManager"]
|
|
65
67
|
BP["BaostockProvider"]
|
|
66
68
|
EP["EastMoneyProvider"]
|
|
67
69
|
TDX_PROV["TDXProvider"]
|
|
68
70
|
end
|
|
69
71
|
|
|
70
|
-
subgraph Storage["存储层 (
|
|
72
|
+
subgraph Storage["存储层 (cq/data/storage)"]
|
|
71
73
|
SF["StorageFactory"]
|
|
72
74
|
CSV["CSVStorage"]
|
|
73
75
|
PQ["ParquetStorage"]
|
|
@@ -118,22 +120,31 @@ graph TB
|
|
|
118
120
|
|
|
119
121
|
## 🛠️ 安装指南 (Installation)
|
|
120
122
|
|
|
121
|
-
环境要求:**Python >= 3.12
|
|
123
|
+
环境要求:**Python >= 3.12**(支持 Python 3.12 / 3.13 / 3.14+)。
|
|
122
124
|
|
|
123
|
-
1.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
### 1. 通过 PyPI 安装 (推荐)
|
|
126
|
+
```bash
|
|
127
|
+
# 推荐使用 pip 直接安装
|
|
128
|
+
pip install carrotquant-data
|
|
129
|
+
|
|
130
|
+
# 或使用 uv 安装
|
|
131
|
+
uv add carrotquant-data
|
|
132
|
+
```
|
|
127
133
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
### 2. 源码克隆与本地开发安装
|
|
135
|
+
```bash
|
|
136
|
+
git clone https://github.com/CRThu/carrotquant-data.git
|
|
137
|
+
cd carrotquant-data
|
|
138
|
+
|
|
139
|
+
# 可编辑模式挂载命令行 cqdata
|
|
140
|
+
uv pip install -e .
|
|
141
|
+
```
|
|
131
142
|
|
|
132
143
|
## ⚙️ 配置说明 (Configuration)
|
|
133
144
|
|
|
134
145
|
CarrotQuant.Data 秉承 **“显式胜于隐式 (Explicit is better than implicit)”** 的配置契约,支持以下显式加载与覆盖方式(优先级从高到低):
|
|
135
146
|
|
|
136
|
-
1. **代码程序化修改**:直接设置单例属性 `
|
|
147
|
+
1. **代码程序化修改**:直接设置单例属性 `cq.data.settings.data_dir = "/path/to/data"` 或调用 `cq.data.configure("/path/to/config.yaml")`(最高优先级)。
|
|
137
148
|
2. **环境变量 `CQDATA_DATA_DIR`**:如 `export CQDATA_DATA_DIR="/my/data/path"`(适合 Docker / CLI / 自动化部署)。
|
|
138
149
|
3. **环境变量 `CQDATA_CONFIG_PATH`**:指定自定义 YAML 配置文件路径,如 `export CQDATA_CONFIG_PATH="/path/to/config.yaml"`。
|
|
139
150
|
4. **内置默认配置**:默认存储路径 `data_dir = "data"`,默认日志 `log_dir = "logs"`, `log_level = "INFO"`。
|
|
@@ -156,30 +167,30 @@ defaults:
|
|
|
156
167
|
|
|
157
168
|
## 🚀 快速开始 (Quick Start)
|
|
158
169
|
|
|
159
|
-
### 方式一:使用 Python SDK (`import
|
|
170
|
+
### 方式一:使用 Python SDK (`import cq.data`) - 推荐
|
|
160
171
|
|
|
161
172
|
在量化研究与 Python 策略脚本中直接读取本地清洗好的数据:
|
|
162
173
|
|
|
163
174
|
```python
|
|
164
|
-
import
|
|
175
|
+
import cq.data
|
|
165
176
|
|
|
166
177
|
# 0. (可选) 从 YAML 配置文件加载全局配置
|
|
167
|
-
|
|
178
|
+
cq.data.configure("./config.yaml")
|
|
168
179
|
|
|
169
180
|
# 或者直接修改属性
|
|
170
|
-
|
|
181
|
+
cq.data.settings.data_dir = "./custom_data"
|
|
171
182
|
|
|
172
183
|
# 1. OOP 便捷读取 (界面极简,干净清爽)
|
|
173
|
-
df_kline =
|
|
184
|
+
df_kline = cq.data.ashare.kline.get(symbols="sh.600000", start_date="2024-01-01")
|
|
174
185
|
|
|
175
186
|
# 2. 查阅代码清单、时间跨度、Schema 映射与物理总行数
|
|
176
|
-
symbols =
|
|
177
|
-
start_dt, end_dt =
|
|
178
|
-
schema =
|
|
179
|
-
total_rows =
|
|
187
|
+
symbols = cq.data.list_symbols("ashare.kline.1d.raw.baostock")
|
|
188
|
+
start_dt, end_dt = cq.data.get_time_range("ashare.kline.1d.raw.baostock")
|
|
189
|
+
schema = cq.data.get_schema("ashare.kline.1d.raw.baostock") # {'timestamp': 'Int64', ...}
|
|
190
|
+
total_rows = cq.data.get_row_count("ashare.kline.1d.raw.baostock") # 13570685
|
|
180
191
|
|
|
181
192
|
# 3. 统一切片读取 K 线时序数据 (支持 columns 按需挑选列,极节省内存)
|
|
182
|
-
df =
|
|
193
|
+
df = cq.data.read(
|
|
183
194
|
table_id="ashare.kline.1d.raw.baostock",
|
|
184
195
|
symbols=["sh.600000", "sz.000001"],
|
|
185
196
|
start_date="2024-01-01",
|
|
@@ -189,13 +200,13 @@ df = cqdata.read(
|
|
|
189
200
|
print(df)
|
|
190
201
|
|
|
191
202
|
# 4. 统一切片读取板块/龙虎榜事件数据
|
|
192
|
-
events_df =
|
|
203
|
+
events_df = cq.data.read(
|
|
193
204
|
table_id="ashare.concept.eastmoney",
|
|
194
205
|
symbols=["sh.600000"]
|
|
195
206
|
)
|
|
196
207
|
|
|
197
208
|
# 5. 代码中触发全自动数据同步
|
|
198
|
-
|
|
209
|
+
cq.data.sync(table_ids=["ashare.kline.1d.raw.baostock"], formats=["parquet"])
|
|
199
210
|
```
|
|
200
211
|
|
|
201
212
|
### 方式二:使用统一 CLI 命令行工具 (`cqdata`)
|
|
@@ -266,15 +277,21 @@ cqdata server --port 8888 --open
|
|
|
266
277
|
| `/` | GET | 内置托管的 React Web 金融终端主界面 |
|
|
267
278
|
| `/api/v1/health` | GET | 系统健康检查与服务运行状态探针 |
|
|
268
279
|
| `/api/v1/tables` | GET | 列出本地所有数据表总览 (平铺列表,含 `category` 属性) |
|
|
280
|
+
| `/api/v1/tables/detailed` | GET | 获取所有数据表及其各存储格式 (Parquet / CSV) 独立物理元数据 |
|
|
269
281
|
| `/api/v1/tables/{table_id}/formats` | GET | 获取指定表已存储的物理格式列表 (`['parquet', 'csv']`) |
|
|
270
282
|
| `/api/v1/tables/{table_id}/symbols` | GET | 获取指定表已下载的股票/证券代码列表 |
|
|
271
283
|
| `/api/v1/tables/{table_id}/time_range` | GET | 获取指定表的时间跨度 tuple `(start_datetime, end_datetime)` |
|
|
272
284
|
| `/api/v1/tables/{table_id}/schema` | GET | 获取指定表的字段列名与类型字典 |
|
|
273
285
|
| `/api/v1/tables/{table_id}/row_count` | GET | 获取指定表的记录总条数/行数 |
|
|
274
|
-
| `/api/v1/
|
|
286
|
+
| `/api/v1/tables/{table_id}/boards` | GET | 聚合板块概念/行业列表及各板块成分股计数,支持关键词搜索 |
|
|
287
|
+
| `/api/v1/query` | GET | 统一切片查询接口(支持 `symbols`, `board_code`, `start_date`, `end_date`, `columns`, `page`, `page_size`),按 `table_id` 自动智能路由 |
|
|
275
288
|
| `/api/v1/sync` | POST | 异步触发后台数据同步任务 |
|
|
276
|
-
| `/api/v1/tasks` | GET |
|
|
277
|
-
| `/api/v1/
|
|
289
|
+
| `/api/v1/tasks` | GET | 查询当前正在运行的同步任务列表 |
|
|
290
|
+
| `/api/v1/sync/status` | GET | 获取所有同步任务的详细进度状态(含百分比、当前代码与错误信息) |
|
|
291
|
+
| `/api/v1/logs/stream` | GET | SSE (Server-Sent Events) 实时系统与数据同步日志流 |
|
|
292
|
+
| `/api/v1/tdx/check` | GET | 检查通达信本地 `vipdoc` 目录有效性与代码统计 |
|
|
293
|
+
| `/api/v1/tdx/download` | POST | 后台从通达信官方服务器下载全量 `hsjday.zip` 日线包并自动解压 |
|
|
294
|
+
| `/api/v1/filesystem/list` | GET | 本地文件与目录探查接口 (供 Web 文件选择器使用) |
|
|
278
295
|
|
|
279
296
|
### 方式五:前端 UI 开发与热重载调试 (`web/`)
|
|
280
297
|
|