Skip to content

feat: 添加同花顺基金基本信息接口#7242

Merged
albertandking merged 2 commits intoakfamily:devfrom
lilaboc:feature/fund-info-ths
May 2, 2026
Merged

feat: 添加同花顺基金基本信息接口#7242
albertandking merged 2 commits intoakfamily:devfrom
lilaboc:feature/fund-info-ths

Conversation

@lilaboc
Copy link
Copy Markdown
Contributor

@lilaboc lilaboc commented May 1, 2026

功能说明

添加了同花顺基金基本信息接口 fund_info_ths,使用 BeautifulSoup 解析同花顺基金网页获取完整的基金信息。

- 实现 `fund_info_ths` 函数
- 解析网页获取18条基金信息,包括管理费率、托管费率等
  • 修改 akshare/__init__.py
    • 添加 fund_info_ths 导入语句
  • 更新 docs/data/fund/fund_public.md
    • 添加接口文档

使用示例

import akshare as ak

# 获取基金基本信息
df = ak.fund_info_ths(symbol="161130")
print(df)

返回字段

- 基金代码简称全称类型
- 投资类型基金经理
- 成立日期成立规模份额规模
- 管理费率托管费率
- 基金管理人基金托管人
- 最高认购费申购费赎回费
- 业绩比较基准

测试

- 代码风格检查通过 (ruff)
- 功能测试通过 (测试了161130和000001两只基金)

lilaboc and others added 2 commits May 1, 2026 10:39
- 新增 fund_info_ths 函数,使用 BeautifulSoup 解析同花顺基金网页
- 获取完整的基金信息,包括管理费率、托管费率等18条信息
- 更新文档,添加接口使用说明

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
使用 r.content 和 from_encoding='utf-8' 来正确解析同花顺网页的中文内容

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@albertandking albertandking changed the base branch from main to dev May 2, 2026 08:18
@albertandking albertandking merged commit b51c91d into akfamily:dev May 2, 2026
12 checks passed
albertandking added a commit that referenced this pull request May 2, 2026
* feat(index): 为 stock_zh_index_daily_tx 函数添加自定义时间范围参数 (#7241)

- 添加 start_date 和 end_date 参数,允许用户获取指定时间范围内的历史数据。
- 更新了对应的文档,以反映新的参数和功能。

* feat: 添加同花顺基金基本信息接口 (#7242)

* feat: 添加同花顺基金基本信息接口

- 新增 fund_info_ths 函数,使用 BeautifulSoup 解析同花顺基金网页
- 获取完整的基金信息,包括管理费率、托管费率等18条信息
- 更新文档,添加接口使用说明

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: 修复中文编码显示问题

使用 r.content 和 from_encoding='utf-8' 来正确解析同花顺网页的中文内容

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Persist1 <persist1@126.com>
Co-authored-by: Zhou Wei <lilaboc.cn@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
albertandking added a commit that referenced this pull request May 2, 2026
* feat(index): 为 stock_zh_index_daily_tx 函数添加自定义时间范围参数 (#7241)

- 添加 start_date 和 end_date 参数,允许用户获取指定时间范围内的历史数据。
- 更新了对应的文档,以反映新的参数和功能。

* feat: 添加同花顺基金基本信息接口 (#7242)

* feat: 添加同花顺基金基本信息接口

- 新增 fund_info_ths 函数,使用 BeautifulSoup 解析同花顺基金网页
- 获取完整的基金信息,包括管理费率、托管费率等18条信息
- 更新文档,添加接口使用说明

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: 修复中文编码显示问题

使用 r.content 和 from_encoding='utf-8' 来正确解析同花顺网页的中文内容

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>

* fix: fix stock_zh_index_daily_tx

* fix: fix fund_info_ths

* fix: fix stock_zh_index_daily_tx

* fix: fix stock_zh_index_daily_tx

* fix: fix game_hot_rank_taptap

* docs: update date

* feat: add version 1.18.60

---------

Co-authored-by: Persist1 <persist1@126.com>
Co-authored-by: Zhou Wei <lilaboc.cn@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants