> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alphafin.x-pai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic info

# 股票基本信息

获取单个或多个股票的基本信息，包括公司名称、股票代码、交易所、行业分类等。

## 接口说明

### HTTP请求

```
GET /v1/stock/basic-info
```

### 请求参数

| 参数名      | 类型  | 必选 | 描述                                                                |
| -------- | --- | -- | ----------------------------------------------------------------- |
| `symbol` | 字符串 | 是  | 股票代码，可以是单个代码或以逗号分隔的多个代码。支持多种格式，如`600519`、`sh.600519`或`600519.SH`。 |
| `fields` | 字符串 | 否  | 指定返回字段，用逗号分隔。如果未指定，返回所有可用字段。                                      |

### 返回字段

| 字段名                      | 类型  | 描述                                |
| ------------------------ | --- | --------------------------------- |
| `symbol`                 | 字符串 | 股票代码                              |
| `name`                   | 字符串 | 股票名称                              |
| `exchange`               | 字符串 | 交易所代码（SSE:上交所, SZSE:深交所, BSE:北交所） |
| `exchange_name`          | 字符串 | 交易所名称                             |
| `industry`               | 字符串 | 所属行业（申万一级行业）                      |
| `subindustry`            | 字符串 | 所属子行业（申万二级行业）                     |
| `listing_date`           | 字符串 | 上市日期，格式为YYYY-MM-DD                |
| `delisting_date`         | 字符串 | 退市日期，格式为YYYY-MM-DD，未退市则为null      |
| `status`                 | 字符串 | 上市状态（上市、暂停、退市等）                   |
| `market_cap`             | 数值  | 市值（元）                             |
| `circulating_market_cap` | 数值  | 流通市值（元）                           |
| `issued_shares`          | 数值  | 总股本（股）                            |
| `circulating_shares`     | 数值  | 流通股本（股）                           |
| `par_value`              | 数值  | 每股面值（元）                           |
| `description`            | 字符串 | 公司简介                              |
| `website`                | 字符串 | 公司官网                              |
| `region`                 | 字符串 | 所在地区                              |
| `address`                | 字符串 | 公司地址                              |
| `chairman`               | 字符串 | 董事长                               |
| `general_manager`        | 字符串 | 总经理                               |
| `secretary`              | 字符串 | 董事会秘书                             |
| `established_date`       | 字符串 | 成立日期                              |
| `registered_capital`     | 数值  | 注册资本（元）                           |
| `organization_code`      | 字符串 | 组织机构代码                            |
| `business_scope`         | 字符串 | 经营范围                              |

## 示例

### 请求示例

#### 获取单个股票的基本信息

```bash theme={null}
curl -X GET "https://api.alphafin.x-pai.com/v1/stock/basic-info?symbol=600519" \
  -H "X-API-KEY: your_api_key_here"
```

#### 获取多个股票的基本信息

```bash theme={null}
curl -X GET "https://api.alphafin.x-pai.com/v1/stock/basic-info?symbol=600519,000858,300750" \
  -H "X-API-KEY: your_api_key_here"
```

#### 获取指定字段

```bash theme={null}
curl -X GET "https://api.alphafin.x-pai.com/v1/stock/basic-info?symbol=600519&fields=symbol,name,industry,market_cap" \
  -H "X-API-KEY: your_api_key_here"
```

### 响应示例

#### 单个股票响应

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "symbol": "600519",
    "name": "贵州茅台",
    "exchange": "SSE",
    "exchange_name": "上海证券交易所",
    "industry": "食品饮料",
    "subindustry": "白酒",
    "listing_date": "2001-08-27",
    "delisting_date": null,
    "status": "上市",
    "market_cap": 2187650000000,
    "circulating_market_cap": 2187650000000,
    "issued_shares": 1256197800,
    "circulating_shares": 1256197800,
    "par_value": 1.0,
    "description": "贵州茅台酒股份有限公司是中国贵州省仁怀市茅台镇生产和销售茅台酒的上市公司。",
    "website": "http://www.moutaichina.com/",
    "region": "贵州",
    "address": "贵州省仁怀市茅台镇",
    "chairman": "丁雄军",
    "general_manager": "李静仁",
    "secretary": "蒋焰",
    "established_date": "1999-11-20",
    "registered_capital": 1256197800,
    "organization_code": "915200002144039458",
    "business_scope": "酱香型白酒的生产与销售；饮料、食品、包装材料的生产、销售；防伪技术开发、信息产业相关产品的研制、开发；酒店经营管理、住宿、餐饮、娱乐、洗浴及停车场管理服务（限下属子公司经营）等。"
  }
}
```

#### 多个股票响应

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": [
    {
      "symbol": "600519",
      "name": "贵州茅台",
      "exchange": "SSE",
      "exchange_name": "上海证券交易所",
      "industry": "食品饮料",
      "subindustry": "白酒",
      "listing_date": "2001-08-27",
      "delisting_date": null,
      "status": "上市",
      "market_cap": 2187650000000,
      "circulating_market_cap": 2187650000000,
      "issued_shares": 1256197800,
      "circulating_shares": 1256197800,
      "par_value": 1.0,
      "description": "贵州茅台酒股份有限公司是中国贵州省仁怀市茅台镇生产和销售茅台酒的上市公司。"
      // 更多字段...
    },
    {
      "symbol": "000858",
      "name": "五粮液",
      "exchange": "SZSE",
      "exchange_name": "深圳证券交易所",
      "industry": "食品饮料",
      "subindustry": "白酒",
      "listing_date": "1998-04-27",
      "delisting_date": null,
      "status": "上市",
      "market_cap": 578023000000,
      "circulating_market_cap": 578023000000,
      "issued_shares": 3881608005,
      "circulating_shares": 3881608005,
      "par_value": 1.0,
      "description": "宜宾五粮液股份有限公司是中国四川省宜宾市的一家白酒生产企业。"
      // 更多字段...
    },
    {
      "symbol": "300750",
      "name": "宁德时代",
      "exchange": "SZSE",
      "exchange_name": "深圳证券交易所",
      "industry": "电子",
      "subindustry": "电池",
      "listing_date": "2018-06-11",
      "delisting_date": null,
      "status": "上市",
      "market_cap": 1065340000000,
      "circulating_market_cap": 823263000000,
      "issued_shares": 2329474028,
      "circulating_shares": 1800574028,
      "par_value": 1.0,
      "description": "宁德时代新能源科技股份有限公司是全球领先的锂离子电池供应商。"
      // 更多字段...
    }
  ]
}
```

#### 指定字段响应

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "symbol": "600519",
    "name": "贵州茅台",
    "industry": "食品饮料",
    "market_cap": 2187650000000
  }
}
```

## 错误码

除了通用错误码外，此接口还可能返回以下错误码：

| 错误码                | 描述                     |
| ------------------ | ---------------------- |
| `invalid_symbol`   | 无效的股票代码                |
| `too_many_symbols` | 请求的股票代码数量超过上限（最多支持50个） |
| `invalid_field`    | 无效的字段名                 |

## 注意事项

1. 市值数据为最近一个交易日的收盘数据
2. 单次请求最多支持50个股票代码
3. 部分字段可能因数据来源限制而缺失或为null
