akshare 1.15.64__py3-none-any.whl → 1.15.65__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of akshare might be problematic. Click here for more details.

akshare/__init__.py CHANGED
@@ -2974,9 +2974,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2974
2974
  1.15.62 fix: fix stock_zt_pool_sub_new_em interface
2975
2975
  1.15.63 fix: fix stock_financial_abstract interface
2976
2976
  1.15.64 fix: fix stock_zh_index_value_csindex interface
2977
+ 1.15.65 fix: fix option_czce_daily interface
2977
2978
  """
2978
2979
 
2979
- __version__ = "1.15.64"
2980
+ __version__ = "1.15.65"
2980
2981
  __author__ = "AKFamily"
2981
2982
 
2982
2983
  import sys
@@ -2998,6 +2999,11 @@ if sys.version_info < (3, 9):
2998
2999
 
2999
3000
  del sys
3000
3001
 
3002
+ """
3003
+ 基金费率
3004
+ """
3005
+ from akshare.fund.fund_fee_em import fund_fee_em
3006
+
3001
3007
  """
3002
3008
  东方财富网-数据中心-估值分析-每日互动-每日互动-估值分析
3003
3009
  """
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding:utf-8 -*-
3
+ """
4
+ Date: 2025/1/4 17:00
5
+ Desc: 天天基金-基金档案
6
+ https://fundf10.eastmoney.com/jjfl_015641.html
7
+ """
8
+
9
+ import requests
10
+ import pandas as pd
11
+ from io import StringIO
12
+
13
+
14
+ def fund_fee_em(symbol: str = "015641", indicator: str = "认购费率") -> pd.DataFrame:
15
+ """
16
+ 天天基金-基金档案-购买信息
17
+ https://fundf10.eastmoney.com/jjfl_015641.html
18
+ :param symbol: 基金代码
19
+ :type symbol: str
20
+ :param indicator: choice of {"交易状态", "申购与赎回金额", "交易确认日", "运作费用", "认购费率", "申购费率", "赎回费率"}
21
+ :type indicator: str
22
+ :return: 交易规则
23
+ :rtype: pandas.DataFrame
24
+ """
25
+ url = f"https://fundf10.eastmoney.com/jjfl_{symbol}.html"
26
+ r = requests.get(url)
27
+
28
+ if indicator == "交易状态":
29
+ temp_df = pd.read_html(StringIO(r.text))[1]
30
+ elif indicator == "申购与赎回金额":
31
+ temp_df_1 = pd.read_html(StringIO(r.text))[2]
32
+ temp_df_2 = pd.read_html(StringIO(r.text))[3]
33
+ temp_df = pd.concat(objs=[temp_df_1, temp_df_2], ignore_index=True)
34
+ elif indicator == "交易确认日":
35
+ temp_df = pd.read_html(StringIO(r.text))[4]
36
+ elif indicator == "运作费用":
37
+ temp_df = pd.read_html(StringIO(r.text))[5]
38
+ elif indicator == "认购费率":
39
+ temp_df = pd.read_html(StringIO(r.text))[6]
40
+ temp_df["原费率"] = temp_df["原费率|天天基金优惠费率"].str.split(
41
+ "|", expand=True
42
+ )[0]
43
+ temp_df["天天基金优惠费率"] = temp_df["原费率|天天基金优惠费率"].str.split(
44
+ "|", expand=True
45
+ )[1]
46
+ del temp_df["原费率|天天基金优惠费率"]
47
+ temp_df.loc[3, "天天基金优惠费率"] = temp_df.loc[3, "原费率"]
48
+ temp_df["原费率"] = temp_df["原费率"].str.strip()
49
+ temp_df["天天基金优惠费率"] = temp_df["天天基金优惠费率"].str.strip()
50
+ elif indicator == "申购费率":
51
+ temp_df = pd.read_html(StringIO(r.text))[7]
52
+ temp_df["原费率"] = temp_df[
53
+ "原费率|天天基金优惠费率 银行卡购买|活期宝购买"
54
+ ].str.split("|", expand=True)[0]
55
+ temp_df["天天基金优惠费率-银行卡购买"] = temp_df[
56
+ "原费率|天天基金优惠费率 银行卡购买|活期宝购买"
57
+ ].str.split("|", expand=True)[1]
58
+ temp_df["天天基金优惠费率-活期宝购买"] = temp_df[
59
+ "原费率|天天基金优惠费率 银行卡购买|活期宝购买"
60
+ ].str.split("|", expand=True)[2]
61
+ del temp_df["原费率|天天基金优惠费率 银行卡购买|活期宝购买"]
62
+ temp_df.loc[3, "天天基金优惠费率-银行卡购买"] = temp_df.loc[3, "原费率"]
63
+ temp_df.loc[3, "天天基金优惠费率-活期宝购买"] = temp_df.loc[3, "原费率"]
64
+ temp_df["原费率"] = temp_df["原费率"].str.strip()
65
+ temp_df["天天基金优惠费率-银行卡购买"] = temp_df[
66
+ "天天基金优惠费率-银行卡购买"
67
+ ].str.strip()
68
+ temp_df["天天基金优惠费率-活期宝购买"] = temp_df[
69
+ "天天基金优惠费率-活期宝购买"
70
+ ].str.strip()
71
+ elif indicator == "赎回费率":
72
+ temp_df = pd.read_html(StringIO(r.text))[8]
73
+ else:
74
+ temp_df = pd.DataFrame([])
75
+ return temp_df
76
+
77
+
78
+ if __name__ == "__main__":
79
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="交易状态")
80
+ print(fund_fee_em_df)
81
+
82
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="申购与赎回金额")
83
+ print(fund_fee_em_df)
84
+
85
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="交易确认日")
86
+ print(fund_fee_em_df)
87
+
88
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="运作费用")
89
+ print(fund_fee_em_df)
90
+
91
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="认购费率")
92
+ print(fund_fee_em_df)
93
+
94
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="申购费率")
95
+ print(fund_fee_em_df)
96
+
97
+ fund_fee_em_df = fund_fee_em(symbol="015641", indicator="赎回费率")
98
+ print(fund_fee_em_df)
@@ -210,7 +210,7 @@ def option_czce_daily(
210
210
  :type trade_date: str
211
211
  :param symbol: choice of {"白糖期权", "棉花期权", "甲醇期权", "PTA期权", "菜籽粕期权", "动力煤期权", "短纤期权",
212
212
  "菜籽油期权", "花生期权", "纯碱期权", "锰硅期权", "硅铁期权", "尿素期权", "对二甲苯期权", "苹果期权", "红枣期权"
213
- "烧碱期权", "玻璃期权"}
213
+ "烧碱期权", "玻璃期权", "瓶片期权"}
214
214
  :type symbol: str
215
215
  :return: 日频行情数据
216
216
  :rtype: pandas.DataFrame
@@ -334,6 +334,12 @@ def option_czce_daily(
334
334
  temp_df = temp_df.iloc[:-1, :].copy()
335
335
  new_df = __option_czce_daily_convert_numeric_columns(temp_df)
336
336
  return new_df
337
+ elif symbol == "瓶片期权":
338
+ temp_df = table_df[table_df.iloc[:, 0].str.contains("FG")]
339
+ temp_df.reset_index(inplace=True, drop=True)
340
+ temp_df = temp_df.iloc[:-1, :].copy()
341
+ new_df = __option_czce_daily_convert_numeric_columns(temp_df)
342
+ return new_df
337
343
  except: # noqa: E722
338
344
  return pd.DataFrame()
339
345
 
@@ -635,5 +641,5 @@ if __name__ == "__main__":
635
641
  )
636
642
  print(option_gfex_vol_daily_df)
637
643
 
638
- option_czce_daily_df = option_czce_daily(symbol="苹果期权", trade_date="20240930")
644
+ option_czce_daily_df = option_czce_daily(symbol="瓶片期权", trade_date="20250103")
639
645
  print(option_czce_daily_df)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.15.64
3
+ Version: 1.15.65
4
4
  Summary: AKShare is an elegant and simple financial data interface library for Python, built for human beings!
5
5
  Home-page: https://github.com/akfamily/akshare
6
6
  Author: AKFamily
@@ -1,4 +1,4 @@
1
- akshare/__init__.py,sha256=90wI833gimhJ-PLyIbSiSzmJt6s6lhDAIepSl9FRxzg,185443
1
+ akshare/__init__.py,sha256=2qstXg3C_yb_TtnipqCfJFipnBWoBe2gFA32K-N7LWQ,185559
2
2
  akshare/datasets.py,sha256=rKuRNZrqi6IMsZ9nyvO3Rx02js0tH3zMLjz8HQNAoPQ,963
3
3
  akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
4
4
  akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
@@ -89,6 +89,7 @@ akshare/fund/fund_em.py,sha256=nX0VA5JeiF-zRr1J10X-U9-pJj5KFDUAbovN1DWjvTo,40450
89
89
  akshare/fund/fund_etf_em.py,sha256=oEPVCg-CQvOfLS7bt69yshqPiUPbxDpWa-FnMF7GqIQ,17386
90
90
  akshare/fund/fund_etf_sina.py,sha256=3eYnpug02oSZfR6fuWsT5mZRMRNm39VYCLHKnWdvonM,5218
91
91
  akshare/fund/fund_etf_ths.py,sha256=vb_jy0h2-Kz2dNWUrwBYxPB0MAotv0KZgnFhE98ohSM,3432
92
+ akshare/fund/fund_fee_em.py,sha256=rkA2qVEhuWBUTFlvEP-zY_4Fw7_vL9cDx9hR-P38yDk,4157
92
93
  akshare/fund/fund_fhsp_em.py,sha256=-zSwwveiCB4HHRxwAuaLDTQHmNe3FxwxxeoPeiG8JbM,5546
93
94
  akshare/fund/fund_init_em.py,sha256=4kOhsOkEs50B-RAxz-fTyWxNC1J4jNBDoKGJlFUpIjQ,2210
94
95
  akshare/fund/fund_lof_em.py,sha256=eWpIlHzUYbscyxvz8awiDERxd7gTucHcGcrBPTCCFno,12473
@@ -187,7 +188,7 @@ akshare/nlp/nlp_interface.py,sha256=PyZjT3PkuTbloop-JwLwZ2kNi22zdO-r_pRUWQ5SmgM,
187
188
  akshare/option/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
188
189
  akshare/option/cons.py,sha256=zTRZ62RFwOcAKfmso-7nZJtT3a8Dt1nQbNnEjSqgjpI,4811
189
190
  akshare/option/option_comm_qihuo.py,sha256=kjbdp-94KJJJi1ex5U03abtlgviqwP0Aahb6FwddPkk,3128
190
- akshare/option/option_commodity.py,sha256=u0nyhLzqfBVregoJbAsah9aBsihZd8dOWcTXb-At5N0,25354
191
+ akshare/option/option_commodity.py,sha256=1b5d0pCwuaUtjlM4qyjiTRMx62fKKAq02mc-ira5d5I,25711
191
192
  akshare/option/option_commodity_sina.py,sha256=r6qK_K7w3A6Uqp5ZtBb4pW7vH04oMyeCEZLLGqi0jpA,7776
192
193
  akshare/option/option_czce.py,sha256=L4i7TVKcOns5ZKoqq-mrSykdx3SGwu6OL4eI77-A_lc,1812
193
194
  akshare/option/option_daily_stats_sse_szse.py,sha256=Ip_vE81qbEGt4ocbtWfUT7XGu0HWU0zKkzauZeq9RJA,4962
@@ -377,8 +378,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
377
378
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
378
379
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
379
380
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
380
- akshare-1.15.64.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
381
- akshare-1.15.64.dist-info/METADATA,sha256=pnopZeymL7QXIghvoIJKeZwpum0lNW3enW8gv11hhjU,13423
382
- akshare-1.15.64.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
383
- akshare-1.15.64.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
384
- akshare-1.15.64.dist-info/RECORD,,
381
+ akshare-1.15.65.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
382
+ akshare-1.15.65.dist-info/METADATA,sha256=Ny5RQMqJZ7-zwbDQqyJD8VpfNAy9YGK9grHwgk0g3_k,13423
383
+ akshare-1.15.65.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
384
+ akshare-1.15.65.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
385
+ akshare-1.15.65.dist-info/RECORD,,