akshare 1.15.6__py3-none-any.whl → 1.15.8__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
@@ -2916,9 +2916,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2916
2916
  1.15.4 fix: fix stock_allotment_cninfo interface
2917
2917
  1.15.5 fix: fix stock_individual_spot_xq interface
2918
2918
  1.15.6 fix: fix qdii_e_index_jsl interface
2919
+ 1.15.7 fix: fix index_hist_sw interface
2920
+ 1.15.8 fix: fix fund_individual_basic_info_xq interface
2919
2921
  """
2920
2922
 
2921
- __version__ = "1.15.6"
2923
+ __version__ = "1.15.8"
2922
2924
  __author__ = "AKFamily"
2923
2925
 
2924
2926
  import sys
akshare/fund/fund_xq.py CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/01/16 23:40
4
+ Date: 2024/10/27 22:30
5
5
  Desc: 雪球基金-基金详情
6
6
  https://danjuanfunds.com/funding/003545
7
7
  """
@@ -25,7 +25,8 @@ def fund_individual_basic_info_xq(
25
25
  """
26
26
  url = f"https://danjuanfunds.com/djapi/fund/{symbol}"
27
27
  headers = {
28
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
28
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
29
+ "Chrome/80.0.3987.149 Safari/537.36"
29
30
  }
30
31
  r = requests.get(url, headers=headers, timeout=timeout)
31
32
  json_data = r.json()["data"]
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/5/22 15:00
4
+ Date: 2024/10/23 13:00
5
5
  Desc: 申万宏源研究-指数系列
6
- https://www.swhyresearch.com/institute_sw/allIndex/releasedIndex
6
+ https://www.swsresearch.com/institute_sw/allIndex/releasedIndex
7
7
  """
8
8
 
9
9
  import math
@@ -17,7 +17,7 @@ from akshare.utils.tqdm import get_tqdm
17
17
  def index_hist_sw(symbol: str = "801030", period: str = "day") -> pd.DataFrame:
18
18
  """
19
19
  申万宏源研究-指数发布-指数详情-指数历史数据
20
- https://www.swhyresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
20
+ https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
21
21
  :param symbol: 指数代码
22
22
  :type symbol: str
23
23
  :param period: choice of {"day", "week", "month"}
@@ -30,7 +30,7 @@ def index_hist_sw(symbol: str = "801030", period: str = "day") -> pd.DataFrame:
30
30
  "week": "WEEK",
31
31
  "month": "MONTH",
32
32
  }
33
- url = "https://www.swhyresearch.com/institute-sw/api/index_publish/trend/"
33
+ url = "https://www.swsresearch.com/institute-sw/api/index_publish/trend/"
34
34
  params = {
35
35
  "swindexcode": symbol,
36
36
  "period": period_map[period],
@@ -81,14 +81,14 @@ def index_hist_sw(symbol: str = "801030", period: str = "day") -> pd.DataFrame:
81
81
  def index_min_sw(symbol: str = "801001") -> pd.DataFrame:
82
82
  """
83
83
  申万宏源研究-指数发布-指数详情-指数分时数据
84
- https://www.swhyresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
84
+ https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
85
85
  :param symbol: 指数代码
86
86
  :type symbol: str
87
87
  :return: 指数分时数据
88
88
  :rtype: pandas.DataFrame
89
89
  """
90
90
  url = (
91
- "https://www.swhyresearch.com/institute-sw/api/index_publish/details/timelines/"
91
+ "https://www.swsresearch.com/institute-sw/api/index_publish/details/timelines/"
92
92
  )
93
93
  params = {
94
94
  "swindexcode": symbol,
@@ -127,13 +127,13 @@ def index_min_sw(symbol: str = "801001") -> pd.DataFrame:
127
127
  def index_component_sw(symbol: str = "801001") -> pd.DataFrame:
128
128
  """
129
129
  申万宏源研究-指数发布-指数详情-成分股
130
- https://www.swhyresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
130
+ https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=801001&name=%E7%94%B3%E4%B8%8750
131
131
  :param symbol: 指数代码
132
132
  :type symbol: str
133
133
  :return: 成分股
134
134
  :rtype: pandas.DataFrame
135
135
  """
136
- url = "https://www.swhyresearch.com/institute-sw/api/index_publish/details/component_stocks/"
136
+ url = "https://www.swsresearch.com/institute-sw/api/index_publish/details/component_stocks/"
137
137
  params = {"swindexcode": symbol, "page": "1", "page_size": "10000"}
138
138
  headers = {
139
139
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
@@ -221,7 +221,7 @@ def __index_realtime_sw(symbol: str = "大类风格指数") -> pd.DataFrame:
221
221
  def index_realtime_sw(symbol: str = "二级行业") -> pd.DataFrame:
222
222
  """
223
223
  申万宏源研究-指数系列
224
- https://www.swhyresearch.com/institute_sw/allIndex/releasedIndex
224
+ https://www.swsresearch.com/institute_sw/allIndex/releasedIndex
225
225
  :param symbol: choice of {"市场表征", "一级行业", "二级行业", "风格指数", "大类风格指数", "金创指数"}
226
226
  :type symbol: str
227
227
  :return: 指数系列实时行情数据
@@ -230,7 +230,7 @@ def index_realtime_sw(symbol: str = "二级行业") -> pd.DataFrame:
230
230
  if symbol in {"大类风格指数", "金创指数"}:
231
231
  temp_df = __index_realtime_sw(symbol)
232
232
  return temp_df
233
- url = "https://www.swhyresearch.com/institute-sw/api/index_publish/current/"
233
+ url = "https://www.swsresearch.com/institute-sw/api/index_publish/current/"
234
234
  params = {"page": "1", "page_size": "50", "indextype": symbol}
235
235
  headers = {
236
236
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
@@ -289,7 +289,7 @@ def index_analysis_daily_sw(
289
289
  ) -> pd.DataFrame:
290
290
  """
291
291
  申万宏源研究-指数分析
292
- https://www.swhyresearch.com/institute_sw/allIndex/analysisIndex
292
+ https://www.swsresearch.com/institute_sw/allIndex/analysisIndex
293
293
  :param symbol: choice of {"市场表征", "一级行业", "二级行业", "风格指数"}
294
294
  :type symbol: str
295
295
  :param start_date: 开始日期
@@ -299,7 +299,7 @@ def index_analysis_daily_sw(
299
299
  :return: 指数分析
300
300
  :rtype: pandas.DataFrame
301
301
  """
302
- url = "https://www.swhyresearch.com/institute-sw/api/index_analysis/index_analysis_report/"
302
+ url = "https://www.swsresearch.com/institute-sw/api/index_analysis/index_analysis_report/"
303
303
  params = {
304
304
  "page": "1",
305
305
  "page_size": "50",
@@ -363,13 +363,13 @@ def index_analysis_daily_sw(
363
363
  def index_analysis_week_month_sw(symbol: str = "month") -> pd.DataFrame:
364
364
  """
365
365
  申万宏源研究-周/月报表-日期序列
366
- https://www.swhyresearch.com/institute_sw/allIndex/analysisIndex
366
+ https://www.swsresearch.com/institute_sw/allIndex/analysisIndex
367
367
  :param symbol: choice of {"week", "month"}
368
368
  :type symbol: str
369
369
  :return: 日期序列
370
370
  :rtype: pandas.DataFrame
371
371
  """
372
- url = "https://www.swhyresearch.com/institute-sw/api/index_analysis/week_month_datetime/"
372
+ url = "https://www.swsresearch.com/institute-sw/api/index_analysis/week_month_datetime/"
373
373
  params = {"type": symbol.upper()}
374
374
  headers = {
375
375
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
@@ -392,7 +392,7 @@ def index_analysis_weekly_sw(
392
392
  ) -> pd.DataFrame:
393
393
  """
394
394
  申万宏源研究-指数分析-周报告
395
- https://www.swhyresearch.com/institute_sw/allIndex/analysisIndex
395
+ https://www.swsresearch.com/institute_sw/allIndex/analysisIndex
396
396
  :param symbol: choice of {"市场表征", "一级行业", "二级行业", "风格指数"}
397
397
  :type symbol: str
398
398
  :param date: 查询日期; 通过调用 ak.index_analysis_week_month_sw(date="20221104") 接口获取
@@ -400,7 +400,7 @@ def index_analysis_weekly_sw(
400
400
  :return: 指数分析
401
401
  :rtype: pandas.DataFrame
402
402
  """
403
- url = "https://www.swhyresearch.com/institute-sw/api/index_analysis/index_analysis_reports/"
403
+ url = "https://www.swsresearch.com/institute-sw/api/index_analysis/index_analysis_reports/"
404
404
  params = {
405
405
  "page": "1",
406
406
  "page_size": "50",
@@ -467,7 +467,7 @@ def index_analysis_monthly_sw(
467
467
  ) -> pd.DataFrame:
468
468
  """
469
469
  申万宏源研究-指数分析-月报告
470
- https://www.swhyresearch.com/institute_sw/allIndex/analysisIndex
470
+ https://www.swsresearch.com/institute_sw/allIndex/analysisIndex
471
471
  :param symbol: choice of {"市场表征", "一级行业", "二级行业", "风格指数"}
472
472
  :type symbol: str
473
473
  :param date: 查询日期; 通过调用 ak.index_analysis_week_month_sw() 接口获取
@@ -475,7 +475,7 @@ def index_analysis_monthly_sw(
475
475
  :return: 指数分析
476
476
  :rtype: pandas.DataFrame
477
477
  """
478
- url = "https://www.swhyresearch.com/institute-sw/api/index_analysis/index_analysis_reports/"
478
+ url = "https://www.swsresearch.com/institute-sw/api/index_analysis/index_analysis_reports/"
479
479
  params = {
480
480
  "page": "1",
481
481
  "page_size": "50",
@@ -380,13 +380,13 @@ def stock_zh_index_daily_em(
380
380
 
381
381
 
382
382
  if __name__ == "__main__":
383
- stock_zh_index_daily_df = stock_zh_index_daily(symbol="sz399905")
383
+ stock_zh_index_daily_df = stock_zh_index_daily(symbol="sh000510")
384
384
  print(stock_zh_index_daily_df)
385
385
 
386
386
  stock_zh_index_spot_sina_df = stock_zh_index_spot_sina()
387
387
  print(stock_zh_index_spot_sina_df)
388
388
 
389
- stock_zh_index_spot_em_df = stock_zh_index_spot_em(symbol="上证系列指数")
389
+ stock_zh_index_spot_em_df = stock_zh_index_spot_em(symbol="中证系列指数")
390
390
  print(stock_zh_index_spot_em_df)
391
391
 
392
392
  stock_zh_index_daily_tx_df = stock_zh_index_daily_tx(symbol="sh000919")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.15.6
3
+ Version: 1.15.8
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=i8uUAu291ta8SavpyTgeKrwLT1Qu3aSmxaWdO3Ca0Wo,182721
1
+ akshare/__init__.py,sha256=La5D3W1R6NobwmwsNtXtfJfLvFME6h9GYyDeCeDNX_k,182817
2
2
  akshare/datasets.py,sha256=-qdwaQjgBlftX84uM74KJqCYJYkQ50PV416_neA4uls,995
3
3
  akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
4
4
  akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
@@ -100,7 +100,7 @@ akshare/fund/fund_rating.py,sha256=oBZTOBaiC9RMfTK2XGKIMY58sPxc7M6GlMJ3_M3i0lQ,1
100
100
  akshare/fund/fund_report_cninfo.py,sha256=rhztaa3J48VdnCEXFAl8wMg-P7MI2iQa0HculkvL8CI,8785
101
101
  akshare/fund/fund_scale_em.py,sha256=8XLZpz9DzsAnJCo1moBmzf3u7mfZNZHsb3cPKJ-gCJM,4237
102
102
  akshare/fund/fund_scale_sina.py,sha256=A0qIzWBQdE3IGS9-cxO9_FNpuH-BAG5HhPk5KzTFTFc,8167
103
- akshare/fund/fund_xq.py,sha256=qGMKYC0Vi2AXfnjsS0P9B2ITfpkQ85i4ayXA6kJ6a7o,11295
103
+ akshare/fund/fund_xq.py,sha256=AxMZB-940bNY7-BatVLZiseHNxiWA17hQzTfuxGibPU,11306
104
104
  akshare/futures/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
105
105
  akshare/futures/cons.py,sha256=sc0LW_k_Poc3V3r_Mz8DiKfLy7aisda28pK0u8ffMus,16193
106
106
  akshare/futures/cot.py,sha256=Kkza2slS7JQpXndKrQEEykzIjZIT3vhvtZHVJ7P1yac,58573
@@ -165,11 +165,11 @@ akshare/index/index_kq_fz.py,sha256=Y-cbxWLpRyGcFcMSDxZZQXdAuD85IuQH5xC2rhtGbRc,
165
165
  akshare/index/index_kq_ss.py,sha256=m4hAMNnzHk8JNAnKjkYYVeyG4zUC5zR5i0-u-OxmaGU,3333
166
166
  akshare/index/index_option_qvix.py,sha256=sCx0iiIetkp5ELE9sDwesVFgJNfa_1tAEWVCJI-I2u4,3270
167
167
  akshare/index/index_research_fund_sw.py,sha256=kVYjBl3vZg6CyYBCrxZiSv8taHMnqmG7PQ-LVmMNd3I,4603
168
- akshare/index/index_research_sw.py,sha256=HXPvT-GLPMQw67iwlxvWaDl7mxKErm6-6ScrP0S5RTk,21774
168
+ akshare/index/index_research_sw.py,sha256=w9_weAnaUQcoW_qoK89bz3iHvkJR4VseMrHZjLSNUrc,21758
169
169
  akshare/index/index_spot.py,sha256=HrXt2QC9i1pYEh7wyJPKjtexctzSIUyMjEzk5BQq_K8,1696
170
170
  akshare/index/index_stock_hk.py,sha256=nPFzRrjyiUpRK-OSDsdi5AFCKHNKqOVji6WJcQxOvNo,9781
171
171
  akshare/index/index_stock_us_sina.py,sha256=IxOk4G49oasv7EfEQenL9-GLuelyUus6c4JPyRlaOzY,1551
172
- akshare/index/index_stock_zh.py,sha256=FscDLEPYdVbbykknvb3bwDCIA_I6VzeuZ-JsIuMr828,14873
172
+ akshare/index/index_stock_zh.py,sha256=WkXd3A8gc1hgPJPR4znRbLfrqMeTivLS7L449TlOBdE,14873
173
173
  akshare/index/index_stock_zh_csindex.py,sha256=kRWl1c30OOhLj_mLCBoxOJdgE9KxEUqJf7Hjmu-tLfo,13110
174
174
  akshare/index/index_sugar.py,sha256=B_Nj9Q6JP-Y_d7myZ0C79izTxxrbuZIp1Vv_CilVMOc,5006
175
175
  akshare/index/index_sw.py,sha256=n757dUfNEsaZGk_eCxeetZi3pktBBYLVEMM7f9U_XjM,10174
@@ -381,8 +381,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
381
381
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
382
382
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
383
383
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
384
- akshare-1.15.6.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
385
- akshare-1.15.6.dist-info/METADATA,sha256=STv32lzoJVQVkspXzHNp_pJy1n5c0Vvm-jXh8WbZrMU,14162
386
- akshare-1.15.6.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
387
- akshare-1.15.6.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
388
- akshare-1.15.6.dist-info/RECORD,,
384
+ akshare-1.15.8.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
385
+ akshare-1.15.8.dist-info/METADATA,sha256=sIQtL55MrWjXbc85ZdXL9rT8FkRJelyzDRkE9P70U6k,14162
386
+ akshare-1.15.8.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
387
+ akshare-1.15.8.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
388
+ akshare-1.15.8.dist-info/RECORD,,