Skip to content

Commit

Permalink
Date (#4382)
Browse files Browse the repository at this point in the history
* add version 1.12.8

* fix fund_open_fund_info_em
  • Loading branch information
albertandking authored Jan 2, 2024
1 parent 33b0765 commit 063988c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2620,9 +2620,10 @@
1.12.5 fix: fix stock_zh_a_gdhs interface
1.12.6 fix: fix fund_open_fund_info_em interface
1.12.7 fix: fix option_gfex_daily interface
1.12.8 fix: fix fund_open_fund_info_em interface
"""

__version__ = "1.12.7"
__version__ = "1.12.8"
__author__ = "AKFamily"

import sys
Expand Down
6 changes: 4 additions & 2 deletions akshare/fund/fund_em.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ def fund_open_fund_info_em(
except:
return pd.DataFrame()
temp_df = pd.DataFrame(data_json)
if temp_df.empty:
return pd.DataFrame()
temp_df["x"] = pd.to_datetime(
temp_df["x"], unit="ms", utc=True
).dt.tz_convert("Asia/Shanghai")
Expand Down Expand Up @@ -435,7 +437,7 @@ def fund_open_fund_info_em(
"成立来": "se",
}
params = {
'fundCode': '710001',
'fundCode': symbol,
'indexcode': '000300',
'type': period_map[period],
'_': '1704012866899'
Expand Down Expand Up @@ -519,7 +521,7 @@ def fund_open_fund_info_em(
r = requests.get(url, headers=headers)
temp_df = pd.read_html(StringIO(r.text))[1]
if temp_df.iloc[0, 1] == "暂无分红信息!":
return None
return
else:
return temp_df

Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@

## 更新说明详情

1.12.8 fix: fix fund_open_fund_info_em interface

1. 修复 fund_open_fund_info_em 接口

1.12.7 fix: fix option_gfex_daily interface

1. 修复 option_gfex_daily 接口
Expand Down Expand Up @@ -3290,6 +3294,8 @@

## 版本更新说明

1.12.8 fix: fix fund_open_fund_info_em interface

1.12.7 fix: fix option_gfex_daily interface

1.12.6 fix: fix fund_open_fund_info_em interface
Expand Down
2 changes: 1 addition & 1 deletion docs/data/fund/fund_public.md
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ print(fund_open_fund_daily_em_df)

| 名称 | 类型 | 描述 |
|-----------|-----|------------------------------------------------------------------------------------------------|
| fund | str | fund="710001"; 需要基金代码, 可以通过调用 **ak.fund_open_fund_daily_em()** 获取 |
| symbol | str | symbol="710001"; 需要基金代码, 可以通过调用 **ak.fund_open_fund_daily_em()** 获取 |
| indicator | str | indicator="单位净值走势"; 参见 **fund_open_fund_info_em** 参数一览表 |
| period | str | period="成立来"; 该参数只对 `累计收益率走势` 有效, choice of {"1月", "3月", "6月", "1年", "3年", "5年", "今年来", "成立来"} |

Expand Down

0 comments on commit 063988c

Please sign in to comment.