# 基金净值明细

- 接口：get_fund_net_value
- 路径：/api/v1/market/data/fund/fund-net-value
- 方法：GET
- 描述：按 `fund_code` 查询基金净值明细。`nav_date` 单日或 `start_date`/`end_date` 区间（互斥）。返回分页结构（items/total_pages/total_items），含发布/净值日期、资产净值、单位净值、单位净值增长率、累计净值、复权因子、复权单位净值、复权单位净值增长率、每万份基金收益、7 日年化等 14 个字段。
- 数据范围：按交易日查询
- 单次限量：默认 `page=1`/`page_size=50`；上限 200
- 提示：
  - `fund_code` 必填。
  - `nav_date` 与 `start_date`+`end_date` 互斥；建议传 `start_date`+`end_date` 区间，不传日期参数时可能返回系统错误。

## 输入参数

| 名称 | 类型 | 必选 | 描述 |
|------|------|------|------|
| fund_code | string | Y | 基金代码 |
| nav_date | integer | N | 净值日期 YYYYMMDD（与 start/end 互斥） |
| start_date | integer | N | 净值开始日期 YYYYMMDD（需与 end_date 同传） |
| end_date | integer | N | 净值结束日期 YYYYMMDD |
| 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 | 交易代码 |
| publish_date | integer | Y | 发布日期 YYYYMMDD |
| nav_date | integer | Y | 净值日期 YYYYMMDD |
| net_asset | string | Y | 资产净值 |
| unit_nav | string | Y | 单位净值 |
| unit_nav_growth | string | Y | 单位净值增长率（%） |
| accumulated_nav | string | Y | 累计净值 |
| adjustment_factor | string | Y | 复权因子 |
| adjusted_unit_nav | string | Y | 复权单位净值 |
| adjusted_unit_nav_growth | string | Y | 复权单位净值增长率（%） |
| daily_profit | string | Y | 每万份基金收益 |
| seven_day_annualized_return | string | Y | 7 日年化收益率 |

## 接口示例

```bash
curl -sS "https://market.ft.tech/gateway/api/v1/market/data/fund/fund-net-value?fund_code=000001&start_date=20260710&end_date=20260717&page=1&page_size=5"
```

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

```python
import ftshare as ft

market = ft.market_api()

# 查询指定净值日期
rows = market.fund_net_value(fund_code="000001", nav_date=20260716)
print(rows)

# 查询净值日期区间，限制返回条数
rows = market.fund_net_value(
    fund_code="000001", start_date=20260710, end_date=20260717, limit=5
)

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

## 数据样例

`fund_code=000001&start_date=20260710&end_date=20260717`（华夏成长混合A），节选核心列（fund_code/fund_name/trade_code/net_asset/daily_profit 等列省略）：

| publish_date | nav_date | unit_nav | unit_nav_growth | accumulated_nav | adjustment_factor | adjusted_unit_nav |
|--------------|----------|----------|-----------------|-----------------|-------------------|-------------------|
| 20260717 | 20260716 | 1.403 | -3.9041 | 3.976 | 6.5036 | 9.1246 |
| 20260716 | 20260715 | 1.46 | -3.3113 | 4.033 | 6.5036 | 9.4953 |
| 20260715 | 20260714 | 1.51 | 1.2743 | 4.083 | 6.5036 | 9.8205 |
| 20260714 | 20260713 | 1.491 | -2.3576 | 4.064 | 6.5036 | 9.6969 |
| ... | ... | ... | ... | ... | ... | ... |
