carrotquant-data 1.2.2__tar.gz → 1.2.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.
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/AGENTS.md +6 -6
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/PKG-INFO +42 -26
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/README.md +41 -25
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/__init__.py +1 -1
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/pyproject.toml +2 -2
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/uv.lock +1 -1
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.github/workflows/tests.yml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.github/workflows/workflow.yml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.gitignore +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/.gitignore +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/CarrotQuant.Data.iml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/misc.xml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/modules.xml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/vcs.xml +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/config/config.yaml.sample +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/config/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/config/settings.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/accessors/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/accessors/aindex.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/accessors/ashare.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/accessors/base.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/cli.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/python_api.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/entrypoints/rest_api.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/baostock_provider.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/base.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/data_cleaner.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/eastmoney_provider.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/em_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/provider_manager.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/tdx_provider.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/provider/tdx_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/data_reader.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/metadata_manager.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/metadata_reader.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/sync_manager.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/sync_tracker.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/service/task_planner.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/static/assets/index-BDBCqr4Y.js +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/static/assets/index-Cpa46ehI.css +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/static/favicon.svg +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/static/icons.svg +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/static/index.html +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/base.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/csv_storage.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/data_merger.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/parquet_storage.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/storage/storage_factory.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/utils/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/utils/logger_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/cqdata/utils/time_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/a_stock.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/concept_board_em.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/dragon_tiger_em.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/em_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/industry_board_em.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/em/institutional_trade_daily_em.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/compare_with_baostock.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/explore_tdx.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/mootdx_online_demo.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/test_max_offset.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/test_tdx_online.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/demo/tdx/test_tdx_provider.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/dev.bat +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/docs/python_sdk_guide.md +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/docs/rest_api_guide.md +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/docs/web_terminal_guide.md +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/01_quickstart.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/02_sync_data.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/03_read_series.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/04_read_events.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/05_export_pandas.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/05_read_concept_boards.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/06_metadata_inspection.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/examples/README.md +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/scripts/download_tdx.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/scripts/download_test_data.ps1 +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/scripts/wizard.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/conftest.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_cqdata_cli.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_cqdata_sdk.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_integration_fs_list.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_integration_tdx_sync.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_provider_baostock.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_provider_eastmoney.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_rest_api_integration.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_sync_defense.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_sync_full_flow.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_sync_multi_storage.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/__init__.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_accessors.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_config_settings.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_data_reader.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_entrypoint_python_api.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_entrypoint_rest_api.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_examples.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_logger_utils.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_metadata_manager.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_metadata_reader.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_provider_baostock.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_provider_eastmoney.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_provider_tdx.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_rest_api_boards.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_rest_api_sync.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_script_wizard.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_service_batch_sync.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_service_planner.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_concurrency.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_csv.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_factory.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_flat.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_merger.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_storage_parquet.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_sync_and_metadata.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_sync_tracker.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_update_metadata.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/unit/test_utils_time.py +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/.gitignore +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/.oxlintrc.json +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/README.md +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/bun.lock +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/e2e/terminal.spec.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/index.html +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/package.json +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/postcss.config.js +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/public/favicon.svg +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/public/icons.svg +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/App.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/ConceptData.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/DataTable.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/SearchInput.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/apiClient.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/chartEngine.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/chartPerformance.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/indicators.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/marketDataHook.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/performance.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/pinyin.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/stockDictionary.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/transformers.test.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/viewsRender.test.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/DataTable.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/ErrorBoundary.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/FileExplorerModal.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/FloatingSyncWidget.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/HeaderBar.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/LogTerminal.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/SearchInput.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/SidebarNav.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/SyncModal.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/TableManagementGrid.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/TradingViewKLineChart.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/hooks/useConceptData.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/hooks/useMarketData.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/hooks/useTables.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/index.css +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/main.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/apiClient.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/chartEngine.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/indicators.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/pinyin.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/stockDictionary.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/services/transformers.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/types/api.ts +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/ConceptIndustryView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/DataManagementView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/DataMatrixView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/LogCenterView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/SettingsView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/StockDetailView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/views/StockListView.tsx +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/tailwind.config.js +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/tsconfig.app.json +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/tsconfig.json +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/tsconfig.node.json +0 -0
- {carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/vite.config.ts +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# AGENTS.md - CarrotQuant
|
|
1
|
+
# AGENTS.md - CarrotQuant Data (`carrotquant-data`) 代码指南
|
|
2
2
|
|
|
3
|
-
本文档为 AI Agent 提供对 CarrotQuant
|
|
3
|
+
本文档为 AI Agent 提供对 CarrotQuant Data (`carrotquant-data`) 项目的完整理解,包含架构、模块职责、数据流、物理存储布局与开发约束。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 1. 项目概述
|
|
8
8
|
|
|
9
|
-
CarrotQuant
|
|
9
|
+
`CarrotQuant Data` (`carrotquant-data`) 是本地金融数据同步与持久化管理工具,支持从公开数据源(Baostock、东方财富、通达信)获取 A 股与指数数据,经清洗后持久化为本地 CSV/Parquet 文件。
|
|
10
10
|
|
|
11
11
|
**核心能力**:
|
|
12
12
|
- 支持 Baostock(日线/5分线/复权因子)、东方财富(概念/行业板块/龙虎榜/机构交易)、通达信(日线/5分/1分线)
|
|
13
13
|
- 支持 CSV 和 Parquet 两种存储格式
|
|
14
14
|
- 基于时间戳水位线的增量同步与断点续接
|
|
15
|
-
-
|
|
15
|
+
- 四种接入方式:Python SDK (`cqdata.read()` / 链式访问器)、Typer CLI (`cqdata`)、FastAPI REST API 与 React Web 终端 (`web/`)
|
|
16
16
|
|
|
17
17
|
**技术栈**:
|
|
18
|
-
- **后端**:Python >= 3.12, Polars
|
|
19
|
-
- **前端**:Bun, React 19, Vite
|
|
18
|
+
- **后端**:Python >= 3.12, Polars, Baostock, curl_cffi, tdxpy, FastAPI, Typer, Loguru, PyYAML
|
|
19
|
+
- **前端**:Bun, React 19, Vite, TypeScript, Tailwind CSS, TradingView Lightweight Charts
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: carrotquant-data
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: 高性能、轻量级 A 股与指数金融数据增量同步与持久化流水线
|
|
5
5
|
Author-email: Carrot <11172391+CRThu@users.noreply.github.com>
|
|
6
6
|
Requires-Python: >=3.12
|
|
@@ -17,24 +17,25 @@ Requires-Dist: typer>=0.24.1
|
|
|
17
17
|
Requires-Dist: uvicorn>=0.41.0
|
|
18
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 cqdata` API,支持高性能跨年份数据切片读取 (`cqdata.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
|
|
|
@@ -137,16 +138,25 @@ graph TB
|
|
|
137
138
|
|
|
138
139
|
## 🛠️ 安装指南 (Installation)
|
|
139
140
|
|
|
140
|
-
环境要求:**Python >= 3.12
|
|
141
|
+
环境要求:**Python >= 3.12**(支持 Python 3.12 / 3.13 / 3.14+)。
|
|
141
142
|
|
|
142
|
-
1.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
### 1. 通过 PyPI 安装 (推荐)
|
|
144
|
+
```bash
|
|
145
|
+
# 推荐使用 pip 直接安装
|
|
146
|
+
pip install carrotquant-data
|
|
147
|
+
|
|
148
|
+
# 或使用 uv 安装
|
|
149
|
+
uv add carrotquant-data
|
|
150
|
+
```
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
### 2. 源码克隆与本地开发安装
|
|
153
|
+
```bash
|
|
154
|
+
git clone https://github.com/CRThu/carrotquant-data.git
|
|
155
|
+
cd carrotquant-data
|
|
156
|
+
|
|
157
|
+
# 可编辑模式挂载命令行 cqdata
|
|
158
|
+
uv pip install -e .
|
|
159
|
+
```
|
|
150
160
|
|
|
151
161
|
## ⚙️ 配置说明 (Configuration)
|
|
152
162
|
|
|
@@ -285,15 +295,21 @@ cqdata server --port 8888 --open
|
|
|
285
295
|
| `/` | GET | 内置托管的 React Web 金融终端主界面 |
|
|
286
296
|
| `/api/v1/health` | GET | 系统健康检查与服务运行状态探针 |
|
|
287
297
|
| `/api/v1/tables` | GET | 列出本地所有数据表总览 (平铺列表,含 `category` 属性) |
|
|
298
|
+
| `/api/v1/tables/detailed` | GET | 获取所有数据表及其各存储格式 (Parquet / CSV) 独立物理元数据 |
|
|
288
299
|
| `/api/v1/tables/{table_id}/formats` | GET | 获取指定表已存储的物理格式列表 (`['parquet', 'csv']`) |
|
|
289
300
|
| `/api/v1/tables/{table_id}/symbols` | GET | 获取指定表已下载的股票/证券代码列表 |
|
|
290
301
|
| `/api/v1/tables/{table_id}/time_range` | GET | 获取指定表的时间跨度 tuple `(start_datetime, end_datetime)` |
|
|
291
302
|
| `/api/v1/tables/{table_id}/schema` | GET | 获取指定表的字段列名与类型字典 |
|
|
292
303
|
| `/api/v1/tables/{table_id}/row_count` | GET | 获取指定表的记录总条数/行数 |
|
|
293
|
-
| `/api/v1/
|
|
304
|
+
| `/api/v1/tables/{table_id}/boards` | GET | 聚合板块概念/行业列表及各板块成分股计数,支持关键词搜索 |
|
|
305
|
+
| `/api/v1/query` | GET | 统一切片查询接口(支持 `symbols`, `board_code`, `start_date`, `end_date`, `columns`, `page`, `page_size`),按 `table_id` 自动智能路由 |
|
|
294
306
|
| `/api/v1/sync` | POST | 异步触发后台数据同步任务 |
|
|
295
|
-
| `/api/v1/tasks` | GET |
|
|
296
|
-
| `/api/v1/
|
|
307
|
+
| `/api/v1/tasks` | GET | 查询当前正在运行的同步任务列表 |
|
|
308
|
+
| `/api/v1/sync/status` | GET | 获取所有同步任务的详细进度状态(含百分比、当前代码与错误信息) |
|
|
309
|
+
| `/api/v1/logs/stream` | GET | SSE (Server-Sent Events) 实时系统与数据同步日志流 |
|
|
310
|
+
| `/api/v1/tdx/check` | GET | 检查通达信本地 `vipdoc` 目录有效性与代码统计 |
|
|
311
|
+
| `/api/v1/tdx/download` | POST | 后台从通达信官方服务器下载全量 `hsjday.zip` 日线包并自动解压 |
|
|
312
|
+
| `/api/v1/filesystem/list` | GET | 本地文件与目录探查接口 (供 Web 文件选择器使用) |
|
|
297
313
|
|
|
298
314
|
### 方式五:前端 UI 开发与热重载调试 (`web/`)
|
|
299
315
|
|
|
@@ -1,21 +1,22 @@
|
|
|
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 cqdata` API,支持高性能跨年份数据切片读取 (`cqdata.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
|
|
|
@@ -118,16 +119,25 @@ graph TB
|
|
|
118
119
|
|
|
119
120
|
## 🛠️ 安装指南 (Installation)
|
|
120
121
|
|
|
121
|
-
环境要求:**Python >= 3.12
|
|
122
|
+
环境要求:**Python >= 3.12**(支持 Python 3.12 / 3.13 / 3.14+)。
|
|
122
123
|
|
|
123
|
-
1.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
### 1. 通过 PyPI 安装 (推荐)
|
|
125
|
+
```bash
|
|
126
|
+
# 推荐使用 pip 直接安装
|
|
127
|
+
pip install carrotquant-data
|
|
128
|
+
|
|
129
|
+
# 或使用 uv 安装
|
|
130
|
+
uv add carrotquant-data
|
|
131
|
+
```
|
|
127
132
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
### 2. 源码克隆与本地开发安装
|
|
134
|
+
```bash
|
|
135
|
+
git clone https://github.com/CRThu/carrotquant-data.git
|
|
136
|
+
cd carrotquant-data
|
|
137
|
+
|
|
138
|
+
# 可编辑模式挂载命令行 cqdata
|
|
139
|
+
uv pip install -e .
|
|
140
|
+
```
|
|
131
141
|
|
|
132
142
|
## ⚙️ 配置说明 (Configuration)
|
|
133
143
|
|
|
@@ -266,15 +276,21 @@ cqdata server --port 8888 --open
|
|
|
266
276
|
| `/` | GET | 内置托管的 React Web 金融终端主界面 |
|
|
267
277
|
| `/api/v1/health` | GET | 系统健康检查与服务运行状态探针 |
|
|
268
278
|
| `/api/v1/tables` | GET | 列出本地所有数据表总览 (平铺列表,含 `category` 属性) |
|
|
279
|
+
| `/api/v1/tables/detailed` | GET | 获取所有数据表及其各存储格式 (Parquet / CSV) 独立物理元数据 |
|
|
269
280
|
| `/api/v1/tables/{table_id}/formats` | GET | 获取指定表已存储的物理格式列表 (`['parquet', 'csv']`) |
|
|
270
281
|
| `/api/v1/tables/{table_id}/symbols` | GET | 获取指定表已下载的股票/证券代码列表 |
|
|
271
282
|
| `/api/v1/tables/{table_id}/time_range` | GET | 获取指定表的时间跨度 tuple `(start_datetime, end_datetime)` |
|
|
272
283
|
| `/api/v1/tables/{table_id}/schema` | GET | 获取指定表的字段列名与类型字典 |
|
|
273
284
|
| `/api/v1/tables/{table_id}/row_count` | GET | 获取指定表的记录总条数/行数 |
|
|
274
|
-
| `/api/v1/
|
|
285
|
+
| `/api/v1/tables/{table_id}/boards` | GET | 聚合板块概念/行业列表及各板块成分股计数,支持关键词搜索 |
|
|
286
|
+
| `/api/v1/query` | GET | 统一切片查询接口(支持 `symbols`, `board_code`, `start_date`, `end_date`, `columns`, `page`, `page_size`),按 `table_id` 自动智能路由 |
|
|
275
287
|
| `/api/v1/sync` | POST | 异步触发后台数据同步任务 |
|
|
276
|
-
| `/api/v1/tasks` | GET |
|
|
277
|
-
| `/api/v1/
|
|
288
|
+
| `/api/v1/tasks` | GET | 查询当前正在运行的同步任务列表 |
|
|
289
|
+
| `/api/v1/sync/status` | GET | 获取所有同步任务的详细进度状态(含百分比、当前代码与错误信息) |
|
|
290
|
+
| `/api/v1/logs/stream` | GET | SSE (Server-Sent Events) 实时系统与数据同步日志流 |
|
|
291
|
+
| `/api/v1/tdx/check` | GET | 检查通达信本地 `vipdoc` 目录有效性与代码统计 |
|
|
292
|
+
| `/api/v1/tdx/download` | POST | 后台从通达信官方服务器下载全量 `hsjday.zip` 日线包并自动解压 |
|
|
293
|
+
| `/api/v1/filesystem/list` | GET | 本地文件与目录探查接口 (供 Web 文件选择器使用) |
|
|
278
294
|
|
|
279
295
|
### 方式五:前端 UI 开发与热重载调试 (`web/`)
|
|
280
296
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "carrotquant-data"
|
|
3
|
-
version = "1.2.
|
|
3
|
+
version = "1.2.3"
|
|
4
4
|
description = "高性能、轻量级 A 股与指数金融数据增量同步与持久化流水线"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -58,7 +58,7 @@ requires = ["hatchling"]
|
|
|
58
58
|
build-backend = "hatchling.build"
|
|
59
59
|
|
|
60
60
|
[tool.bumpversion]
|
|
61
|
-
current_version = "1.2.
|
|
61
|
+
current_version = "1.2.3"
|
|
62
62
|
commit = true
|
|
63
63
|
tag = true
|
|
64
64
|
allow_dirty = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/.idea/inspectionProfiles/profiles_settings.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_integration_fs_list.py
RENAMED
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_integration_tdx_sync.py
RENAMED
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_provider_baostock.py
RENAMED
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_provider_eastmoney.py
RENAMED
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_rest_api_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/tests/integration/test_sync_multi_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/__tests__/chartPerformance.test.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/TableManagementGrid.tsx
RENAMED
|
File without changes
|
{carrotquant_data-1.2.2 → carrotquant_data-1.2.3}/web/src/components/TradingViewKLineChart.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|