Install
openclaw skills install a-stock-getSpecialized A-share stock data collector. Automatically fetch and store daily/weekly/monthly historical K-line data for all A-share stocks in SQLite database.
openclaw skills install a-stock-getEnglish | 中文
English:
A specialized data collection tool for Chinese A-share market. Automatically fetches and stores stock list, daily, weekly, and monthly historical K-line data into a local SQLite database. Designed specifically for quantitative analysts who need a complete local copy of A-share market data.
中文:
专门针对中国A股市场的数据获取工具。自动采集并存储股票列表、日线、周线、月线历史K线数据到本地SQLite数据库。专为需要完整A股本地数据副本的量化分析师设计。
English:
中文:
| Column / 字段 | Type / 类型 | Description / 说明 |
|---|---|---|
| code | TEXT | Stock code (e.g., 600519) / 股票代码 |
| name | TEXT | Stock name (e.g., 贵州茅台) / 股票名称 |
| market | TEXT | Market type (60/30/00) / 市场类型 |
| day_get | TIMESTAMP | Last daily data fetch time / 最后日线数据获取时间 |
| week_get | TIMESTAMP | Last weekly data fetch time / 最后周线数据获取时间 |
| month_get | TIMESTAMP | Last monthly data fetch time / 最后月线数据获取时间 |
| status | TEXT | Stock status (active/delisted) / 股票状态 |
| created_at | TIMESTAMP | Record creation time / 记录创建时间 |
English:
Run the initialization script to create the database and tables:
python scripts/init_db.py
中文:
运行初始化脚本创建数据库和表:
python scripts/init_db.py
English:
Fetch all tradable stocks from A-share markets:
python scripts/fetch_stocks.py
中文:
从A股市场获取所有可交易股票列表:
python scripts/fetch_stocks.py
English:
# Enhanced data fetching with external events
python scripts/day.py get all --limit 10
python scripts/week.py get all --limit 10
python scripts/month.py get all --limit 10
# Traditional usage (fetch all active stocks)
python scripts/day.py
python scripts/week.py
python scripts/month.py
# Database reset and fetch tool
python scripts/db_reset.py reset status
python scripts/db_reset.py fetch day 000001
# Parallel fetching for large batches
python scripts/day_parallel.py
python scripts/week_parallel.py
python scripts/month_parallel.py
中文:
# 增强版数据获取(支持外部事件)
python scripts/day.py get all --limit 10
python scripts/week.py get all --limit 10
python scripts/month.py get all --limit 10
# 传统用法(获取所有活跃股票)
python scripts/day.py
python scripts/week.py
python scripts/month.py
# 数据库重置与获取工具
python scripts/db_reset.py reset status
python scripts/db_reset.py fetch day 000001
# 并行获取大量数据
python scripts/day_parallel.py
python scripts/week_parallel.py
python scripts/month_parallel.py
a-stock-get/
├── SKILL.md # This documentation
├── scripts/
│ ├── init_db.py # Database initialization
│ ├── fetch_stocks.py # Fetch stock list from API
│ ├── day.py # Enhanced daily data fetch with external events
│ ├── day_original.py # Original daily data fetch (backup)
│ ├── day_parallel.py # Parallel daily data fetch
│ ├── db_reset.py # Database reset and fetch tool
│ ├── week.py # Enhanced weekly data fetch with external events
│ ├── week_original.py # Original weekly data fetch (backup)
│ ├── week_parallel.py # Parallel weekly data fetch
│ ├── month.py # Enhanced monthly data fetch with external events
│ ├── month_original.py # Original monthly data fetch (backup)
│ ├── month_parallel.py # Parallel monthly data fetch
│ ├── data_validation.py # Data validation and integrity check
│ ├── data_repair.py # Data repair tool
│ ├── schedule_config.py # OpenClaw cron job configuration
│ └── README.md # Detailed usage documentation
├── references/
│ └── data_sources.md # Data source documentation
└── D:\xistock\ # Data directory (external)
└── stock.db # SQLite database
English:
中文:
pip install requests
pip install sqlite3
pip install pandas
pip install akshare # Chinese stock data library
English:
D:\xistock\stock.db for data persistence中文:
D:\xistock\stock.db 确保数据持久化Version: 1.0.0
Last Updated: 2026-03-13
Author: jakey
Email: zhuxi0906@gmail.com
Wechat: jakeycis