axdata 0.1.0__py3-none-any.whl
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.
- axdata/__init__.py +16 -0
- axdata/cache.py +19 -0
- axdata/client.py +1223 -0
- axdata-0.1.0.dist-info/METADATA +238 -0
- axdata-0.1.0.dist-info/RECORD +427 -0
- axdata-0.1.0.dist-info/WHEEL +5 -0
- axdata-0.1.0.dist-info/entry_points.txt +8 -0
- axdata-0.1.0.dist-info/licenses/LICENSE +162 -0
- axdata-0.1.0.dist-info/top_level.txt +6 -0
- axdata_core/__init__.py +221 -0
- axdata_core/_tdx_wire/__init__.py +35 -0
- axdata_core/_tdx_wire/_shim.py +140 -0
- axdata_core/_tdx_wire/api/__init__.py +51 -0
- axdata_core/_tdx_wire/api/auction.py +24 -0
- axdata_core/_tdx_wire/api/bars.py +24 -0
- axdata_core/_tdx_wire/api/base.py +26 -0
- axdata_core/_tdx_wire/api/codes.py +25 -0
- axdata_core/_tdx_wire/api/corporate.py +24 -0
- axdata_core/_tdx_wire/api/finance.py +24 -0
- axdata_core/_tdx_wire/api/intraday.py +24 -0
- axdata_core/_tdx_wire/api/quotes.py +26 -0
- axdata_core/_tdx_wire/api/resources.py +25 -0
- axdata_core/_tdx_wire/api/session.py +24 -0
- axdata_core/_tdx_wire/api/trades.py +24 -0
- axdata_core/_tdx_wire/client.py +33 -0
- axdata_core/_tdx_wire/exceptions.py +27 -0
- axdata_core/_tdx_wire/hosts.py +106 -0
- axdata_core/_tdx_wire/models/__init__.py +93 -0
- axdata_core/_tdx_wire/models/auction.py +26 -0
- axdata_core/_tdx_wire/models/corporate.py +27 -0
- axdata_core/_tdx_wire/models/finance.py +26 -0
- axdata_core/_tdx_wire/models/intraday.py +31 -0
- axdata_core/_tdx_wire/models/kline.py +27 -0
- axdata_core/_tdx_wire/models/quote.py +32 -0
- axdata_core/_tdx_wire/models/resource.py +24 -0
- axdata_core/_tdx_wire/models/security.py +24 -0
- axdata_core/_tdx_wire/models/session.py +27 -0
- axdata_core/_tdx_wire/models/subchart.py +25 -0
- axdata_core/_tdx_wire/models/trade.py +28 -0
- axdata_core/_tdx_wire/protocol/__init__.py +49 -0
- axdata_core/_tdx_wire/protocol/commands/__init__.py +43 -0
- axdata_core/_tdx_wire/protocol/commands/auction.py +110 -0
- axdata_core/_tdx_wire/protocol/commands/codec.py +43 -0
- axdata_core/_tdx_wire/protocol/commands/corporate.py +98 -0
- axdata_core/_tdx_wire/protocol/commands/finance.py +96 -0
- axdata_core/_tdx_wire/protocol/commands/intraday.py +122 -0
- axdata_core/_tdx_wire/protocol/commands/klines.py +102 -0
- axdata_core/_tdx_wire/protocol/commands/lookup.py +36 -0
- axdata_core/_tdx_wire/protocol/commands/price_limits.py +89 -0
- axdata_core/_tdx_wire/protocol/commands/quotes.py +102 -0
- axdata_core/_tdx_wire/protocol/commands/registry.py +36 -0
- axdata_core/_tdx_wire/protocol/commands/resources.py +99 -0
- axdata_core/_tdx_wire/protocol/commands/security.py +103 -0
- axdata_core/_tdx_wire/protocol/commands/session.py +82 -0
- axdata_core/_tdx_wire/protocol/commands/subchart.py +97 -0
- axdata_core/_tdx_wire/protocol/commands/trades.py +107 -0
- axdata_core/_tdx_wire/protocol/constants.py +124 -0
- axdata_core/_tdx_wire/protocol/frame.py +68 -0
- axdata_core/_tdx_wire/protocol/unit.py +85 -0
- axdata_core/_tdx_wire/py.typed +1 -0
- axdata_core/_tdx_wire/transport/__init__.py +34 -0
- axdata_core/_tdx_wire/transport/base.py +25 -0
- axdata_core/_tdx_wire/transport/memory.py +24 -0
- axdata_core/_tdx_wire/transport/pool.py +32 -0
- axdata_core/_tdx_wire/transport/socket.py +39 -0
- axdata_core/adapters/__init__.py +0 -0
- axdata_core/adapters/cls/__init__.py +17 -0
- axdata_core/adapters/cls/provider_bridge.py +23 -0
- axdata_core/adapters/cls/request.py +632 -0
- axdata_core/adapters/cls/source_adapter_registry.py +31 -0
- axdata_core/adapters/cninfo/__init__.py +17 -0
- axdata_core/adapters/cninfo/provider_bridge.py +25 -0
- axdata_core/adapters/cninfo/request.py +2425 -0
- axdata_core/adapters/cninfo/source_adapter_registry.py +42 -0
- axdata_core/adapters/eastmoney/__init__.py +17 -0
- axdata_core/adapters/eastmoney/provider_bridge.py +25 -0
- axdata_core/adapters/eastmoney/request.py +1128 -0
- axdata_core/adapters/eastmoney/source_adapter_registry.py +42 -0
- axdata_core/adapters/exchange/__init__.py +17 -0
- axdata_core/adapters/exchange/provider_bridge.py +25 -0
- axdata_core/adapters/exchange/request.py +1214 -0
- axdata_core/adapters/exchange/source_adapter_registry.py +42 -0
- axdata_core/adapters/kph/__init__.py +17 -0
- axdata_core/adapters/kph/provider_bridge.py +23 -0
- axdata_core/adapters/kph/request.py +509 -0
- axdata_core/adapters/kph/source_adapter_registry.py +31 -0
- axdata_core/adapters/sina/__init__.py +17 -0
- axdata_core/adapters/sina/provider_bridge.py +25 -0
- axdata_core/adapters/sina/request.py +5155 -0
- axdata_core/adapters/sina/source_adapter_registry.py +42 -0
- axdata_core/adapters/tdx/__init__.py +32 -0
- axdata_core/adapters/tdx/adjustment.py +50 -0
- axdata_core/adapters/tdx/adjustment_fetch.py +51 -0
- axdata_core/adapters/tdx/auction_fetch.py +51 -0
- axdata_core/adapters/tdx/client_factory.py +110 -0
- axdata_core/adapters/tdx/code_fetch.py +62 -0
- axdata_core/adapters/tdx/codes.py +54 -0
- axdata_core/adapters/tdx/derived_rows.py +69 -0
- axdata_core/adapters/tdx/downloader.py +193 -0
- axdata_core/adapters/tdx/downloader_interface_sets.py +50 -0
- axdata_core/adapters/tdx/downloader_profiles.py +43 -0
- axdata_core/adapters/tdx/downloader_registry.py +115 -0
- axdata_core/adapters/tdx/execution_utils.py +55 -0
- axdata_core/adapters/tdx/f10_executor.py +57 -0
- axdata_core/adapters/tdx/f10_normalize.py +61 -0
- axdata_core/adapters/tdx/f10_params.py +57 -0
- axdata_core/adapters/tdx/f10_postprocess.py +67 -0
- axdata_core/adapters/tdx/f10_render.py +48 -0
- axdata_core/adapters/tdx/f10_request.py +62 -0
- axdata_core/adapters/tdx/finance_fetch.py +61 -0
- axdata_core/adapters/tdx/finance_maps.py +54 -0
- axdata_core/adapters/tdx/finance_normalize.py +57 -0
- axdata_core/adapters/tdx/host_config.py +115 -0
- axdata_core/adapters/tdx/interface_sets.py +50 -0
- axdata_core/adapters/tdx/intraday_fetch.py +68 -0
- axdata_core/adapters/tdx/kline_helpers.py +58 -0
- axdata_core/adapters/tdx/limit_ladder_fetch.py +60 -0
- axdata_core/adapters/tdx/limit_ladder_topics.py +53 -0
- axdata_core/adapters/tdx/normalize_utils.py +75 -0
- axdata_core/adapters/tdx/options.py +61 -0
- axdata_core/adapters/tdx/price_limit_calendar.py +49 -0
- axdata_core/adapters/tdx/price_limit_fetch.py +53 -0
- axdata_core/adapters/tdx/price_limit_history.py +50 -0
- axdata_core/adapters/tdx/price_limits.py +58 -0
- axdata_core/adapters/tdx/provider_bridge.py +68 -0
- axdata_core/adapters/tdx/quote_fetch.py +61 -0
- axdata_core/adapters/tdx/quote_identity.py +49 -0
- axdata_core/adapters/tdx/rank_fetch.py +55 -0
- axdata_core/adapters/tdx/rank_params.py +52 -0
- axdata_core/adapters/tdx/realtime_refresh.py +45 -0
- axdata_core/adapters/tdx/request.py +11 -0
- axdata_core/adapters/tdx/request_adapter_runtime.py +41 -0
- axdata_core/adapters/tdx/request_client.py +51 -0
- axdata_core/adapters/tdx/request_compat.py +89 -0
- axdata_core/adapters/tdx/request_dispatch.py +50 -0
- axdata_core/adapters/tdx/request_filters.py +60 -0
- axdata_core/adapters/tdx/request_host_config.py +110 -0
- axdata_core/adapters/tdx/request_limits.py +59 -0
- axdata_core/adapters/tdx/request_methods.py +41 -0
- axdata_core/adapters/tdx/request_params.py +62 -0
- axdata_core/adapters/tdx/request_seams.py +41 -0
- axdata_core/adapters/tdx/resources/__init__.py +0 -0
- axdata_core/adapters/tdx/resources/finance_maps/__init__.py +0 -0
- axdata_core/adapters/tdx/resources/finance_maps/incon.dat +3702 -0
- axdata_core/adapters/tdx/resources/finance_maps/tdxhy.cfg +5620 -0
- axdata_core/adapters/tdx/resources/finance_maps/tdxzs.cfg +605 -0
- axdata_core/adapters/tdx/security_codes.py +54 -0
- axdata_core/adapters/tdx/series_history.py +57 -0
- axdata_core/adapters/tdx/server_cache.py +58 -0
- axdata_core/adapters/tdx/snapshot_normalize.py +56 -0
- axdata_core/adapters/tdx/source_adapter_registry.py +69 -0
- axdata_core/adapters/tdx/source_execution.py +44 -0
- axdata_core/adapters/tdx/source_execution_registry.py +70 -0
- axdata_core/adapters/tdx/stats_cache.py +184 -0
- axdata_core/adapters/tdx/stats_models.py +159 -0
- axdata_core/adapters/tdx/stats_resource.py +304 -0
- axdata_core/adapters/tdx/status_fetch.py +55 -0
- axdata_core/adapters/tdx/time_series_normalize.py +67 -0
- axdata_core/adapters/tdx/tqlex.py +50 -0
- axdata_core/adapters/tdx/wire_requests.py +60 -0
- axdata_core/adapters/tdx_ext/__init__.py +66 -0
- axdata_core/adapters/tdx_ext/client.py +688 -0
- axdata_core/adapters/tdx_ext/exceptions.py +51 -0
- axdata_core/adapters/tdx_ext/host_config.py +40 -0
- axdata_core/adapters/tdx_ext/interface_sets.py +65 -0
- axdata_core/adapters/tdx_ext/local_cache.py +649 -0
- axdata_core/adapters/tdx_ext/models.py +96 -0
- axdata_core/adapters/tdx_ext/options.py +36 -0
- axdata_core/adapters/tdx_ext/pool.py +153 -0
- axdata_core/adapters/tdx_ext/provider_bridge.py +35 -0
- axdata_core/adapters/tdx_ext/request.py +498 -0
- axdata_core/adapters/tdx_ext/request_execution.py +118 -0
- axdata_core/adapters/tdx_ext/request_instruments.py +221 -0
- axdata_core/adapters/tdx_ext/request_normalize.py +356 -0
- axdata_core/adapters/tdx_ext/request_params.py +157 -0
- axdata_core/adapters/tdx_ext/request_series.py +98 -0
- axdata_core/adapters/tdx_ext/server_cache.py +13 -0
- axdata_core/adapters/tdx_ext/servers.py +35 -0
- axdata_core/adapters/tdx_ext/source_adapter_registry.py +42 -0
- axdata_core/adapters/tdx_ext/source_execution.py +19 -0
- axdata_core/adapters/tdx_ext/source_execution_registry.py +43 -0
- axdata_core/adapters/tencent/__init__.py +17 -0
- axdata_core/adapters/tencent/provider_bridge.py +25 -0
- axdata_core/adapters/tencent/request.py +729 -0
- axdata_core/adapters/tencent/source_adapter_registry.py +42 -0
- axdata_core/axp.py +1843 -0
- axdata_core/builtin_providers.py +586 -0
- axdata_core/builtin_source_declarations.py +156 -0
- axdata_core/cli.py +1818 -0
- axdata_core/collector_registry.py +227 -0
- axdata_core/collector_runner.py +1016 -0
- axdata_core/collector_scheduler.py +3155 -0
- axdata_core/collector_templates.py +339 -0
- axdata_core/data_browser.py +1696 -0
- axdata_core/diagnostics.py +734 -0
- axdata_core/downloader_engine.py +1480 -0
- axdata_core/downloader_registry.py +62 -0
- axdata_core/downloaders.py +1619 -0
- axdata_core/legacy_provider_adapter.py +68 -0
- axdata_core/paths.py +51 -0
- axdata_core/plugin_config.py +272 -0
- axdata_core/plugin_status.py +419 -0
- axdata_core/plugins.py +1363 -0
- axdata_core/provider_catalog.py +462 -0
- axdata_core/provider_registry.py +833 -0
- axdata_core/quality.py +86 -0
- axdata_core/query.py +242 -0
- axdata_core/resources/__init__.py +2 -0
- axdata_core/resources/tdx_extended_servers.json +22 -0
- axdata_core/resources/tdx_quote_servers.json +49 -0
- axdata_core/sample_collectors.py +42 -0
- axdata_core/schema.py +385 -0
- axdata_core/source_adapter_factory.py +95 -0
- axdata_core/source_adapter_options.py +18 -0
- axdata_core/source_errors.py +43 -0
- axdata_core/source_execution_options.py +37 -0
- axdata_core/source_execution_registry.py +27 -0
- axdata_core/source_projection.py +21 -0
- axdata_core/source_request.py +441 -0
- axdata_core/source_session.py +355 -0
- axdata_core/sources/__init__.py +40 -0
- axdata_core/sources/base.py +112 -0
- axdata_core/sources/catalog.py +60 -0
- axdata_core/sources/cls/__init__.py +5 -0
- axdata_core/sources/cls/catalog.py +231 -0
- axdata_core/sources/cninfo/__init__.py +5 -0
- axdata_core/sources/cninfo/catalog.py +1994 -0
- axdata_core/sources/display_docs.py +139 -0
- axdata_core/sources/eastmoney/__init__.py +5 -0
- axdata_core/sources/eastmoney/catalog.py +509 -0
- axdata_core/sources/exchange/__init__.py +5 -0
- axdata_core/sources/exchange/catalog.py +361 -0
- axdata_core/sources/kph/__init__.py +5 -0
- axdata_core/sources/kph/catalog.py +255 -0
- axdata_core/sources/sina/__init__.py +5 -0
- axdata_core/sources/sina/catalog.py +2951 -0
- axdata_core/sources/tdx/__init__.py +5 -0
- axdata_core/sources/tdx/catalog.py +4546 -0
- axdata_core/sources/tdx_ext/__init__.py +5 -0
- axdata_core/sources/tdx_ext/catalog.py +1518 -0
- axdata_core/sources/tencent/__init__.py +5 -0
- axdata_core/sources/tencent/catalog.py +370 -0
- axdata_core/storage.py +186 -0
- axdata_core/tdx_f10_catalog.py +52 -0
- axdata_core/tdx_f10_models.py +50 -0
- axdata_core/tdx_f10_names.py +47 -0
- axdata_core/tdx_f10_specs.py +56 -0
- axdata_core/tdx_plugin_required.py +43 -0
- axdata_core/tdx_server_config.py +65 -0
- axdata_core/trade_calendar_cache.py +397 -0
- axdata_source_cninfo/__init__.py +15 -0
- axdata_source_cninfo/adapter.py +31 -0
- axdata_source_cninfo/axdata-provider.json +384 -0
- axdata_source_cninfo/catalog.py +209 -0
- axdata_source_cninfo/metadata.py +8 -0
- axdata_source_cninfo/provider.py +41 -0
- axdata_source_tdx/__init__.py +15 -0
- axdata_source_tdx/_tdx_wire/__init__.py +26 -0
- axdata_source_tdx/_tdx_wire/_binary.py +218 -0
- axdata_source_tdx/_tdx_wire/_code_utils.py +42 -0
- axdata_source_tdx/_tdx_wire/_command_codec.py +186 -0
- axdata_source_tdx/_tdx_wire/_command_codes.py +74 -0
- axdata_source_tdx/_tdx_wire/_command_defaults.py +15 -0
- axdata_source_tdx/_tdx_wire/_command_dispatch.py +96 -0
- axdata_source_tdx/_tdx_wire/_command_layouts.py +96 -0
- axdata_source_tdx/_tdx_wire/_command_lookup.py +25 -0
- axdata_source_tdx/_tdx_wire/_command_metadata.py +32 -0
- axdata_source_tdx/_tdx_wire/_command_registry.py +61 -0
- axdata_source_tdx/_tdx_wire/_connection_defaults.py +13 -0
- axdata_source_tdx/_tdx_wire/_host_defaults.py +51 -0
- axdata_source_tdx/_tdx_wire/_host_probe.py +81 -0
- axdata_source_tdx/_tdx_wire/_host_resource.py +70 -0
- axdata_source_tdx/_tdx_wire/_host_utils.py +31 -0
- axdata_source_tdx/_tdx_wire/_market.py +66 -0
- axdata_source_tdx/_tdx_wire/_request_defaults.py +11 -0
- axdata_source_tdx/_tdx_wire/_security_classification.py +61 -0
- axdata_source_tdx/_tdx_wire/_time_utils.py +7 -0
- axdata_source_tdx/_tdx_wire/api/__init__.py +45 -0
- axdata_source_tdx/_tdx_wire/api/auction.py +25 -0
- axdata_source_tdx/_tdx_wire/api/bars.py +31 -0
- axdata_source_tdx/_tdx_wire/api/base.py +39 -0
- axdata_source_tdx/_tdx_wire/api/codes.py +25 -0
- axdata_source_tdx/_tdx_wire/api/corporate.py +11 -0
- axdata_source_tdx/_tdx_wire/api/finance.py +10 -0
- axdata_source_tdx/_tdx_wire/api/intraday.py +38 -0
- axdata_source_tdx/_tdx_wire/api/quotes.py +78 -0
- axdata_source_tdx/_tdx_wire/api/resources.py +34 -0
- axdata_source_tdx/_tdx_wire/api/session.py +16 -0
- axdata_source_tdx/_tdx_wire/api/trades.py +34 -0
- axdata_source_tdx/_tdx_wire/client.py +470 -0
- axdata_source_tdx/_tdx_wire/exceptions.py +25 -0
- axdata_source_tdx/_tdx_wire/hosts.py +27 -0
- axdata_source_tdx/_tdx_wire/models/__init__.py +87 -0
- axdata_source_tdx/_tdx_wire/models/auction.py +58 -0
- axdata_source_tdx/_tdx_wire/models/corporate.py +59 -0
- axdata_source_tdx/_tdx_wire/models/finance.py +80 -0
- axdata_source_tdx/_tdx_wire/models/intraday.py +112 -0
- axdata_source_tdx/_tdx_wire/models/kline.py +58 -0
- axdata_source_tdx/_tdx_wire/models/quote.py +262 -0
- axdata_source_tdx/_tdx_wire/models/resource.py +18 -0
- axdata_source_tdx/_tdx_wire/models/security.py +28 -0
- axdata_source_tdx/_tdx_wire/models/session.py +30 -0
- axdata_source_tdx/_tdx_wire/models/subchart.py +39 -0
- axdata_source_tdx/_tdx_wire/models/trade.py +46 -0
- axdata_source_tdx/_tdx_wire/protocol/__init__.py +43 -0
- axdata_source_tdx/_tdx_wire/protocol/_frame_constants.py +5 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/__init__.py +37 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/auction.py +165 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/codec.py +37 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/corporate.py +163 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/finance.py +180 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/intraday.py +382 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/klines.py +396 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/lookup.py +31 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/price_limits.py +110 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/quotes.py +804 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/registry.py +30 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/resources.py +107 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/security.py +163 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/session.py +129 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/subchart.py +182 -0
- axdata_source_tdx/_tdx_wire/protocol/commands/trades.py +275 -0
- axdata_source_tdx/_tdx_wire/protocol/constants.py +70 -0
- axdata_source_tdx/_tdx_wire/protocol/frame.py +141 -0
- axdata_source_tdx/_tdx_wire/protocol/unit.py +98 -0
- axdata_source_tdx/_tdx_wire/py.typed +1 -0
- axdata_source_tdx/_tdx_wire/transport/__init__.py +28 -0
- axdata_source_tdx/_tdx_wire/transport/base.py +21 -0
- axdata_source_tdx/_tdx_wire/transport/memory.py +42 -0
- axdata_source_tdx/_tdx_wire/transport/pool.py +148 -0
- axdata_source_tdx/_tdx_wire/transport/socket.py +373 -0
- axdata_source_tdx/adapter.py +31 -0
- axdata_source_tdx/adjustment.py +163 -0
- axdata_source_tdx/adjustment_fetch.py +148 -0
- axdata_source_tdx/auction_fetch.py +162 -0
- axdata_source_tdx/axdata-provider.json +23680 -0
- axdata_source_tdx/catalog.py +39 -0
- axdata_source_tdx/client_factory.py +61 -0
- axdata_source_tdx/code_fetch.py +579 -0
- axdata_source_tdx/codes.py +69 -0
- axdata_source_tdx/collectors.py +525 -0
- axdata_source_tdx/derived_rows.py +500 -0
- axdata_source_tdx/downloader.py +139 -0
- axdata_source_tdx/downloader_interface_sets.py +29 -0
- axdata_source_tdx/downloader_profiles.py +731 -0
- axdata_source_tdx/downloader_registry.py +85 -0
- axdata_source_tdx/execution_utils.py +141 -0
- axdata_source_tdx/f10_executor.py +414 -0
- axdata_source_tdx/f10_normalize.py +169 -0
- axdata_source_tdx/f10_params.py +221 -0
- axdata_source_tdx/f10_postprocess.py +405 -0
- axdata_source_tdx/f10_render.py +29 -0
- axdata_source_tdx/f10_request.py +365 -0
- axdata_source_tdx/finance_fetch.py +514 -0
- axdata_source_tdx/finance_maps.py +377 -0
- axdata_source_tdx/finance_normalize.py +273 -0
- axdata_source_tdx/host_config.py +51 -0
- axdata_source_tdx/interface_sets.py +180 -0
- axdata_source_tdx/intraday_fetch.py +600 -0
- axdata_source_tdx/kline_helpers.py +333 -0
- axdata_source_tdx/limit_ladder_fetch.py +614 -0
- axdata_source_tdx/limit_ladder_topics.py +280 -0
- axdata_source_tdx/metadata.py +8 -0
- axdata_source_tdx/normalize_utils.py +264 -0
- axdata_source_tdx/options.py +195 -0
- axdata_source_tdx/price_limit_calendar.py +106 -0
- axdata_source_tdx/price_limit_fetch.py +264 -0
- axdata_source_tdx/price_limit_history.py +100 -0
- axdata_source_tdx/price_limits.py +142 -0
- axdata_source_tdx/provider.py +44 -0
- axdata_source_tdx/provider_bridge.py +43 -0
- axdata_source_tdx/quote_fetch.py +485 -0
- axdata_source_tdx/quote_identity.py +50 -0
- axdata_source_tdx/rank_fetch.py +316 -0
- axdata_source_tdx/rank_params.py +181 -0
- axdata_source_tdx/realtime_refresh.py +51 -0
- axdata_source_tdx/request_adapter.py +533 -0
- axdata_source_tdx/request_adapter_runtime.py +302 -0
- axdata_source_tdx/request_client.py +98 -0
- axdata_source_tdx/request_compat.py +432 -0
- axdata_source_tdx/request_dispatch.py +138 -0
- axdata_source_tdx/request_entrypoints.py +146 -0
- axdata_source_tdx/request_filters.py +154 -0
- axdata_source_tdx/request_host_config.py +103 -0
- axdata_source_tdx/request_limits.py +15 -0
- axdata_source_tdx/request_methods.py +1910 -0
- axdata_source_tdx/request_params.py +225 -0
- axdata_source_tdx/request_seams.py +534 -0
- axdata_source_tdx/resources/__init__.py +0 -0
- axdata_source_tdx/resources/finance_maps/__init__.py +1 -0
- axdata_source_tdx/resources/finance_maps/incon.dat +3702 -0
- axdata_source_tdx/resources/finance_maps/tdxhy.cfg +5620 -0
- axdata_source_tdx/resources/finance_maps/tdxzs.cfg +605 -0
- axdata_source_tdx/resources/tdx_extended_servers.json +22 -0
- axdata_source_tdx/resources/tdx_quote_servers.json +49 -0
- axdata_source_tdx/security_codes.py +127 -0
- axdata_source_tdx/series_history.py +348 -0
- axdata_source_tdx/server_cache.py +21 -0
- axdata_source_tdx/snapshot_normalize.py +232 -0
- axdata_source_tdx/source_adapter_registry.py +42 -0
- axdata_source_tdx/source_execution.py +22 -0
- axdata_source_tdx/source_execution_registry.py +43 -0
- axdata_source_tdx/stats_cache.py +150 -0
- axdata_source_tdx/stats_models.py +161 -0
- axdata_source_tdx/stats_resource.py +242 -0
- axdata_source_tdx/status_fetch.py +209 -0
- axdata_source_tdx/tdx_f10_catalog.py +957 -0
- axdata_source_tdx/tdx_f10_models.py +47 -0
- axdata_source_tdx/tdx_f10_names.py +48 -0
- axdata_source_tdx/tdx_f10_specs.py +1142 -0
- axdata_source_tdx/tdx_server_config.py +389 -0
- axdata_source_tdx/time_series_normalize.py +370 -0
- axdata_source_tdx/tqlex.py +138 -0
- axdata_source_tdx/wire.py +32 -0
- axdata_source_tdx/wire_requests.py +190 -0
- axdata_source_tdx_ext/__init__.py +15 -0
- axdata_source_tdx_ext/adapter.py +31 -0
- axdata_source_tdx_ext/axdata-provider.json +9424 -0
- axdata_source_tdx_ext/catalog.py +33 -0
- axdata_source_tdx_ext/metadata.py +8 -0
- axdata_source_tdx_ext/provider.py +44 -0
- axdata_source_tencent/__init__.py +15 -0
- axdata_source_tencent/adapter.py +31 -0
- axdata_source_tencent/axdata-provider.json +291 -0
- axdata_source_tencent/catalog.py +190 -0
- axdata_source_tencent/metadata.py +8 -0
- axdata_source_tencent/provider.py +41 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Compatibility shim for ``axdata_core._tdx_wire.protocol.commands``.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
This module keeps old imports working by loading the TDX plugin on demand.
|
|
5
|
+
If the plugin is unavailable, attribute access raises a clear install/enable error.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from ..._shim import load_provider_first
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
_EXPORT_MODULES = {
|
|
14
|
+
"build_command_frame": "axdata_source_tdx._tdx_wire._command_codec",
|
|
15
|
+
"parse_command_response": "axdata_source_tdx._tdx_wire._command_codec",
|
|
16
|
+
"COMMANDS": "axdata_source_tdx._tdx_wire._command_registry",
|
|
17
|
+
"CommandSpec": "axdata_source_tdx._tdx_wire._command_registry",
|
|
18
|
+
"command_code": "axdata_source_tdx._tdx_wire._command_lookup",
|
|
19
|
+
"required_commands": "axdata_source_tdx._tdx_wire._command_registry",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
"COMMANDS",
|
|
24
|
+
"CommandSpec",
|
|
25
|
+
"build_command_frame",
|
|
26
|
+
"command_code",
|
|
27
|
+
"parse_command_response",
|
|
28
|
+
"required_commands",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def __getattr__(name: str):
|
|
33
|
+
module_name = _EXPORT_MODULES.get(name)
|
|
34
|
+
if module_name is None:
|
|
35
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
36
|
+
implementation = load_provider_first(module_name)
|
|
37
|
+
value = getattr(implementation, name)
|
|
38
|
+
globals()[name] = value
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def __dir__() -> list[str]:
|
|
43
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.auction.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
Lightweight command/default facts are exposed without loading the full auction
|
|
5
|
+
command parser; other legacy names still load provider-first on demand.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from datetime import time
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from ..._shim import load_provider_first, load_provider_first_cached
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire.protocol.commands.auction"
|
|
17
|
+
_PROVIDER_CODES_MODULE = "axdata_source_tdx._tdx_wire._command_codes"
|
|
18
|
+
_PROVIDER_DEFAULTS_MODULE = "axdata_source_tdx._tdx_wire._command_defaults"
|
|
19
|
+
_PROVIDER_LAYOUTS_MODULE = "axdata_source_tdx._tdx_wire._command_layouts"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
_codes_impl = None
|
|
23
|
+
_defaults_impl = None
|
|
24
|
+
_layout_impl = None
|
|
25
|
+
_command_impl = None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _load_codes_impl():
|
|
29
|
+
return load_provider_first_cached(globals(), "_codes_impl", _PROVIDER_CODES_MODULE)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _load_defaults_impl():
|
|
33
|
+
return load_provider_first_cached(
|
|
34
|
+
globals(),
|
|
35
|
+
"_defaults_impl",
|
|
36
|
+
_PROVIDER_DEFAULTS_MODULE,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _load_layout_impl():
|
|
41
|
+
return load_provider_first_cached(
|
|
42
|
+
globals(),
|
|
43
|
+
"_layout_impl",
|
|
44
|
+
_PROVIDER_LAYOUTS_MODULE,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _command_codes() -> dict[str, int]:
|
|
49
|
+
command_codes = _load_codes_impl().COMMAND_CODES
|
|
50
|
+
globals()["COMMAND_CODES"] = command_codes
|
|
51
|
+
return command_codes
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _command_code(name: str) -> int:
|
|
55
|
+
return _load_codes_impl().command_code(name)
|
|
56
|
+
|
|
57
|
+
__all__ = [
|
|
58
|
+
"AUCTION_RECORD_SIZE",
|
|
59
|
+
"Any",
|
|
60
|
+
"AuctionProcessRecord",
|
|
61
|
+
"AuctionProcessSeries",
|
|
62
|
+
"COMMAND_CODES",
|
|
63
|
+
"DEFAULT_AUCTION_COUNT",
|
|
64
|
+
"DEFAULT_AUCTION_MODE",
|
|
65
|
+
"ProtocolError",
|
|
66
|
+
"RequestFrame",
|
|
67
|
+
"ResponseFrame",
|
|
68
|
+
"TYPE_AUCTION_PROCESS",
|
|
69
|
+
"annotations",
|
|
70
|
+
"auction_time_from_raw",
|
|
71
|
+
"build_auction_process_frame",
|
|
72
|
+
"little_f32",
|
|
73
|
+
"little_u16",
|
|
74
|
+
"little_u32",
|
|
75
|
+
"normalize_auction_u32",
|
|
76
|
+
"parse_auction_process_payload",
|
|
77
|
+
"split_code",
|
|
78
|
+
"time",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _load_command_impl():
|
|
83
|
+
global _command_impl
|
|
84
|
+
if _command_impl is None:
|
|
85
|
+
_command_impl = load_provider_first(_PROVIDER_MODULE)
|
|
86
|
+
return _command_impl
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def __getattr__(name: str) -> Any:
|
|
90
|
+
if name == "COMMAND_CODES":
|
|
91
|
+
return _command_codes()
|
|
92
|
+
if name == "AUCTION_RECORD_SIZE":
|
|
93
|
+
value = _load_layout_impl().AUCTION_RECORD_SIZE
|
|
94
|
+
elif name == "DEFAULT_AUCTION_COUNT":
|
|
95
|
+
value = _load_defaults_impl().DEFAULT_AUCTION_COUNT
|
|
96
|
+
elif name == "DEFAULT_AUCTION_MODE":
|
|
97
|
+
value = _load_defaults_impl().DEFAULT_AUCTION_MODE
|
|
98
|
+
elif name == "TYPE_AUCTION_PROCESS":
|
|
99
|
+
value = _command_code("auction_process")
|
|
100
|
+
else:
|
|
101
|
+
if name.startswith("_"):
|
|
102
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
103
|
+
implementation = _load_command_impl()
|
|
104
|
+
value = getattr(implementation, name)
|
|
105
|
+
globals()[name] = value
|
|
106
|
+
return value
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def __dir__() -> list[str]:
|
|
110
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.codec.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
This module keeps old imports working by loading the TDX plugin on demand.
|
|
5
|
+
If the plugin is unavailable, attribute access raises a clear install/enable error.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from ..._shim import load_provider_first
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire._command_codec"
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"BUILDERS",
|
|
17
|
+
"Builder",
|
|
18
|
+
"PARSERS",
|
|
19
|
+
"Parser",
|
|
20
|
+
"build_command_frame",
|
|
21
|
+
"parse_command_response",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
_impl = None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _load_impl():
|
|
28
|
+
global _impl
|
|
29
|
+
if _impl is None:
|
|
30
|
+
_impl = load_provider_first(_PROVIDER_MODULE)
|
|
31
|
+
return _impl
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def __getattr__(name: str):
|
|
35
|
+
if name not in __all__:
|
|
36
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
37
|
+
value = getattr(_load_impl(), name)
|
|
38
|
+
globals()[name] = value
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def __dir__() -> list[str]:
|
|
43
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.corporate.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
Lightweight command/layout facts are exposed without loading the full corporate
|
|
5
|
+
command parser; other legacy names still load provider-first on demand.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
from ..._shim import load_provider_first, load_provider_first_cached
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire.protocol.commands.corporate"
|
|
16
|
+
_PROVIDER_CODES_MODULE = "axdata_source_tdx._tdx_wire._command_codes"
|
|
17
|
+
_PROVIDER_LAYOUTS_MODULE = "axdata_source_tdx._tdx_wire._command_layouts"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
_codes_impl = None
|
|
21
|
+
_layout_impl = None
|
|
22
|
+
_command_impl = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _load_codes_impl():
|
|
26
|
+
return load_provider_first_cached(globals(), "_codes_impl", _PROVIDER_CODES_MODULE)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _load_layout_impl():
|
|
30
|
+
return load_provider_first_cached(
|
|
31
|
+
globals(),
|
|
32
|
+
"_layout_impl",
|
|
33
|
+
_PROVIDER_LAYOUTS_MODULE,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _command_codes() -> dict[str, int]:
|
|
38
|
+
command_codes = _load_codes_impl().COMMAND_CODES
|
|
39
|
+
globals()["COMMAND_CODES"] = command_codes
|
|
40
|
+
return command_codes
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _command_code(name: str) -> int:
|
|
44
|
+
return _load_codes_impl().command_code(name)
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
"Any",
|
|
48
|
+
"CAPITAL_CHANGE_CATEGORY_NAMES",
|
|
49
|
+
"CAPITAL_CHANGE_RECORD_SIZE",
|
|
50
|
+
"COMMAND_CODES",
|
|
51
|
+
"CapitalChangeBlock",
|
|
52
|
+
"CapitalChangeRecord",
|
|
53
|
+
"ID_TO_MARKET",
|
|
54
|
+
"ProtocolError",
|
|
55
|
+
"RequestFrame",
|
|
56
|
+
"ResponseFrame",
|
|
57
|
+
"TYPE_CAPITAL_CHANGES",
|
|
58
|
+
"annotations",
|
|
59
|
+
"build_capital_changes_frame",
|
|
60
|
+
"date_from_yyyymmdd",
|
|
61
|
+
"little_f32",
|
|
62
|
+
"little_u16",
|
|
63
|
+
"little_u32",
|
|
64
|
+
"market_to_id",
|
|
65
|
+
"normalize_code",
|
|
66
|
+
"parse_capital_changes_payload",
|
|
67
|
+
"split_code",
|
|
68
|
+
"tdx_quantity_u32",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _load_command_impl():
|
|
73
|
+
global _command_impl
|
|
74
|
+
if _command_impl is None:
|
|
75
|
+
_command_impl = load_provider_first(_PROVIDER_MODULE)
|
|
76
|
+
return _command_impl
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def __getattr__(name: str) -> Any:
|
|
80
|
+
if name == "COMMAND_CODES":
|
|
81
|
+
return _command_codes()
|
|
82
|
+
if name == "CAPITAL_CHANGE_CATEGORY_NAMES":
|
|
83
|
+
value = _load_layout_impl().CAPITAL_CHANGE_CATEGORY_NAMES
|
|
84
|
+
elif name == "CAPITAL_CHANGE_RECORD_SIZE":
|
|
85
|
+
value = _load_layout_impl().CAPITAL_CHANGE_RECORD_SIZE
|
|
86
|
+
elif name == "TYPE_CAPITAL_CHANGES":
|
|
87
|
+
value = _command_code("capital_changes")
|
|
88
|
+
else:
|
|
89
|
+
if name.startswith("_"):
|
|
90
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
91
|
+
implementation = _load_command_impl()
|
|
92
|
+
value = getattr(implementation, name)
|
|
93
|
+
globals()[name] = value
|
|
94
|
+
return value
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def __dir__() -> list[str]:
|
|
98
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.finance.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
Lightweight command/layout facts are exposed without loading the full finance
|
|
5
|
+
command parser; other legacy names still load provider-first on demand.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
from ..._shim import load_provider_first, load_provider_first_cached
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire.protocol.commands.finance"
|
|
16
|
+
_PROVIDER_CODES_MODULE = "axdata_source_tdx._tdx_wire._command_codes"
|
|
17
|
+
_PROVIDER_LAYOUTS_MODULE = "axdata_source_tdx._tdx_wire._command_layouts"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
_codes_impl = None
|
|
21
|
+
_layout_impl = None
|
|
22
|
+
_command_impl = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _load_codes_impl():
|
|
26
|
+
return load_provider_first_cached(globals(), "_codes_impl", _PROVIDER_CODES_MODULE)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _load_layout_impl():
|
|
30
|
+
return load_provider_first_cached(
|
|
31
|
+
globals(),
|
|
32
|
+
"_layout_impl",
|
|
33
|
+
_PROVIDER_LAYOUTS_MODULE,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _command_codes() -> dict[str, int]:
|
|
38
|
+
command_codes = _load_codes_impl().COMMAND_CODES
|
|
39
|
+
globals()["COMMAND_CODES"] = command_codes
|
|
40
|
+
return command_codes
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _command_code(name: str) -> int:
|
|
44
|
+
return _load_codes_impl().command_code(name)
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
"Any",
|
|
48
|
+
"COMMAND_CODES",
|
|
49
|
+
"FINANCE_INFO_BODY_SIZE",
|
|
50
|
+
"FINANCE_INFO_RECORD_SIZE",
|
|
51
|
+
"FinanceInfoBlock",
|
|
52
|
+
"FinanceInfoRecord",
|
|
53
|
+
"ID_TO_MARKET",
|
|
54
|
+
"ProtocolError",
|
|
55
|
+
"RequestFrame",
|
|
56
|
+
"ResponseFrame",
|
|
57
|
+
"TYPE_FINANCE_INFO",
|
|
58
|
+
"annotations",
|
|
59
|
+
"build_finance_info_frame",
|
|
60
|
+
"date_from_yyyymmdd",
|
|
61
|
+
"little_f32",
|
|
62
|
+
"little_u16",
|
|
63
|
+
"little_u32",
|
|
64
|
+
"parse_finance_info_payload",
|
|
65
|
+
"parse_finance_info_record",
|
|
66
|
+
"split_code",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _load_command_impl():
|
|
71
|
+
global _command_impl
|
|
72
|
+
if _command_impl is None:
|
|
73
|
+
_command_impl = load_provider_first(_PROVIDER_MODULE)
|
|
74
|
+
return _command_impl
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def __getattr__(name: str) -> Any:
|
|
78
|
+
if name == "COMMAND_CODES":
|
|
79
|
+
return _command_codes()
|
|
80
|
+
if name == "FINANCE_INFO_BODY_SIZE":
|
|
81
|
+
value = _load_layout_impl().FINANCE_INFO_BODY_SIZE
|
|
82
|
+
elif name == "FINANCE_INFO_RECORD_SIZE":
|
|
83
|
+
value = _load_layout_impl().FINANCE_INFO_RECORD_SIZE
|
|
84
|
+
elif name == "TYPE_FINANCE_INFO":
|
|
85
|
+
value = _command_code("finance_info")
|
|
86
|
+
else:
|
|
87
|
+
if name.startswith("_"):
|
|
88
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
89
|
+
implementation = _load_command_impl()
|
|
90
|
+
value = getattr(implementation, name)
|
|
91
|
+
globals()[name] = value
|
|
92
|
+
return value
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def __dir__() -> list[str]:
|
|
96
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.intraday.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
Lightweight command/default facts are exposed without loading the full intraday
|
|
5
|
+
command parser; other legacy names still load provider-first on demand.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from datetime import date, datetime, time, timedelta
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from ..._shim import load_provider_first, load_provider_first_cached
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire.protocol.commands.intraday"
|
|
17
|
+
_PROVIDER_CODES_MODULE = "axdata_source_tdx._tdx_wire._command_codes"
|
|
18
|
+
_PROVIDER_DEFAULTS_MODULE = "axdata_source_tdx._tdx_wire._command_defaults"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
_codes_impl = None
|
|
22
|
+
_defaults_impl = None
|
|
23
|
+
_command_impl = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _load_codes_impl():
|
|
27
|
+
return load_provider_first_cached(globals(), "_codes_impl", _PROVIDER_CODES_MODULE)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _load_defaults_impl():
|
|
31
|
+
return load_provider_first_cached(
|
|
32
|
+
globals(),
|
|
33
|
+
"_defaults_impl",
|
|
34
|
+
_PROVIDER_DEFAULTS_MODULE,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _command_codes() -> dict[str, int]:
|
|
39
|
+
command_codes = _load_codes_impl().COMMAND_CODES
|
|
40
|
+
globals()["COMMAND_CODES"] = command_codes
|
|
41
|
+
return command_codes
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _command_code(name: str) -> int:
|
|
45
|
+
return _load_codes_impl().command_code(name)
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"Any",
|
|
49
|
+
"COMMAND_CODES",
|
|
50
|
+
"DEFAULT_TODAY_INTRADAY_RESERVED_TAIL",
|
|
51
|
+
"HistoricalIntradayPoint",
|
|
52
|
+
"HistoricalIntradaySeries",
|
|
53
|
+
"ProtocolError",
|
|
54
|
+
"RECENT_HISTORICAL_INTRADAY_DATE_BASE",
|
|
55
|
+
"RecentHistoricalIntradayPoint",
|
|
56
|
+
"RecentHistoricalIntradaySeries",
|
|
57
|
+
"RequestFrame",
|
|
58
|
+
"ResponseFrame",
|
|
59
|
+
"SHANGHAI_TZ",
|
|
60
|
+
"TYPE_HISTORICAL_INTRADAY",
|
|
61
|
+
"TYPE_RECENT_HISTORICAL_INTRADAY",
|
|
62
|
+
"TYPE_TODAY_INTRADAY",
|
|
63
|
+
"TodayIntradayPoint",
|
|
64
|
+
"TodayIntradaySeries",
|
|
65
|
+
"annotations",
|
|
66
|
+
"build_historical_intraday_frame",
|
|
67
|
+
"build_recent_historical_intraday_frame",
|
|
68
|
+
"build_today_intraday_frame",
|
|
69
|
+
"consume_tdx_signed_varint",
|
|
70
|
+
"consume_tdx_varint",
|
|
71
|
+
"date",
|
|
72
|
+
"date_from_yyyymmdd",
|
|
73
|
+
"datetime",
|
|
74
|
+
"historical_intraday_time",
|
|
75
|
+
"historical_intraday_trade_date",
|
|
76
|
+
"intraday_time_label",
|
|
77
|
+
"little_f32",
|
|
78
|
+
"little_u16",
|
|
79
|
+
"parse_historical_intraday_payload",
|
|
80
|
+
"parse_recent_historical_intraday_payload",
|
|
81
|
+
"parse_today_intraday_payload",
|
|
82
|
+
"recent_historical_intraday_date_selector",
|
|
83
|
+
"recent_historical_intraday_trade_date_from_selector",
|
|
84
|
+
"split_code",
|
|
85
|
+
"time",
|
|
86
|
+
"timedelta",
|
|
87
|
+
"today_intraday_reserved_tail",
|
|
88
|
+
"yyyymmdd",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _load_command_impl():
|
|
93
|
+
global _command_impl
|
|
94
|
+
if _command_impl is None:
|
|
95
|
+
_command_impl = load_provider_first(_PROVIDER_MODULE)
|
|
96
|
+
return _command_impl
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def __getattr__(name: str) -> Any:
|
|
100
|
+
if name == "COMMAND_CODES":
|
|
101
|
+
return _command_codes()
|
|
102
|
+
if name == "DEFAULT_TODAY_INTRADAY_RESERVED_TAIL":
|
|
103
|
+
value = _load_defaults_impl().DEFAULT_TODAY_INTRADAY_RESERVED_TAIL
|
|
104
|
+
elif name == "RECENT_HISTORICAL_INTRADAY_DATE_BASE":
|
|
105
|
+
value = _load_defaults_impl().RECENT_HISTORICAL_INTRADAY_DATE_BASE
|
|
106
|
+
elif name == "TYPE_HISTORICAL_INTRADAY":
|
|
107
|
+
value = _command_code("historical_intraday")
|
|
108
|
+
elif name == "TYPE_RECENT_HISTORICAL_INTRADAY":
|
|
109
|
+
value = _command_code("recent_historical_intraday")
|
|
110
|
+
elif name == "TYPE_TODAY_INTRADAY":
|
|
111
|
+
value = _command_code("today_intraday")
|
|
112
|
+
else:
|
|
113
|
+
if name.startswith("_"):
|
|
114
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
115
|
+
implementation = _load_command_impl()
|
|
116
|
+
value = getattr(implementation, name)
|
|
117
|
+
globals()[name] = value
|
|
118
|
+
return value
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def __dir__() -> list[str]:
|
|
122
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.klines.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
Lightweight command code facts are exposed without loading the full K-line
|
|
5
|
+
command parser; other legacy names still load provider-first on demand.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import math
|
|
11
|
+
import re
|
|
12
|
+
from datetime import date, datetime, timedelta, timezone
|
|
13
|
+
from typing import Any
|
|
14
|
+
|
|
15
|
+
from ..._shim import load_provider_first, load_provider_first_cached
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire.protocol.commands.klines"
|
|
19
|
+
_PROVIDER_CODES_MODULE = "axdata_source_tdx._tdx_wire._command_codes"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
_codes_impl = None
|
|
23
|
+
_command_impl = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _load_codes_impl():
|
|
27
|
+
return load_provider_first_cached(globals(), "_codes_impl", _PROVIDER_CODES_MODULE)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _command_codes() -> dict[str, int]:
|
|
31
|
+
command_codes = _load_codes_impl().COMMAND_CODES
|
|
32
|
+
globals()["COMMAND_CODES"] = command_codes
|
|
33
|
+
return command_codes
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _command_code(name: str) -> int:
|
|
37
|
+
return _load_codes_impl().command_code(name)
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"ADJUST_TO_RAW",
|
|
41
|
+
"Any",
|
|
42
|
+
"COMMAND_CODES",
|
|
43
|
+
"KlineBar",
|
|
44
|
+
"KlineSeries",
|
|
45
|
+
"PERIOD_ALIASES",
|
|
46
|
+
"ProtocolError",
|
|
47
|
+
"RAW_TO_ADJUST",
|
|
48
|
+
"RequestFrame",
|
|
49
|
+
"ResponseFrame",
|
|
50
|
+
"SHANGHAI_TZ",
|
|
51
|
+
"TYPE_KLINES",
|
|
52
|
+
"annotations",
|
|
53
|
+
"build_klines_frame",
|
|
54
|
+
"consume_tdx_signed_varint",
|
|
55
|
+
"consume_varint",
|
|
56
|
+
"date",
|
|
57
|
+
"date_from_yyyymmdd",
|
|
58
|
+
"datetime",
|
|
59
|
+
"decode_compact_float",
|
|
60
|
+
"decode_kline_datetime",
|
|
61
|
+
"little_u16",
|
|
62
|
+
"little_u32",
|
|
63
|
+
"market_to_id",
|
|
64
|
+
"math",
|
|
65
|
+
"milli_to_float",
|
|
66
|
+
"normalize_adjust",
|
|
67
|
+
"normalize_anchor_date",
|
|
68
|
+
"normalize_code",
|
|
69
|
+
"normalize_period",
|
|
70
|
+
"parse_klines_payload",
|
|
71
|
+
"period_name",
|
|
72
|
+
"re",
|
|
73
|
+
"split_code",
|
|
74
|
+
"timedelta",
|
|
75
|
+
"timezone",
|
|
76
|
+
"yyyymmdd",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _load_command_impl():
|
|
81
|
+
global _command_impl
|
|
82
|
+
if _command_impl is None:
|
|
83
|
+
_command_impl = load_provider_first(_PROVIDER_MODULE)
|
|
84
|
+
return _command_impl
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def __getattr__(name: str) -> Any:
|
|
88
|
+
if name == "COMMAND_CODES":
|
|
89
|
+
return _command_codes()
|
|
90
|
+
if name == "TYPE_KLINES":
|
|
91
|
+
value = _command_code("klines")
|
|
92
|
+
else:
|
|
93
|
+
if name.startswith("_"):
|
|
94
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
95
|
+
implementation = _load_command_impl()
|
|
96
|
+
value = getattr(implementation, name)
|
|
97
|
+
globals()[name] = value
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def __dir__() -> list[str]:
|
|
102
|
+
return sorted(set(globals()) | set(__all__))
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Compatibility shim for axdata_core._tdx_wire.protocol.commands.lookup.
|
|
2
|
+
|
|
3
|
+
The provider-owned TDX wire implementation lives in ``axdata_source_tdx._tdx_wire``.
|
|
4
|
+
This module keeps old imports working by loading the TDX plugin on demand.
|
|
5
|
+
If the plugin is unavailable, attribute access raises a clear install/enable error.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from ..._shim import load_provider_first
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
_PROVIDER_MODULE = "axdata_source_tdx._tdx_wire._command_lookup"
|
|
14
|
+
|
|
15
|
+
__all__ = ["command_code"]
|
|
16
|
+
|
|
17
|
+
_impl = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _load_impl():
|
|
21
|
+
global _impl
|
|
22
|
+
if _impl is None:
|
|
23
|
+
_impl = load_provider_first(_PROVIDER_MODULE)
|
|
24
|
+
return _impl
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def __getattr__(name: str):
|
|
28
|
+
if name not in __all__:
|
|
29
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
30
|
+
value = getattr(_load_impl(), name)
|
|
31
|
+
globals()[name] = value
|
|
32
|
+
return value
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def __dir__() -> list[str]:
|
|
36
|
+
return sorted(set(globals()) | set(__all__))
|