# 基金列表

- 接口：get_fund_list
- 路径：/api/v1/market/data/fund/fund-list
- 方法：GET
- 描述：分页查询公募基金基础列表。可按 `fund_code` 查单只、按 `fund_type` 过滤。返回分页结构（items/total_pages/total_items），含基金代码、名称、交易代码、基金公司、经理、托管人、运作方式、类型、成立日期、成立规模、上市日期、存续起止、业绩基准、最低申购/认购金额等 16 个字段。结果按基金代码升序；按 `fund_code` 命中单只时返回单条。
- 数据范围：最新快照，无时间维度
- 单次限量：默认 `page=1`/`page_size=50`；`page_size` 上限 200
- 提示：
  - `fund_code` 精确查单只，命中返回单条（total_pages=1）。
  - `fund_type` 为自由字符串精确匹配（如 `股票型`/`混合型`/`债券型`/`货币型`/`保本型`/`其他型`/`REITs`），无枚举校验。
  - `listed_date` 为 0 表示未上市；`established_size`/`min_purchase_amount`/`min_subscription_amount` 以字符串返回，保持精度。

## 输入参数

| 名称 | 类型 | 必选 | 描述 |
|------|------|------|------|
| fund_code | string | N | 基金代码 |
| fund_type | string | N | 基金类型，精确匹配（股票型/混合型/债券型/货币型/保本型/其他型/REITs） |
| page | integer | N | 页码，默认 1 |
| page_size | integer | N | 每页条数，默认 50，上限 200 |


## 输出参数
成功响应外层固定为 `code`、`message`、`data`：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| code | integer | Y | HTTP 状态码；成功固定为 200 |
| message | string | Y | 成功固定为 `success`；失败时为中文错误信息 |
| data | object / null | Y | 成功时为业务数据对象；失败时为 `null`。其字段如下 |

data 对象：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| items | array | Y | 基金列表 |
| total_pages | integer | Y | 总页数 |
| total_items | integer | Y | 总记录数 |

items 数组：

| 名称 | 类型 | 默认显示 | 描述 |
|------|------|---------|------|
| fund_code | string | Y | 基金代码 |
| fund_name | string | Y | 基金名称 |
| trade_code | string | Y | 交易代码 |
| fund_company | string | Y | 基金公司 |
| fund_manager | string | Y | 基金经理 |
| custodian | string | Y | 托管人 |
| operation_mode | string | Y | 运作方式 |
| fund_type | string | Y | 基金类型 |
| established_date | integer | Y | 成立日期 YYYYMMDD |
| established_size | string | Y | 成立规模（元） |
| listed_date | integer | Y | 上市日期 YYYYMMDD（0=未上市） |
| start_date | integer | Y | 存续期起始日 |
| end_date | integer | Y | 存续期截止日 |
| benchmark | string | Y | 业绩比较基准 |
| min_purchase_amount | string | Y | 最低申购金额 |
| min_subscription_amount | string | Y | 最低认购金额 |

## 接口示例

```bash
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/fund/fund-list?page=1&page_size=5"
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/fund/fund-list?fund_type=股票型&page=1&page_size=5"
```

Python（[`ftshare`](https://github.com/FTShare-Lab/FTShare-python-sdk.git) SDK，方法 `market.fund_list`，默认返回 pandas `DataFrame`）：

```python
import ftshare as ft

market = ft.market_api()

# 查询基金列表，限制返回条数
rows = market.fund_list(limit=10)
print(rows)

# 按基金类型查询
rows = market.fund_list(fund_type="股票型", limit=10)

# 返回原始 JSON
payload = market.fund_list(fund_code="000001", raw=True)
```

## 数据样例

`page=1&page_size=4`，节选核心列（fund_manager/custodian/operation_mode/benchmark 等列省略）：

| fund_code | fund_name | trade_code | fund_company | fund_type | established_date | established_size | min_purchase_amount |
|-----------|-----------|------------|--------------|-----------|------------------|------------------|---------------------|
| 000014J | 华夏一年定开债券 | 000014J.OF | 华夏基金 | 债券型 | 20130319 | 4075949297.03 | 1000 |
| 000028J | 华富保本混合 | 000028J.OF | 华富基金 | 保本型 | 20130424 | 526218773.24 | 1000 |
| 000030J | 长城久利保本 | 000030J.OF | 长城基金 | 保本型 | 20130418 | 937036422.41 | 10 |
| ... | ... | ... | ... | ... | ... | ... | ... |
