Skip to content
Back to skills

Stock List All Stocks

ASecurity

获取所有股票代码列表。当用户需要获取所有 A 股股票的代码和名称列表,支持沪深京股票,自动返回最新交易日的数据,或了解所有股票代码列表时使用。

  • 65 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add FTShare-Lab/FTShare-skill --skill stock-list-all-stocks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stock List All Stocks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stock List All Stocks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ftshare-lab-stock-list-all-stocks/badge)](https://www.skillsdirectory.com/skills/ftshare-lab-stock-list-all-stocks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: stock-list-all-stocks
description: "获取所有股票代码列表。当用户需要获取所有 A 股股票的代码和名称列表,支持沪深京股票,自动返回最新交易日的数据,或了解所有股票代码列表时使用。"
---

# 获取所有股票代码列表

## 接口说明

| 项目 | 说明 |
|---|---|
| 接口名称 | 获取所有股票代码列表 |
| 外部接口 | `/api/v1/market/data/stock-list` |
| 请求方式 | GET |
| 适用场景 | 获取所有 A 股股票的代码和名称列表,支持沪深京股票,自动返回最新交易日的数据 |

## 请求参数

无需任何参数。

## 执行方式

通过根目录的 `run.py` 调用(推荐):

```bash
python <RUN_PY> stock-list-all-stocks
```

> `<RUN_PY>` 为主 `SKILL.md` 同级的 `run.py` 绝对路径,参见主 SKILL.md 的「调用方式」说明。

## 响应结构

```json
{
    "items": [
        {
            "stock_code": "000001.SZ",
            "stock_name": "平安银行"
        },
        {
            "stock_code": "000002.SZ",
            "stock_name": "万科A"
        }
    ]
}
```

### 字段说明

| 字段名 | 类型 | 是否可为空 | 说明 |
|---|---|---|---|
| `stock_code` | String | 否 | 股票交易代码,固定携带 `.SZ`/`.SH`/`.BJ` 市场后缀 |
| `stock_name` | String | 否 | 股票名称 |

## 注意事项

- 返回全量 A 股,数据量较大(通常 5000 条以上),按需筛选
- `stock_code` 固定含市场后缀,不要自行增减
- 当查询没有数据时,返回空数组 `[]`

Files in this skill

  • SKILL.md1.5 KB
  • scripts/handler.py1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…