# 基金公司

- 接口：get_fund_company
- 路径：/api/v1/market/data/fund/fund-company
- 方法：GET
- 描述：分页查询基金公司列表及名下基金数量，可按 `fund_company` 名称精确过滤。按公司名升序排列，并始终过滤掉公司名为空的记录。返回分页结构（items/total_pages/total_items），仅含公司名与基金数 2 个字段。
- 数据范围：最新快照，无时间维度
- 单次限量：默认 `page=1`/`page_size=50`；上限 200
- 提示：
  - `fund_company` 按公司名称精确匹配过滤。
  - 仅返回 `fund_company`、`fund_count` 两个字段（无公司 ID）。

## 输入参数

| 名称 | 类型 | 必选 | 描述 |
|------|------|------|------|
| fund_company | string | N | 基金公司名称，精确匹配 |
| 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_company | string | Y | 基金公司名称 |
| fund_count | integer | Y | 基金数量 |

## 接口示例

```bash
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/fund/fund-company?page=1&page_size=5"
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/fund/fund-company?fund_company=华夏基金&page=1&page_size=5"
```

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

```python
import ftshare as ft

market = ft.market_api()

# 查询基金公司列表
rows = market.fund_company(limit=10)
print(rows)

# 按公司名称精确查询
rows = market.fund_company(fund_company="华夏基金")

# 返回原始 JSON
payload = market.fund_company(fund_company="华夏基金", raw=True)
```

## 数据样例

`page=1&page_size=4`：

| fund_company | fund_count |
|-------------|------------|
| 万家基金 | 470 |
| 万联资管 | 1 |
| 上海证券 | 3 |
| ... | ... |
