akshare 1.16.6__py3-none-any.whl → 1.16.7__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.
akshare/__init__.py CHANGED
@@ -3015,9 +3015,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
3015
3015
  1.16.4 fix: fix stock_hk_ggt_components_em interface
3016
3016
  1.16.5 fix: fix stock_sector_fund_flow_rank interface
3017
3017
  1.16.6 fix: fix stock_sgt_reference_exchange_rate_sse interface
3018
+ 1.16.7 fix: fix fund_lof_hist_em interface
3018
3019
  """
3019
3020
 
3020
- __version__ = "1.16.6"
3021
+ __version__ = "1.16.7"
3021
3022
  __author__ = "AKFamily"
3022
3023
 
3023
3024
  import sys
@@ -7,10 +7,9 @@ https://quote.eastmoney.com/sh513500.html
7
7
  """
8
8
 
9
9
  from functools import lru_cache
10
- import math
10
+
11
11
  import pandas as pd
12
12
  import requests
13
- from akshare.utils.tqdm import get_tqdm
14
13
 
15
14
 
16
15
  @lru_cache()
@@ -24,9 +23,9 @@ def _fund_etf_code_id_map_em() -> dict:
24
23
  url = "https://88.push2.eastmoney.com/api/qt/clist/get"
25
24
  params = {
26
25
  "pn": "1",
27
- "pz": "200",
26
+ "pz": "50000",
28
27
  "po": "1",
29
- "np": "1",
28
+ "np": "2",
30
29
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
31
30
  "fltt": "2",
32
31
  "invt": "2",
@@ -38,20 +37,7 @@ def _fund_etf_code_id_map_em() -> dict:
38
37
  }
39
38
  r = requests.get(url, params=params, timeout=15)
40
39
  data_json = r.json()
41
- total_page = math.ceil(data_json["data"]["total"] / 200)
42
- temp_list = []
43
- tqdm = get_tqdm()
44
- for page in tqdm(range(1, total_page + 1), leave=False):
45
- params.update(
46
- {
47
- "pn": page,
48
- }
49
- )
50
- r = requests.get(url, params=params, timeout=15)
51
- data_json = r.json()
52
- inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
53
- temp_list.append(inner_temp_df)
54
- temp_df = pd.concat(temp_list, ignore_index=True)
40
+ temp_df = pd.DataFrame(data_json["data"]["diff"]).T
55
41
  temp_dict = dict(zip(temp_df["f12"], temp_df["f13"]))
56
42
  return temp_dict
57
43
 
@@ -66,9 +52,9 @@ def fund_etf_spot_em() -> pd.DataFrame:
66
52
  url = "https://88.push2.eastmoney.com/api/qt/clist/get"
67
53
  params = {
68
54
  "pn": "1",
69
- "pz": "200",
55
+ "pz": "50000",
70
56
  "po": "1",
71
- "np": "1",
57
+ "np": "2",
72
58
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
73
59
  "fltt": "2",
74
60
  "invt": "2",
@@ -87,20 +73,7 @@ def fund_etf_spot_em() -> pd.DataFrame:
87
73
  }
88
74
  r = requests.get(url, timeout=15, params=params)
89
75
  data_json = r.json()
90
- total_page = math.ceil(data_json["data"]["total"] / 200)
91
- temp_list = []
92
- tqdm = get_tqdm()
93
- for page in tqdm(range(1, total_page + 1), leave=False):
94
- params.update(
95
- {
96
- "pn": page,
97
- }
98
- )
99
- r = requests.get(url, params=params, timeout=15)
100
- data_json = r.json()
101
- inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
102
- temp_list.append(inner_temp_df)
103
- temp_df = pd.concat(temp_list, ignore_index=True)
76
+ temp_df = pd.DataFrame(data_json["data"]["diff"]).T
104
77
  temp_df.rename(
105
78
  columns={
106
79
  "f12": "代码",
@@ -26,7 +26,7 @@ def _fund_lof_code_id_map_em() -> dict:
26
26
  "pn": "1",
27
27
  "pz": "5000",
28
28
  "po": "1",
29
- "np": "1",
29
+ "np": "2",
30
30
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
31
31
  "fltt": "2",
32
32
  "invt": "2",
@@ -38,7 +38,7 @@ def _fund_lof_code_id_map_em() -> dict:
38
38
  }
39
39
  r = requests.get(url, params=params)
40
40
  data_json = r.json()
41
- temp_df = pd.DataFrame(data_json["data"]["diff"])
41
+ temp_df = pd.DataFrame(data_json["data"]["diff"]).T
42
42
  temp_dict = dict(zip(temp_df["f12"], temp_df["f13"]))
43
43
  return temp_dict
44
44
 
@@ -55,7 +55,7 @@ def fund_lof_spot_em() -> pd.DataFrame:
55
55
  "pn": "1",
56
56
  "pz": "5000",
57
57
  "po": "1",
58
- "np": "1",
58
+ "np": "2",
59
59
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
60
60
  "fltt": "2",
61
61
  "invt": "2",
@@ -68,7 +68,7 @@ def fund_lof_spot_em() -> pd.DataFrame:
68
68
  }
69
69
  r = requests.get(url, params=params)
70
70
  data_json = r.json()
71
- temp_df = pd.DataFrame(data_json["data"]["diff"])
71
+ temp_df = pd.DataFrame(data_json["data"]["diff"]).T
72
72
  temp_df.rename(
73
73
  columns={
74
74
  "f12": "代码",
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/1/17 19:30
4
+ Date: 2024/2/20 17:00
5
5
  Desc: 东方财富网-期货行情
6
6
  https://qhweb.eastmoney.com/quote
7
7
  """
8
8
 
9
9
  import re
10
10
  from functools import lru_cache
11
+ from typing import Tuple, Dict
11
12
 
12
13
  import pandas as pd
13
14
  import requests
@@ -53,7 +54,7 @@ def __fetch_exchange_symbol_raw_em() -> list:
53
54
 
54
55
 
55
56
  @lru_cache()
56
- def __get_exchange_symbol_map() -> tuple[dict, dict, dict, dict]:
57
+ def __get_exchange_symbol_map() -> Tuple[Dict, Dict, Dict, Dict]:
57
58
  """
58
59
  东方财富网-期货行情-交易所品种映射
59
60
  https://quote.eastmoney.com/qihuo/al2505.html
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/4/11 17:00
4
+ Date: 2025/2/20 17:00
5
5
  Desc: 东方财富网-行情中心-美股市场-粉单市场
6
6
  https://quote.eastmoney.com/center/gridlist.html#us_pinksheet
7
7
  """
@@ -20,9 +20,9 @@ def stock_us_pink_spot_em() -> pd.DataFrame:
20
20
  url = "https://23.push2.eastmoney.com/api/qt/clist/get"
21
21
  params = {
22
22
  "pn": "1",
23
- "pz": "2000",
23
+ "pz": "50000",
24
24
  "po": "1",
25
- "np": "1",
25
+ "np": "2",
26
26
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
27
27
  "fltt": "2",
28
28
  "invt": "2",
@@ -34,7 +34,7 @@ def stock_us_pink_spot_em() -> pd.DataFrame:
34
34
  }
35
35
  r = requests.get(url, params=params)
36
36
  data_json = r.json()
37
- temp_df = pd.DataFrame(data_json["data"]["diff"])
37
+ temp_df = pd.DataFrame(data_json["data"]["diff"]).T
38
38
  temp_df.columns = [
39
39
  "_",
40
40
  "最新价",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: akshare
3
- Version: 1.16.6
3
+ Version: 1.16.7
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=2S7vULTlyBglBAcI-0WFHB1gLaY1HgEcGdtWLv1Wy2c,187844
1
+ akshare/__init__.py,sha256=QG3baAikq03vAI74DtNmTXR4UEe4R6ZCgmCRQmM5LGs,187887
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
@@ -86,13 +86,13 @@ akshare/fund/fund_amac.py,sha256=Dml3EgpJhmVgkttb0OdaWN41ynOCIbJ0-1qAPDWF0oo,338
86
86
  akshare/fund/fund_announcement.py,sha256=g5rcIC9vQ4HapZd0b7cDbFYzHu9V6bOKhwxRHVfmv8k,1848
87
87
  akshare/fund/fund_aum_em.py,sha256=dy1R1-0X48H8S-LPiuggNA5M-6MvQ08fnp5bytvCGPQ,3518
88
88
  akshare/fund/fund_em.py,sha256=nX0VA5JeiF-zRr1J10X-U9-pJj5KFDUAbovN1DWjvTo,40450
89
- akshare/fund/fund_etf_em.py,sha256=WdekgvHHyBOA5ON3x--7I4uTnp_2U09hooszHlDqfDI,18320
89
+ akshare/fund/fund_etf_em.py,sha256=xswdZoMN8mcDA_q-lN9lvOjKEPUzoPBjOU7Nn0grIHM,17393
90
90
  akshare/fund/fund_etf_sina.py,sha256=YV2KrqKMF_h8kgrywvWvRJx2oy62lhgizvHFk40E4Rk,7042
91
91
  akshare/fund/fund_etf_ths.py,sha256=vb_jy0h2-Kz2dNWUrwBYxPB0MAotv0KZgnFhE98ohSM,3432
92
92
  akshare/fund/fund_fee_em.py,sha256=fa_Nfr4GWx4FNzNY0blBPhIZ3fGW5qedQOuYIAlVsvE,4158
93
93
  akshare/fund/fund_fhsp_em.py,sha256=-zSwwveiCB4HHRxwAuaLDTQHmNe3FxwxxeoPeiG8JbM,5546
94
94
  akshare/fund/fund_init_em.py,sha256=4kOhsOkEs50B-RAxz-fTyWxNC1J4jNBDoKGJlFUpIjQ,2210
95
- akshare/fund/fund_lof_em.py,sha256=eWpIlHzUYbscyxvz8awiDERxd7gTucHcGcrBPTCCFno,12473
95
+ akshare/fund/fund_lof_em.py,sha256=h3rpSeRenQYau-T8FnhfzrMpXmAkO7bxUzzSVROQhQE,12477
96
96
  akshare/fund/fund_manager.py,sha256=yhpXp_WKradzSc0dMfGKJibNCksts2L2Bg_gvUU4_VQ,2801
97
97
  akshare/fund/fund_portfolio_em.py,sha256=8kk7a8hA22ANfnlnK1j4f5qXepfkgJOiEMpuazP2Xlk,10785
98
98
  akshare/fund/fund_position_lg.py,sha256=dxwGvfc8SXlRziWBWHIcaqOOltsKlxHgHL0Cxr7cCeM,3857
@@ -113,7 +113,7 @@ akshare/futures/futures_contract_detail.py,sha256=auwzNdaoFi5hoJY6rNkO54v5FD2gmE
113
113
  akshare/futures/futures_daily_bar.py,sha256=pultXs8digLfWT0dzyWs0AtFk3Fi2uZDT-zxbg_PcOM,25299
114
114
  akshare/futures/futures_foreign.py,sha256=oSIoAg5oy-CIlPWHkQffcvZGu02Y2GWOrt-6aPA53Xg,2059
115
115
  akshare/futures/futures_hf_em.py,sha256=jne-wUYr2QTUkDq3qAxYKE0Hm90L3H8qUDu3JavKiUg,3338
116
- akshare/futures/futures_hist_em.py,sha256=23poFID_GE2mWf9NnkJBE3N7FgxNYiqrbTKO0VciS_A,6441
116
+ akshare/futures/futures_hist_em.py,sha256=Q8I20qRjp2ujiJMCCNBvTHXmrIth22p2k6KpvbkC3dk,6472
117
117
  akshare/futures/futures_hq_sina.py,sha256=eK1gEan4DPvpYmln8-tNnzh_J_733s95DBr--NqNYVA,9576
118
118
  akshare/futures/futures_index_ccidx.py,sha256=_kgWioCOpFNn8WUcL5qKHGb3rUHzrbrx2AszprKpBh4,4460
119
119
  akshare/futures/futures_inventory_99.py,sha256=pK1nzPNplRexvb2iFnU6Y_4blINTP8z-OFbQYzR3Q0g,2990
@@ -271,7 +271,7 @@ akshare/stock/stock_stop.py,sha256=8HyazJAFj-s12ujUtrxO8VPXyA5bF9-3eNEj0qzGwMg,1
271
271
  akshare/stock/stock_summary.py,sha256=CkUB2Y4ZcNtNbyKb1hJZDG9KvlvqMDNvcPwLN7iO7AQ,22891
272
272
  akshare/stock/stock_us_famous.py,sha256=enx_-EzEJWAhrMVQZaN83ETY_YEWO2xEStRm6z3upO0,3655
273
273
  akshare/stock/stock_us_js.py,sha256=wwZpRvVHqjxwd0cb2O5vtRW8Zw90Kdl5O4XNwoevN64,2502
274
- akshare/stock/stock_us_pink.py,sha256=jgkEjPm_qa4zSN1MH0unHJopSkcF-8Rqlp5Kus2KaQ8,3062
274
+ akshare/stock/stock_us_pink.py,sha256=BX7-tG4Zs0k2vSYGxHH0Yob-moD6AAu2a-ytZpxgIRQ,3065
275
275
  akshare/stock/stock_us_sina.py,sha256=D4fhJgpmvnlVoeSV2wQQ7H6lig8h6vaJp71o88dZhDg,8200
276
276
  akshare/stock/stock_weibo_nlp.py,sha256=eM7ofsNSrKiYeS0g38Qj9CxT6dkJZrn_pmziIiTqp4U,3286
277
277
  akshare/stock/stock_xq.py,sha256=E7dCNJw8GsJry3lU1LzCjADqRhrsZE4fERIF-G5SoVE,4641
@@ -380,8 +380,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
380
380
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
381
381
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
382
382
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
383
- akshare-1.16.6.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
384
- akshare-1.16.6.dist-info/METADATA,sha256=kSSJUrNux_8cz8o8Wo80-BY6S9IfOkJGuvlF3NLz5qo,13678
385
- akshare-1.16.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
386
- akshare-1.16.6.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
387
- akshare-1.16.6.dist-info/RECORD,,
383
+ akshare-1.16.7.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
384
+ akshare-1.16.7.dist-info/METADATA,sha256=K4M0hgeH4JCfh4dddujBhBN20boaw_FAOJcpa4o4XR0,13678
385
+ akshare-1.16.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
386
+ akshare-1.16.7.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
387
+ akshare-1.16.7.dist-info/RECORD,,