mx-select-stock
v1.0.0基于妙想 (Meixiang) 智能选股 API,按用户提供的指标、行业或板块条件筛选 A 股、港股、美股等股票,返回完整 CSV 数据并提供列说明,避免使用过时的金融信息。
Installation
Please help me install the skill `mx-select-stock` from SkillHub official store.
npx skills add xpmars/mx-select-stock
妙想智能选股 Skill (mx_select_stock)
Overview
This skill enables safe, up‑to‑date stock screening using the Meixiang (妙想) stock‑screening service. It supports custom filters on market, financial indicators, and sector/category constraints, returning a full data table (CSV) with Chinese column headers and a supplemental description file.
Prerequisites
- Obtain an API key from the Meixiang Skills page.
- Export the key to the environment variable
MX_APIKEY:bash export MX_APIKEY="your_api_key_here" - Ensure
curlis installed (standard on macOS).
Usage Steps
- Formulate the query – translate the user’s natural‑language request into a JSON payload containing at least:
keyword– the screening condition (e.g., "今日涨幅2%的股票")pageNo– page number (default 1)pageSize– number of rows per page (max 100, adjust as needed)- Execute the POST request:
bash curl -X POST --location 'https://mkapi2.dfcfs.com/finskillshub/api/claw/stock-screen' --header 'Content-Type: application/json' --header "apikey:${MX_APIKEY}" --data '{"keyword":"<YOUR_KEYWORD>","pageNo":1,"pageSize":20}' - Parse the JSON response – important fields:
status/message– overall request success.data.code/data.msg– business‑level status.data.data.result.columns– column definitions.data.data.result.dataList– rows of stock data.responseConditionList– condition statistics.- Transform column titles – map each
keyto its Chinesetitlefrom thecolumnsarray, then build a CSV where the header line uses the Chinese titles. - Save output (optional):
```bash
# Save raw JSON
curl ... > mx_select_stock_raw.json
# Save CSV