Scope of functions
1. Supported query object scope
- Stocks (A-shares, Hong Kong stocks, US stocks)
- Sectors, indices, shareholders
- Corporate issuers, bonds, unlisted companies
- Stock market, fund market, bond market
2. Supported query data types
Supports querying the following types of structured data:
- Real-time quotes(current price, price change, order book data, etc.)
- Quantitative data(technical indicators, capital flows, etc.)
- Statement data(revenue, net profit, financial ratios, etc.)
3. Supported query methods andstrict limits
Supports combined queries with multiple entities, multiple indicators, and multiple time ranges.Due to backend interface limitations, a single query must comply with the following quotas:
- Entity upper limit: a single query supports at most 5 stocks/financial entities.
- Processing logic: If a user request exceeds the above limit, the Skill will prioritize the first 5 entities and provide a notice in the result description file.
Example: "Query the revenue of six stocks A, B, C, D, E, and F" -> only the first five are returned.
4. Output results
After execution, the Skill outputs the following files:
- One query result
xlsxfile, used to carry the structured query results - One result description
txtfile, used to describe the query content, meaning of the results, and necessary explanations
Query examples
Basic indicator query
- East Money's fundamentals
- Kweichow Moutai's operating revenue and net profit for the most recent year
- Performance of semiconductor ETFs
Real-time quotes and order book query
- Current real-time buy orders for 300059
- NVIDIA's current latest price and price change
- CSI 300's current level and turnover
Multi-entity, multi-indicator, multi-time query (note the quota)
- Compliant example: Compare the gains since the Spring Festival of the ChiNext Index, CSI 300, and CSI 500 (3 entities) (1 indicator).
- Compliant example: East Money and Pinduoduo (2 entities)'s revenue, gross profit, and net profit for the most recent year (3 indicators).
- Over-limit notice: If querying the "PE of the top ten weighted stocks in Shanghai and Shenzhen," the system will take the top 5 for the query.
Supplementary notes
- This Skill is oriented toward financial structured data and relational data queries, and does not focus on subjective analysis, investment advice, or news interpretation.
- The statement must contain explicit financial entity names.
- When users initiate queries in natural language, the Skill can identify the query objects, indicators, and time ranges based on the question content, and output structured result files.
- For query requests within the supported scope, prioritize outputting structured query results and simultaneously generate a result explanation file for subsequent use.
3. Install dependencies
pip3 install httpx pandas openpyxl --user
Quick start
Execute in the working directory
python3 {baseDir}/scripts/get_data.py --query "贵州茅台近期走势如何"
Output example
xlsx: /path/to/miaoxiang/mx_finance_data/mx_finance_data_9535fe18.xlsx
描述: /path/to/miaoxiang/mx_finance_data/mx_finance_data_9535fe18_description.txt
行数: 42
Output file description
| File | Description |
|---|---|
mx_finance_data_<查询id>.xlsx |
Structured data table containing the requested entities and metrics |
mx_finance_data_<查询id>_description.txt |
Includes query logic description, field meanings, andquota truncation notice |