akshare 1.17.26__py3-none-any.whl → 1.17.27__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,10 @@ 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
3136
3137
  """
3137
3138
 
3138
- __version__ = "1.17.26"
3139
+ __version__ = "1.17.27"
3139
3140
  __author__ = "AKFamily"
3140
3141
 
3141
3142
  import sys
@@ -5137,6 +5138,12 @@ from akshare.economic.macro_bank import (
5137
5138
  from akshare.index.index_yw import index_yw
5138
5139
 
5139
5140
  """
5141
+
5142
+ 股票指数-股票指数-中证指数列表
5143
+ """
5144
+ from akshare.index.index_csindex import index_csindex_all
5145
+ """
5146
+
5140
5147
  股票指数-股票指数-成份股
5141
5148
  """
5142
5149
  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)
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/"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare
3
- Version: 1.17.26
3
+ Version: 1.17.27
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=l0Z4eqcFHn55jUhhx4nm8u8SocbfmCvcorJy9j5eOZs,195722
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
@@ -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
@@ -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.27.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.27.dist-info/METADATA,sha256=ov44Pa5GfsuU13cw8PxzYK7oeeInx4oT50l_o-PIalk,11902
400
+ akshare-1.17.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
401
+ akshare-1.17.27.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
402
+ akshare-1.17.27.dist-info/RECORD,,