ths-advanced-analysis
基于 thsdk 进行高级股票分析:分钟K线(1m/5m/15m/30m/60m/120m)、板块/指数行情(主要指数/申万行业/概念板块成分股)、多股票批量对比(表格+归一化走势图+相关性热力图)、盘口深度、大单流向、集合竞价异动、日内分时、历史分时。当用户提到"分钟K线"、"日内走势"、"盘口"、"大单"、"竞价异动"、"板块行情"、"行业排名"、"概念板块"、"成分股"、"对比多只股票"、"批量分析"、"涨幅对比"、"相关性"、"港股"、"美股"、"外汇"、"期货"、"资讯"、"快讯",或者需要同时查看2只以上股票、关注短线交易、量化研究时,必须使用此skill。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bensema/ths-advanced-analysisWhat This Skill Does
The ths-advanced-analysis skill is a robust financial analysis toolkit designed for OpenClaw agents, built upon the powerful thsdk library. It provides high-level financial data processing and visualization capabilities, ranging from technical analysis of stock price movements (including 1m to 120m interval K-lines) to macro-level market overview via industry indices and concept sectors. The skill is engineered to handle complex requirements like cross-asset comparison (including correlation heatmaps), intraday auction monitoring, big-order flow tracking, and institutional-grade depth analysis. It serves as a comprehensive bridge between raw market data and actionable investment insights.
Installation
To integrate this skill into your environment, use the OpenClaw management command:
clawhub install openclaw/skills/skills/bensema/ths-advanced-analysis
Ensure your local environment meets the requirements (Python 3.9+). For direct library dependencies, you may also install the underlying SDK via pip install --upgrade thsdk. Ensure that the THS connection context is properly managed within your code using the provided with THS() as ths: pattern to ensure thread safety and handle API sessions correctly.
Use Cases
- Quantitative Research: Execute batch data requests for multiple tickers to generate normalized trend charts and correlation heatmaps to identify asset relationships.
- Short-Term Trading: Utilize real-time
depthandbig_order_flowanalysis to monitor market microstructure and detect anomalies in call-auction sessions. - Market Sentiment Analysis: Leverage the
wencai_nlpintegration to filter stocks based on complex technical indicators (e.g., MACD golden cross) or fundamental criteria (e.g., ROE thresholds). - Industry Rotation Strategy: Automatically pull sector constituents and benchmark them against major indices to evaluate relative strength.
Example Prompts
- "Analyze the 5-minute K-line of CATL and check for any recent large-order inflows."
- "Compare the trend performance of BYD, NIO, and XPeng over the last month and show me a correlation heatmap."
- "Find me the current top-performing stocks in the AI concept sector using Wencai and provide their current 5-level market depth."
Tips & Limitations
- Clarification is Key: When a user request is ambiguous (e.g., "Analyze stock X"), always prompt the user to specify whether they need technical data, funding flow, or institutional research. This prevents irrelevant data overload.
- Asset Mapping: Always use the
search_symbolsmethod before executing data pulls. The system relies on specificTHSCODEprefixes (e.g.,USHAfor Shanghai A-shares,URFIfor sectors). Do not assume ticker symbols are universal. - Data Volume: For batch operations involving more than 10 stocks, consider using pagination or batch processing to avoid latency issues in the underlying SDK interface.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bensema-ths-advanced-analysis": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, code-execution
Related Skills
问财选ETF
同花顺智能选ETF skill。根据行情、跟踪指数基本面、规模、风格类型等条件筛选ETF。返回符合条件的相关ETF数据。当用户询问ETF筛选问题时,必须使用此技能。
tdx-stock-query
基于TDX API的股票数据查询技能,提供全面的A股市场数据查询功能,包括实时行情、K线数据、分时数据、分时成交、股票搜索、指数数据、ETF数据、市场统计、个股新闻、股票公告等31个API接口。当用户询问股票相关信息时调用。
ths-financial-data
该skill用于获取股票市场数据,包括实时行情、中文名称查询、键盘缩写转换、资金流向和日K线数据。使用thsdk库提供同花顺数据接口支持。支持自动将中文、缩写、短代码转换为thsdk所需的完整ths_code格式。当匹配到多只股票时,会返回候选列表供用户选择。如未安装thsdk,会自动安装。
ohmyths
使用 thsdk 查询A股/港股/美股等金融市场数据的技能。Stop and use this skill whenever the user asks anything about stocks, markets, or financial data in Chinese or English. 必须触发的场景包括:【单股查询】「XXX股票近日走势」「XXX怎么样」「帮我看看XXX」「查一下XXX的K线」「XXX今天涨了多少」「XXX最近表现」「XXX的分时图」「XXX的盘口深度」「XXX的资讯」「XXX大单情况」「XXX分红历史」;【选股筛股】「涨停的股票」「今日成交量放大的股票」「市盈率低于20的股票」「问财选股」任何条件筛选类问题;【市场概览】「今日新股」「待上市IPO」「竞价异动」「涨停试盘」「今天有什么行情」;【板块数据】「XX行业板块」「XX概念股有哪些」「XX指数成分股」「沪深300成分股」;【列表查询】「A股有哪些股票」「港股列表」「ETF基金列表」「期货列表」。所有查询统一通过 scripts/ 下封装脚本调用,核心流程:先 search_symbols 查代码,再调用对应数据接口。