SkillHub

mx-select-stock

v1.0.0

基于妙想 (Meixiang) 智能选股 API,按用户提供的指标、行业或板块条件筛选 A 股、港股、美股等股票,返回完整 CSV 数据并提供列说明,避免使用过时的金融信息。

Sourced from ClawHub, Authored by xpmars

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

  1. Obtain an API key from the Meixiang Skills page.
  2. Export the key to the environment variable MX_APIKEY: bash export MX_APIKEY="your_api_key_here"
  3. Ensure curl is installed (standard on macOS).

Usage Steps

  1. Formulate the query – translate the user’s natural‑language request into a JSON payload containing at least:
  2. keyword – the screening condition (e.g., "今日涨幅2%的股票")
  3. pageNo – page number (default 1)
  4. pageSize – number of rows per page (max 100, adjust as needed)
  5. 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}'
  6. Parse the JSON response – important fields:
  7. status / message – overall request success.
  8. data.code / data.msg – business‑level status.
  9. data.data.result.columns – column definitions.
  10. data.data.result.dataList – rows of stock data.
  11. responseConditionList – condition statistics.
  12. Transform column titles – map each key to its Chinese title from the columns array, then build a CSV where the header line uses the Chinese titles.
  13. Save output (optional): ```bash # Save raw JSON curl ... > mx_select_stock_raw.json # Save CSV