AI Agent Hub
Back to skills
Westock Financial Data Query icon

Westock Financial Data Query

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

According to https://skillhub.cn/install/skillhub.md, install @tencent-adm/westock-data.

About this skill

The Specific Problem

In financial data analysis and application development, acquiring structured market data is a common but cumbersome task. Developers need to query stock quotes, financial reports, capital flows, and other information from sources like Tencent Stock Watchlist to build analytical models, monitoring dashboards, or backtest trading strategies. Directly interfacing with raw APIs can involve complex authentication, format parsing, and stability issues, while manually scraping data from websites is inefficient and vulnerable to site changes.

How It Works

The Tencent Stock Watchlist financial data query skill encapsulates the underlying data interface, offering service through a standardized command-line tool. Its core process revolves around the following key steps:

  1. Code Retrieval: Use the search command to locate asset codes based on names or keywords. The default type is stock, but you can explicitly specify searching for etf, index, sector, bond, futures, or forex via the --type parameter. For example, search 宁德时代 finds stocks, while search 沪深300 --type etf finds ETFs. Note: The search command does not support batch code queries.
  2. Data Acquisition: For different data dimensions, use the corresponding commands for queries. Common core commands include finance (financial data), kline (historical K-lines), report (announcements/reports), and fund flow (capital flows). A key capability is supporting batch operations: except for search, other commands typically support separating multiple stock codes with commas in a single command, e.g., finance sh600519,sz000651.
  3. Concurrency Optimization: To improve efficiency, the skill emphasizes concurrent execution. When multiple independent queries need to be executed (e.g., fetching quotes, financials, and capital flow simultaneously), they should be organized and issued in parallel within the same tool call round, rather than waiting sequentially for each result.
  4. Results and Error Handling: The tool returns structured data or clear error messages. For empty results, you need to judge based on the returned information whether it's due to an unsupported code or no data disclosure at that specific time point. The skill requires truthfully relaying failure information; fabricating data or switching to alternatives like web_search is strictly prohibited.

Applicable Boundaries and Notes

This skill is focused on financial data queries, but the following iron rules and limitations must be observed during use:

  • Data is Not Real-Time: Data returned by commands like kline may have delays. In any presentation, you must clearly annotate the data date, avoiding misleading terms like "current price" or "real-time changes".
  • Precise Currency Units: When querying Hong Kong or US stocks, data units are HKD/USD and USD respectively. The use of the Renminbi symbol ¥ in output is strictly prohibited.
  • Strict Batch Rules: When comparing multiple stocks, you should always use batch-capable commands and pass all codes at once. Mixing batch commands and per-stock split commands within the same analysis is forbidden. The sole exception is the search command, which accepts only a single keyword.
  • Clear Capability Scope: The skill primarily covers market data for individual stocks, ETFs, indices, sectors, etc. For macroeconomic data like GDP, CPI, or PMI, you must use the dedicated macro indicator command and cannot bypass it.
  • Intelligent but Limited Search: search will attempt at most one more asset type based on the original intent when no results are found, but it will not blindly try multiple types consecutively for the same keyword. If still no results, inform the user directly.
  • Compliance Statement: All data is sourced from the Tencent Stock Watchlist interface and is for reference only; it does not constitute any investment advice. Developers should include necessary risk warnings in their applications.

Use Cases

  • A quantitative strategy developer needs to batch-fetch historical K-line and capital flow data for multiple A-shares and Hong Kong stocks to build factors and validate signals in a local backtesting model.
  • A financial researcher or investment analyst needs to quickly retrieve and compare key metrics from the latest financial statements of multiple listed companies for horizontal comparative studies.
  • An individual investor or financial blogger analyzing a stock first needs to search for the correct trading code by name, then query its historical quotes and announcement information.
  • A data engineer needs to build a data pipeline to periodically pull real-time quotes and fund data for specific indices or ETFs from this skill to update an internal database.

Best For

  • Quantitative Strategy Developer: Needs to obtain clean, standardized multi-market financial time-series data for backtesting systems.
  • Fundamental Analyst/Researcher: Needs to efficiently retrieve and compare financial statements and operating data of listed companies to support investment decisions.
  • Financial Content Creator: Needs to cite accurate historical quotes and data to write analytical articles or produce video content.
  • Data Engineer at a FinTech Company: Needs to build a stable and reliable data collection module to provide financial data APIs for upper-layer applications.