akshare 1.17.26__py3-none-any.whl → 1.17.28__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
@@ -3133,9 +3133,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
3133
3133
  1.17.24 fix: fix futures_inventory_99 interface
3134
3134
  1.17.25 fix: fix get_receipt interface
3135
3135
  1.17.26 fix: fix stock_hot_rank_detail_em interface
3136
+ 1.17.27 fix: fix index_csindex_all interface
3137
+ 1.17.28 fix: fix stock_financial_analysis_indicator_em interface
3136
3138
  """
3137
3139
 
3138
- __version__ = "1.17.26"
3140
+ __version__ = "1.17.28"
3139
3141
  __author__ = "AKFamily"
3140
3142
 
3141
3143
  import sys
@@ -3157,6 +3159,11 @@ if sys.version_info < (3, 9):
3157
3159
 
3158
3160
  del sys
3159
3161
 
3162
+ """
3163
+ 东方财富-A股-财务分析-主要指标
3164
+ """
3165
+ from akshare.stock_fundamental.stock_finance_sina import stock_financial_analysis_indicator_em
3166
+
3160
3167
  """
3161
3168
  期权保证金
3162
3169
  """
@@ -5137,6 +5144,12 @@ from akshare.economic.macro_bank import (
5137
5144
  from akshare.index.index_yw import index_yw
5138
5145
 
5139
5146
  """
5147
+
5148
+ 股票指数-股票指数-中证指数列表
5149
+ """
5150
+ from akshare.index.index_csindex import index_csindex_all
5151
+ """
5152
+
5140
5153
  股票指数-股票指数-成份股
5141
5154
  """
5142
5155
  from akshare.index.index_cons import (
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding:utf-8 -*-
3
+ """
4
+ Date: 2025/8/4 14:00
5
+ Desc: 中证指数网站-指数列表
6
+ 网站:https://www.csindex.com.cn/#/indices/family/list?index_series=1
7
+ """
8
+ import warnings
9
+ from io import BytesIO
10
+
11
+ import pandas as pd
12
+ import requests
13
+
14
+
15
+ def index_csindex_all() -> pd.DataFrame:
16
+ """
17
+ 中证指数网站-指数列表
18
+ https://www.csindex.com.cn/#/indices/family/list?index_series=1
19
+ Note: 但是不知道数据更新时间
20
+ :return: 最新指数的列表,
21
+ :rtype: pandas.DataFrame
22
+ """
23
+ warnings.filterwarnings("ignore", category=UserWarning, message="Workbook contains no default style")
24
+ url = (
25
+ f"https://www.csindex.com.cn/csindex-home/exportExcel/indexAll/CH"
26
+ )
27
+
28
+ headers = {
29
+ "Content-Type": "application/json;charset=UTF-8",
30
+ }
31
+ playloads = {
32
+ "sorter": {
33
+ "sortField": "null",
34
+ "sortOrder": None
35
+ },
36
+ "pager": {
37
+ "pageNum": 1,
38
+ "pageSize": 10
39
+ },
40
+ "indexFilter": {
41
+ "ifCustomized": None,
42
+ "ifTracked": None,
43
+ "ifWeightCapped": None,
44
+ "indexCompliance": None,
45
+ "hotSpot": None,
46
+ "indexClassify": None,
47
+ "currency": None,
48
+ "region": None,
49
+ "indexSeries": ["1"],
50
+ "undefined": None
51
+ }
52
+ }
53
+ r = requests.post(url, json=playloads, headers=headers)
54
+
55
+ temp_df = pd.read_excel(BytesIO(r.content))
56
+ temp_df["基日"] = pd.to_datetime(
57
+ temp_df["基日"], format="%Y-%m-%d", errors="coerce"
58
+ ).dt.date
59
+ temp_df["发布时间"] = pd.to_datetime(
60
+ temp_df["发布时间"], format="%Y-%m-%d", errors="coerce"
61
+ ).dt.date
62
+ temp_df["指数代码"] = temp_df["指数代码"].astype(str).str.zfill(6)
63
+ return temp_df
64
+
65
+
66
+ if __name__ == "__main__":
67
+ index_csindex_all_df = index_csindex_all()
68
+ print(index_csindex_all_df)
@@ -255,7 +255,7 @@ if __name__ == "__main__":
255
255
  print(news_trade_notify_suspend_baidu_df)
256
256
 
257
257
  news_trade_notify_dividend_baidu_df = news_trade_notify_dividend_baidu(
258
- date="20250506"
258
+ date="20241107"
259
259
  )
260
260
  print(news_trade_notify_dividend_baidu_df)
261
261
 
@@ -657,7 +657,7 @@ if __name__ == "__main__":
657
657
  print(option_shfe_daily_one)
658
658
  print(option_shfe_daily_two)
659
659
 
660
- option_gfex_daily_df = option_gfex_daily(symbol="工业硅", trade_date="20240102")
660
+ option_gfex_daily_df = option_gfex_daily(symbol="工业硅", trade_date="20250801")
661
661
  print(option_gfex_daily_df)
662
662
 
663
663
  option_gfex_vol_daily_df = option_gfex_vol_daily(
akshare/stock/cons.py CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2025/7/15 18:00
4
+ Date: 2025/8/4 18:00
5
5
  Desc: 股票配置文件
6
6
  """
7
7
 
8
- xq_a_token = "78591293b0e2907176f7f507563a6b9ac189af0b"
8
+ xq_a_token = "b813a12eb0682b072cce896e4e6c985ecd8efdbd"
9
9
 
10
10
  # zh-sina-kcb
11
11
  zh_sina_kcb_stock_url = ("http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/"
@@ -115,7 +115,7 @@ def stock_financial_hk_analysis_indicator_em(
115
115
  :type symbol: str
116
116
  :param indicator: choice of {"年度", "报告期"}
117
117
  :type indicator: str
118
- :return: 新浪财经-港股-财务分析-主要指标
118
+ :return: 东方财富-港股-财务分析-主要指标
119
119
  :rtype: pandas.DataFrame
120
120
  """
121
121
  url = "https://datacenter.eastmoney.com/securities/api/data/v1/get"
@@ -178,6 +178,53 @@ def stock_financial_abstract(symbol: str = "600004") -> pd.DataFrame:
178
178
  return big_df
179
179
 
180
180
 
181
+ def stock_financial_analysis_indicator_em(
182
+ symbol: str = "301389.SZ", indicator: str = "按报告期"
183
+ ) -> pd.DataFrame:
184
+ """
185
+ 东方财富-A股-财务分析-主要指标
186
+ https://emweb.securities.eastmoney.com/PC_HKF10/pages/home/index.html?code=00700&type=web&color=w#/newfinancialanalysis
187
+ :param symbol: 股票代码
188
+ :type symbol: str
189
+ :param indicator: choice of {"按报告期", "按单季度"}
190
+ :type indicator: str
191
+ :return: 东方财富-A股-财务分析-主要指标
192
+ :rtype: pandas.DataFrame
193
+ """
194
+ if indicator == "按报告期":
195
+ url = "https://datacenter.eastmoney.com/securities/api/data/get"
196
+ params = {
197
+ "type": "RPT_F10_FINANCE_MAINFINADATA",
198
+ "sty": "APP_F10_MAINFINADATA",
199
+ "quoteColumns": "",
200
+ "filter": f"""(SECUCODE="{symbol}")""",
201
+ "p": "1",
202
+ "ps": "200",
203
+ "sr": "-1",
204
+ "st": "REPORT_DATE",
205
+ "source": "HSF10",
206
+ "client": "PC",
207
+ }
208
+ else:
209
+ url = "https://datacenter.eastmoney.com/securities/api/data/v1/get"
210
+ params = {
211
+ "reportName": "RPT_F10_QTR_MAINFINADATA",
212
+ "columns": "ALL",
213
+ "quoteColumns": "",
214
+ "filter": f"""(SECUCODE="{symbol}")""",
215
+ "pageNumber": "1",
216
+ "pageSize": "200",
217
+ "sortTypes": "-1",
218
+ "sortColumns": "REPORT_DATE",
219
+ "source": "HSF10",
220
+ "client": "PC",
221
+ }
222
+ r = requests.get(url, params=params)
223
+ data_json = r.json()
224
+ temp_df = pd.DataFrame(data_json["result"]["data"])
225
+ return temp_df
226
+
227
+
181
228
  def stock_financial_analysis_indicator(
182
229
  symbol: str = "600004", start_year: str = "1900"
183
230
  ) -> pd.DataFrame:
@@ -765,3 +812,6 @@ if __name__ == "__main__":
765
812
 
766
813
  stock_main_stock_holder_df = stock_main_stock_holder(stock="600000")
767
814
  print(stock_main_stock_holder_df)
815
+
816
+ stock_financial_analysis_indicator_em_df = stock_financial_analysis_indicator_em(symbol="301389.SZ", indicator="按报告期")
817
+ print(stock_financial_analysis_indicator_em_df)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare
3
- Version: 1.17.26
3
+ Version: 1.17.28
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=l8BXr_otJYJZyNs1qP8FwRyoxXQoHf_rWK3FMQRLZR4,195564
1
+ akshare/__init__.py,sha256=6nb4c-ca453soJnlQDAxLS-AndEMYr_U_JtVeqlRvpk,195935
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
@@ -159,6 +159,7 @@ akshare/index/cons.py,sha256=sstxvhtdG3m2inIhE2geZZnHqNLXrK6GuhcqfI_zE6Q,7789
159
159
  akshare/index/index_cflp.py,sha256=iPn_0kePK74eScwC7rj0IhC-3w-kGQWtWlwsW-J0nbs,4422
160
160
  akshare/index/index_cni.py,sha256=qravLXiETWlegIMV_EIUTDbGQfdC2zsj4LykWzC8Lko,8563
161
161
  akshare/index/index_cons.py,sha256=exCYkXauu3u_liWS5Y0W89F19eSwt6gJmlBciM86txQ,7616
162
+ akshare/index/index_csindex.py,sha256=xlZzvNeaJedgP9GU5nMe-CJ5tcD_Z1J9liQOVjOvrUs,1932
162
163
  akshare/index/index_cx.py,sha256=aAmsIKkswKFNOhAsW0QOhp-q6q1aFOSBtqcDaZhIh6A,16775
163
164
  akshare/index/index_drewry.py,sha256=BM7V6P8K4QUFQArsdaWRu5qJUZaCoyNz97_b8dmLeCw,2937
164
165
  akshare/index/index_eri.py,sha256=N1yP2_n04WCIJ_vdPb7w5xdSNMIdomqgZ43Wg69hzts,2112
@@ -188,7 +189,7 @@ akshare/movie/jm.js,sha256=Emr0kB7KvhBaeVYFwYJ84Ra6EBThVIE_RVPKkOO7uvk,117171
188
189
  akshare/movie/movie_yien.py,sha256=BP3eGmGeTJerlIIF-sOq-TsssZiKM-DiX3vwV3dwi8o,13574
189
190
  akshare/movie/video_yien.py,sha256=2JsyKTwiP4RTuDNzQR6d9V9fzMnByH2ATJFzdtPyXSQ,3524
190
191
  akshare/news/__init__.py,sha256=B7G1wejQ9jRov6hXKLh9xy4F-UcfPps3AgVLDZnKM4w,82
191
- akshare/news/news_baidu.py,sha256=ZmC1Sq1sxb8Ottmzth-zjf_39Ri08oAzLB35dRNM7Xk,8276
192
+ akshare/news/news_baidu.py,sha256=WjrRWkPZRdJ00o4w3M_rB8s2Yxd2OWdDRCJm8QCIOeU,8276
192
193
  akshare/news/news_cctv.py,sha256=MRODE1qilypQijyCZedgC1Ctju_3ySdJlhT2nuJcuwc,7389
193
194
  akshare/news/news_stock.py,sha256=LbkFdMPUK0b5Iw7yR_dBrpWUUb6GOd2N9Jt_vmRk968,2792
194
195
  akshare/nlp/__init__.py,sha256=F-1D7ifZQ4RiE2zsQuPc4Aj_C7RhqxGPvObcRNcLPGs,79
@@ -196,7 +197,7 @@ akshare/nlp/nlp_interface.py,sha256=PyZjT3PkuTbloop-JwLwZ2kNi22zdO-r_pRUWQ5SmgM,
196
197
  akshare/option/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
197
198
  akshare/option/cons.py,sha256=zTRZ62RFwOcAKfmso-7nZJtT3a8Dt1nQbNnEjSqgjpI,4811
198
199
  akshare/option/option_comm_qihuo.py,sha256=kjbdp-94KJJJi1ex5U03abtlgviqwP0Aahb6FwddPkk,3128
199
- akshare/option/option_commodity.py,sha256=ds1maTiJ7ZR4q5h8tkDXj116k-sA5x5GRST7Lg-AmeM,27567
200
+ akshare/option/option_commodity.py,sha256=m9xMwk1_de2vlBnTtC_qQu_FNT1j0R7Ifl1sG2ldJdY,27567
200
201
  akshare/option/option_commodity_sina.py,sha256=NN2qywfGZphKlHiEuwU7_3aNXTEKaXH0UrU8xLIQ5XQ,7731
201
202
  akshare/option/option_czce.py,sha256=TxmLZn6hxjZa8TyEpwhZazL2m5XbympRHaRjJw1q7lk,2509
202
203
  akshare/option/option_daily_stats_sse_szse.py,sha256=Igqi2IPX_1UT2qgIsPDJtSZ660TjvHy9twn_q7Vrodw,4932
@@ -233,7 +234,7 @@ akshare/spot/spot_hog_soozhu.py,sha256=IEt7zrDs0ptAKgMA7QRIk45jcMLcA_LGq6Y3lKLFT
233
234
  akshare/spot/spot_price_qh.py,sha256=rRv09vR8K0U_x6x8AiLgGluxytIXkLatFNVkFbIh8eQ,3756
234
235
  akshare/spot/spot_sge.py,sha256=fXy6I9GchX2rfdPDD2wSN8K-hcDdS3ABzLDLdH-9t4Y,8696
235
236
  akshare/stock/__init__.py,sha256=jSa9260d6aNZajaW68chI2mpPkDSXLOgi3eXrqo4MQ8,82
236
- akshare/stock/cons.py,sha256=xFovyrMqXN_LrCaPdydlkzUguxmm1GZZrKCg0QiZp10,43667
237
+ akshare/stock/cons.py,sha256=7eKv0P9_PAbsiVklmiENm5uIF-HtOkcdz2R6ecX7lQM,43666
237
238
  akshare/stock/stock_allotment_cninfo.py,sha256=OVjVdWp2XVRNbJvVgtgVVoBmPBJgBB4RyIIgA_9QHM8,6066
238
239
  akshare/stock/stock_ask_bid_em.py,sha256=bo7VNkp1PmK4Z-GPZuVn_I-IAdzeW8cs3W_75KodxCg,3368
239
240
  akshare/stock/stock_board_concept_em.py,sha256=7dIwfF73XrRe1XOj9Q4pvb-X_KXR7CxPQqPziD5nqEU,17725
@@ -364,8 +365,8 @@ akshare/stock_feature/stock_ztb_em.py,sha256=cKIr6SWXPkE7rdsGHJtICqP19mR8C01n4qL
364
365
  akshare/stock_feature/ths.js,sha256=AWPkHf3L2Il1UUL0F5qDqNn1dfU0OlZBNUbMf8AmI3Y,39664
365
366
  akshare/stock_fundamental/__init__.py,sha256=umtdE151dFbLfXlzWAqHHVi8yj4lNPlq1wRX1Q5CMNM,81
366
367
  akshare/stock_fundamental/stock_basic_info_xq.py,sha256=ghl-cx1RmaGFnKpzVmmNsPoM2rTm4QvWTzk62fJ_L-I,3644
367
- akshare/stock_fundamental/stock_finance_hk_em.py,sha256=cCiaWX6ZyKe4W2H9qe-ttpMeVMWp6tHdvnjhRuYQhl8,7017
368
- akshare/stock_fundamental/stock_finance_sina.py,sha256=DuZcOHPI8ChObioXw_vnxaQUntw2YYEK5_sdNuLkXzU,30718
368
+ akshare/stock_fundamental/stock_finance_hk_em.py,sha256=iStOF9f7e0iPx3p6qmXdFOBDc7Ikn3LR-p_NGh9jC8g,7017
369
+ akshare/stock_fundamental/stock_finance_sina.py,sha256=hBZ5AKacr6PFn7zoasdoV6k7yYC3Jb2_mz0v90lwbGY,32545
369
370
  akshare/stock_fundamental/stock_finance_ths.py,sha256=nS9bt_hzklzh7pBTCH1PjOa69OUcNZ41Z_zSHiz9Y1U,11527
370
371
  akshare/stock_fundamental/stock_finance_us_em.py,sha256=thRKe9OIfZFQ0q_kAM2kJXCKXGhyPFjHKiiGEK95K2g,9799
371
372
  akshare/stock_fundamental/stock_gbjg_em.py,sha256=oKzX9BSMphRSrx0eAyLZ7qfdz-wT-4P2-03fLu_desA,3573
@@ -392,10 +393,10 @@ akshare/utils/func.py,sha256=4cwmXFztU86yJNONJ40KJLvsIEQHBbct4iMm3zT2v30,2315
392
393
  akshare/utils/multi_decrypt.py,sha256=aWoL2iEPeuXHJg8-n7OtMKixLnIhfzepACgxfrfmQB4,1657
393
394
  akshare/utils/token_process.py,sha256=nGtgnZGRprXJkhLXH8mcUH4TgIFwzsTOb0EaEPa0Euo,667
394
395
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
395
- akshare-1.17.26.dist-info/licenses/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
396
+ akshare-1.17.28.dist-info/licenses/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
396
397
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
397
398
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
398
- akshare-1.17.26.dist-info/METADATA,sha256=v_a6V0OHgePXkSvQagknKTBfUp_FpXeYNyS9a0GcjDE,11902
399
- akshare-1.17.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
400
- akshare-1.17.26.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
401
- akshare-1.17.26.dist-info/RECORD,,
399
+ akshare-1.17.28.dist-info/METADATA,sha256=eI2FTi9_4FDVYGTK3V_K5qHckl7DdOGwN8C5uGaSxkY,11902
400
+ akshare-1.17.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
401
+ akshare-1.17.28.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
402
+ akshare-1.17.28.dist-info/RECORD,,