Openclaw-data-china-stock openclaw-data-china-stock
A-share/ETF/Option market data collection plugin for OpenClaw.
install
source · Clone the upstream repo
git clone https://github.com/shaoxing-xie/openclaw-data-china-stock
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/shaoxing-xie/openclaw-data-china-stock ~/.claude/skills/shaoxing-xie-openclaw-data-china-stock-openclaw-data-china-stock
OpenClaw · Install into ~/.openclaw/skills/
git clone --depth=1 https://github.com/shaoxing-xie/openclaw-data-china-stock ~/.openclaw/skills/shaoxing-xie-openclaw-data-china-stock-openclaw-data-china-stock
manifest:
SKILL.mdsource content
OpenClaw Data China Stock
This plugin provides a ClawHub/OpenClaw compatible toolset for collecting A-share, ETF, and listed option data.
Key tools
: Cross-asset unified entry (recommended).tool_fetch_market_data
/tool_fetch_index_data
/tool_fetch_etf_data
: Compatibility/alias unified entries.tool_fetch_option_data
: Fetch option contracts by underlying.tool_get_option_contracts
/tool_read_market_data
: Read previously cached Parquet data (when enabled).tool_read_*
Paired skill suite
skills/china-macro-analyst/SKILL.mdskills/technical-analyst/SKILL.mdskills/market-scanner/SKILL.mdskills/market-sentinel/SKILL.mdskills/fund-flow-analyst/SKILL.md
(MVP mode)skills/strategy-backtester/SKILL.mdskills/fundamental-analyst/SKILL.md
China macro analyst tools
- Primary:
/tool_fetch_macro_datatool_fetch_macro_snapshot - Compatibility wrappers:
(21 tools; kept for backward compatibility)tool_fetch_macro_* - Skill:
(institutional 4-section narrative template; rules inskills/china-macro-analyst/SKILL.md
)macro_config.yaml
Multi-factor equity screening (A-share)
: Single entry for oscillation/trend templates (e.g.tool_screen_equity_factors
,reversal_5d
,fund_flow_3d
) oversector_momentum_5d
; returnshs300|zz500|zz1000|a_share|custom
,quality_score
,degraded
, optionalconfig_hash
stats. Implemented insw_mapping
; registered inplugins/analysis/equity_factor_screening.py
/tool_runner.py
(+ JSON). JSON Schema:config/tools_manifest.yaml
.docs/schemas/tool_screen_equity_factors.schema.json
: Batch runner includestool_batch_fetch
(seetool_screen_equity_factors
whitelist).plugins/merged/tool_batch_fetch.py- 申万一级映射:
,由config/sw_industry_level1_mapping.json
生成(默认乐咕乐股scripts/update_sw_industry_level1_mapping.py
+sw_index_first_info
;可选sw_index_third_cons
走东财快照)。消费侧:SW_MAP_USE_EM_SPOT=1
。plugins/analysis/sw_industry_mapping.py
助手侧夜盘落盘、质量门禁与熔断工具(
tool_finalize_screening_nightly / tool_set_screening_emergency_pause)在 etf-options-ai-assistant 仓库注册;规程 Skill ota_equity_factor_screening_brief 仅在该助手仓维护并同步到 Gateway。
Fund-flow tools (pick one job, do not duplicate)
: Single-stock summary for workflows that needtool_capital_flow
/flow_judgement
style outputs (e.g. limit-up strategies).risk_flags
: Tabular / ranking / history for onshore A-share money flow (tool_fetch_a_share_fund_flow
selects market/sector/stock tables, big deals, main-force ranks, sector drill-down). Uses Eastmoney/Tonghuashun-style AkShare routes with an explicit attempt chain; raw data is not investment advice.query_kind
: Stock Connect northbound flows (cross-border), separate from onshore A-share flow tools—keep narratives and citations distinct.tool_fetch_northbound_flow
: Tonghuashun-style technical stock screeners (new highs, consecutive up days, volume patterns, MA breakouts, etc.) via AkSharetool_fetch_a_share_technical_screener
—not the same as locally computed MACD/RSI from OHLC (usestock_rank_*_ths
/tool_stock_data_fetcher
for those).tool_calculate_technical_indicators
Safety and independence
The plugin is designed to run independently (no dependency on any other repository):
- It does not inject
.~/.openclaw/.env - It supports plugin-specific cache/data paths (configured inside the plugin).
Why it helps retail users
- Unified cross-asset entry (
) to reduce “tool switching” friction.tool_fetch_market_data - Multi-source provider priority + automatic fallback to avoid single-provider outages breaking your workflow.
- Default read-only disk cache semantics (
) to minimize local data pollution risk.data_cache.enabled=false
Typical usage
Example: fetch A-share index daily historical data:
tools: - name: tool_fetch_market_data params: asset_type: index view: historical asset_code: "000001" period: daily start_date: "20260201" end_date: "20260228"
Example: fetch ETF 5-minute bars:
tools: - name: tool_fetch_market_data params: asset_type: etf view: minute asset_code: "510300" period: "5" start_date: "20260201" end_date: "20260228"
Example: fetch latest CPI and use macro snapshot:
tools: - name: tool_fetch_macro_data params: dataset: cpi latest_only: true - name: tool_fetch_macro_snapshot params: scope: monthly include_quadrant: true
Cache policy
- Default:
data_cache.enabled=false- Disk parquet reads are allowed (if cache exists).
- Disk parquet writes are skipped.
- Corrupted parquet files are not deleted in this mode.
data_cache.enabled=true- Disk parquet reads and writes are both enabled.