akshare 1.15.93__py3-none-any.whl → 1.15.94__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 +2 -1
- akshare/fund/fund_fee_em.py +3 -2
- akshare/index/index_stock_zh.py +32 -5
- akshare/index/index_zh_em.py +54 -17
- akshare/stock_feature/stock_hist_em.py +3 -1
- {akshare-1.15.93.dist-info → akshare-1.15.94.dist-info}/METADATA +1 -1
- {akshare-1.15.93.dist-info → akshare-1.15.94.dist-info}/RECORD +10 -10
- {akshare-1.15.93.dist-info → akshare-1.15.94.dist-info}/LICENSE +0 -0
- {akshare-1.15.93.dist-info → akshare-1.15.94.dist-info}/WHEEL +0 -0
- {akshare-1.15.93.dist-info → akshare-1.15.94.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -3003,9 +3003,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
3003
3003
|
1.15.91 fix: fix stock_board_concept_cons_em interface
|
|
3004
3004
|
1.15.92 fix: fix stock_main_fund_flow interface
|
|
3005
3005
|
1.15.93 fix: fix fund_etf_spot_em interface
|
|
3006
|
+
1.15.94 fix: fix stock_zh_index_spot_em interface
|
|
3006
3007
|
"""
|
|
3007
3008
|
|
|
3008
|
-
__version__ = "1.15.
|
|
3009
|
+
__version__ = "1.15.94"
|
|
3009
3010
|
__author__ = "AKFamily"
|
|
3010
3011
|
|
|
3011
3012
|
import sys
|
akshare/fund/fund_fee_em.py
CHANGED
|
@@ -6,10 +6,11 @@ Desc: 天天基金-基金档案
|
|
|
6
6
|
https://fundf10.eastmoney.com/jjfl_015641.html
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
import requests
|
|
10
|
-
import pandas as pd
|
|
11
9
|
from io import StringIO
|
|
12
10
|
|
|
11
|
+
import pandas as pd
|
|
12
|
+
import requests
|
|
13
|
+
|
|
13
14
|
|
|
14
15
|
def fund_fee_em(symbol: str = "015641", indicator: str = "认购费率") -> pd.DataFrame:
|
|
15
16
|
"""
|
akshare/index/index_stock_zh.py
CHANGED
|
@@ -7,6 +7,7 @@ Desc: 股票指数数据-新浪-东财-腾讯
|
|
|
7
7
|
https://finance.sina.com.cn/realstock/company/sz399552/nc.shtml
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
import math
|
|
10
11
|
import datetime
|
|
11
12
|
import re
|
|
12
13
|
|
|
@@ -135,7 +136,7 @@ def __stock_zh_main_spot_em() -> pd.DataFrame:
|
|
|
135
136
|
url = "https://33.push2.eastmoney.com/api/qt/clist/get"
|
|
136
137
|
params = {
|
|
137
138
|
"pn": "1",
|
|
138
|
-
"pz": "
|
|
139
|
+
"pz": "200",
|
|
139
140
|
"po": "1",
|
|
140
141
|
"np": "1",
|
|
141
142
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
@@ -151,7 +152,20 @@ def __stock_zh_main_spot_em() -> pd.DataFrame:
|
|
|
151
152
|
}
|
|
152
153
|
r = requests.get(url, params=params)
|
|
153
154
|
data_json = r.json()
|
|
154
|
-
|
|
155
|
+
total_page = math.ceil(data_json["data"]["total"] / 200)
|
|
156
|
+
temp_list = []
|
|
157
|
+
tqdm = get_tqdm()
|
|
158
|
+
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
159
|
+
params.update(
|
|
160
|
+
{
|
|
161
|
+
"pn": page,
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
r = requests.get(url, params=params, timeout=15)
|
|
165
|
+
data_json = r.json()
|
|
166
|
+
inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
|
|
167
|
+
temp_list.append(inner_temp_df)
|
|
168
|
+
temp_df = pd.concat(temp_list, ignore_index=True)
|
|
155
169
|
temp_df.reset_index(inplace=True)
|
|
156
170
|
temp_df["index"] = temp_df["index"] + 1
|
|
157
171
|
temp_df.rename(
|
|
@@ -205,7 +219,7 @@ def __stock_zh_main_spot_em() -> pd.DataFrame:
|
|
|
205
219
|
return temp_df
|
|
206
220
|
|
|
207
221
|
|
|
208
|
-
def stock_zh_index_spot_em(symbol: str = "
|
|
222
|
+
def stock_zh_index_spot_em(symbol: str = "沪深重要指数") -> pd.DataFrame:
|
|
209
223
|
"""
|
|
210
224
|
东方财富网-行情中心-沪深京指数
|
|
211
225
|
https://quote.eastmoney.com/center/gridlist.html#index_sz
|
|
@@ -226,7 +240,7 @@ def stock_zh_index_spot_em(symbol: str = "上证系列指数") -> pd.DataFrame:
|
|
|
226
240
|
}
|
|
227
241
|
params = {
|
|
228
242
|
"pn": "1",
|
|
229
|
-
"pz": "
|
|
243
|
+
"pz": "200",
|
|
230
244
|
"po": "1",
|
|
231
245
|
"np": "1",
|
|
232
246
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
@@ -241,7 +255,20 @@ def stock_zh_index_spot_em(symbol: str = "上证系列指数") -> pd.DataFrame:
|
|
|
241
255
|
}
|
|
242
256
|
r = requests.get(url, params=params)
|
|
243
257
|
data_json = r.json()
|
|
244
|
-
|
|
258
|
+
total_page = math.ceil(data_json["data"]["total"] / 200)
|
|
259
|
+
temp_list = []
|
|
260
|
+
tqdm = get_tqdm()
|
|
261
|
+
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
262
|
+
params.update(
|
|
263
|
+
{
|
|
264
|
+
"pn": page,
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
r = requests.get(url, params=params, timeout=15)
|
|
268
|
+
data_json = r.json()
|
|
269
|
+
inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
|
|
270
|
+
temp_list.append(inner_temp_df)
|
|
271
|
+
temp_df = pd.concat(temp_list, ignore_index=True)
|
|
245
272
|
temp_df.reset_index(inplace=True)
|
|
246
273
|
temp_df["index"] = temp_df["index"] + 1
|
|
247
274
|
temp_df.rename(
|
akshare/index/index_zh_em.py
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2025/
|
|
4
|
+
Date: 2025/2/16 18:10
|
|
5
5
|
Desc: 东方财富网-指数行情数据
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
import math
|
|
8
9
|
from functools import lru_cache
|
|
9
10
|
|
|
10
11
|
import pandas as pd
|
|
11
12
|
import requests
|
|
12
13
|
|
|
14
|
+
from akshare.utils.tqdm import get_tqdm
|
|
15
|
+
|
|
13
16
|
|
|
14
17
|
@lru_cache()
|
|
15
18
|
def index_code_id_map_em() -> dict:
|
|
@@ -22,7 +25,7 @@ def index_code_id_map_em() -> dict:
|
|
|
22
25
|
url = "https://80.push2.eastmoney.com/api/qt/clist/get"
|
|
23
26
|
params = {
|
|
24
27
|
"pn": "1",
|
|
25
|
-
"pz": "
|
|
28
|
+
"pz": "200",
|
|
26
29
|
"po": "1",
|
|
27
30
|
"np": "1",
|
|
28
31
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
@@ -35,15 +38,26 @@ def index_code_id_map_em() -> dict:
|
|
|
35
38
|
}
|
|
36
39
|
r = requests.get(url, params=params)
|
|
37
40
|
data_json = r.json()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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)
|
|
41
55
|
temp_df["market_id"] = 1
|
|
42
56
|
temp_df.columns = ["sh_code", "sh_id"]
|
|
43
57
|
code_id_dict = dict(zip(temp_df["sh_code"], temp_df["sh_id"]))
|
|
44
58
|
params = {
|
|
45
59
|
"pn": "1",
|
|
46
|
-
"pz": "
|
|
60
|
+
"pz": "200",
|
|
47
61
|
"po": "1",
|
|
48
62
|
"np": "1",
|
|
49
63
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
@@ -56,14 +70,26 @@ def index_code_id_map_em() -> dict:
|
|
|
56
70
|
}
|
|
57
71
|
r = requests.get(url, params=params)
|
|
58
72
|
data_json = r.json()
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
73
|
+
total_page = math.ceil(data_json["data"]["total"] / 200)
|
|
74
|
+
temp_list = []
|
|
75
|
+
tqdm = get_tqdm()
|
|
76
|
+
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
77
|
+
params.update(
|
|
78
|
+
{
|
|
79
|
+
"pn": page,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
r = requests.get(url, params=params, timeout=15)
|
|
83
|
+
data_json = r.json()
|
|
84
|
+
inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
|
|
85
|
+
temp_list.append(inner_temp_df)
|
|
86
|
+
temp_df_sz = pd.concat(temp_list, ignore_index=True)
|
|
62
87
|
temp_df_sz["sz_id"] = 0
|
|
63
88
|
code_id_dict.update(dict(zip(temp_df_sz["f12"], temp_df_sz["sz_id"])))
|
|
89
|
+
|
|
64
90
|
params = {
|
|
65
91
|
"pn": "1",
|
|
66
|
-
"pz": "
|
|
92
|
+
"pz": "200",
|
|
67
93
|
"po": "1",
|
|
68
94
|
"np": "1",
|
|
69
95
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
@@ -76,9 +102,20 @@ def index_code_id_map_em() -> dict:
|
|
|
76
102
|
}
|
|
77
103
|
r = requests.get(url, params=params)
|
|
78
104
|
data_json = r.json()
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
105
|
+
total_page = math.ceil(data_json["data"]["total"] / 200)
|
|
106
|
+
temp_list = []
|
|
107
|
+
tqdm = get_tqdm()
|
|
108
|
+
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
109
|
+
params.update(
|
|
110
|
+
{
|
|
111
|
+
"pn": page,
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
r = requests.get(url, params=params, timeout=15)
|
|
115
|
+
data_json = r.json()
|
|
116
|
+
inner_temp_df = pd.DataFrame(data_json["data"]["diff"])
|
|
117
|
+
temp_list.append(inner_temp_df)
|
|
118
|
+
temp_df_sz = pd.concat(temp_list, ignore_index=True)
|
|
82
119
|
temp_df_sz["bj_id"] = 0
|
|
83
120
|
code_id_dict.update(dict(zip(temp_df_sz["f12"], temp_df_sz["bj_id"])))
|
|
84
121
|
code_id_dict = {
|
|
@@ -440,9 +477,9 @@ if __name__ == "__main__":
|
|
|
440
477
|
print(index_zh_a_hist_df)
|
|
441
478
|
|
|
442
479
|
index_zh_a_hist_min_em_df = index_zh_a_hist_min_em(
|
|
443
|
-
symbol="
|
|
444
|
-
period="
|
|
445
|
-
start_date="2025-
|
|
446
|
-
end_date="2025-
|
|
480
|
+
symbol="000001",
|
|
481
|
+
period="15",
|
|
482
|
+
start_date="2025-02-14 09:30:00",
|
|
483
|
+
end_date="2025-02-14 19:00:00",
|
|
447
484
|
)
|
|
448
485
|
print(index_zh_a_hist_min_em_df)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=we_LAFKFonnukFubcTKsykI_fHLlgAqwg_5OI478eRQ,187287
|
|
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,7 +89,7 @@ akshare/fund/fund_em.py,sha256=nX0VA5JeiF-zRr1J10X-U9-pJj5KFDUAbovN1DWjvTo,40450
|
|
|
89
89
|
akshare/fund/fund_etf_em.py,sha256=a2h_htijqERVaplRYt3D8GALGFh8w3uLtlRo9y4aLaI,18319
|
|
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
|
-
akshare/fund/fund_fee_em.py,sha256=
|
|
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
95
|
akshare/fund/fund_lof_em.py,sha256=eWpIlHzUYbscyxvz8awiDERxd7gTucHcGcrBPTCCFno,12473
|
|
@@ -167,13 +167,13 @@ akshare/index/index_research_sw.py,sha256=Mm1YtiP-PXhDysJwmFidX3RZSZZ92AyXpjl_tV
|
|
|
167
167
|
akshare/index/index_spot.py,sha256=meTBTCp2DPVTX_N3qpCLtkI-0q3XhrJ3gndNugRBGKg,1767
|
|
168
168
|
akshare/index/index_stock_hk.py,sha256=nPFzRrjyiUpRK-OSDsdi5AFCKHNKqOVji6WJcQxOvNo,9781
|
|
169
169
|
akshare/index/index_stock_us_sina.py,sha256=IxOk4G49oasv7EfEQenL9-GLuelyUus6c4JPyRlaOzY,1551
|
|
170
|
-
akshare/index/index_stock_zh.py,sha256=
|
|
170
|
+
akshare/index/index_stock_zh.py,sha256=vwOmUs6B7XPJSVYK8A0kfRu8ewBkArIkxSYmpflOOLg,18563
|
|
171
171
|
akshare/index/index_stock_zh_csindex.py,sha256=sRVoDD-fitqAMuDs0XPm1oCz2nZ2QTkvNswL1WvXpwo,4164
|
|
172
172
|
akshare/index/index_sugar.py,sha256=B_Nj9Q6JP-Y_d7myZ0C79izTxxrbuZIp1Vv_CilVMOc,5006
|
|
173
173
|
akshare/index/index_sw.py,sha256=hETMmFszQb7JDY8UHjLK8szfwkr7Ui_6QcseOoEfxaI,10456
|
|
174
174
|
akshare/index/index_yw.py,sha256=6FF38kooLQulnMTqAd1__TNWip4XC1VA72k3T049xYc,4319
|
|
175
175
|
akshare/index/index_zh_a_scope.py,sha256=4Ej2Gnqtd66EBiI67sQZKhblcIJXdD5CoMIJYD_KwYU,1367
|
|
176
|
-
akshare/index/index_zh_em.py,sha256=
|
|
176
|
+
akshare/index/index_zh_em.py,sha256=j4vxtEb6hrCUVIlO0Tyey9REhI4ILa-rywTNQPtPQ_4,17614
|
|
177
177
|
akshare/interest_rate/__init__.py,sha256=O6dl1roEQUWwtXgRpa6wOABUU7MH0YmFDrkfhBpYOX4,81
|
|
178
178
|
akshare/interest_rate/interbank_rate_em.py,sha256=iKvmWxM4bpl9JgHNvavq0yhzMRq69BPEON1cGcWJrf4,4549
|
|
179
179
|
akshare/movie/__init__.py,sha256=YzijIIzvGpcc9hORC6qJSEK6vkjH5c4Docb5tQq2iHs,82
|
|
@@ -311,7 +311,7 @@ akshare/stock_feature/stock_gdhs.py,sha256=Z6ZMy1A03BqMu9TghcIu2Sd_wwEtpIH7qawHu
|
|
|
311
311
|
akshare/stock_feature/stock_gdzjc_em.py,sha256=SHJH5iS3_NhvjTqRXF0vPooZl0s_ASeyZmNCC50ZYqs,4426
|
|
312
312
|
akshare/stock_feature/stock_gpzy_em.py,sha256=FgyjVgdoxrtMM7WwxdQJxK0mYGJklIHaT9KmMCFmEPM,17869
|
|
313
313
|
akshare/stock_feature/stock_gxl_lg.py,sha256=I8TpDEpFzadZSSyZisyIk6163mJlRxup91dmlBH4t4U,2641
|
|
314
|
-
akshare/stock_feature/stock_hist_em.py,sha256=
|
|
314
|
+
akshare/stock_feature/stock_hist_em.py,sha256=GZ3bTQDk62TodMAKBWpkMS8r_13-VnFV9-fGxAcbOYY,70768
|
|
315
315
|
akshare/stock_feature/stock_hist_tx.py,sha256=WpLsbkG2didSx7lYNkSbTWNTrLhUKbcopfD18WO2Rlc,3397
|
|
316
316
|
akshare/stock_feature/stock_hk_valuation_baidu.py,sha256=_sErx4UhNsSXJgXyPfrL0aPxkW53Mg1zH9gEKoziaCA,1968
|
|
317
317
|
akshare/stock_feature/stock_hot_xq.py,sha256=NmoH4x-0hiDztj-YwzMFVIyOICQ2wUUBbhjt91q-tq4,9112
|
|
@@ -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.15.
|
|
384
|
-
akshare-1.15.
|
|
385
|
-
akshare-1.15.
|
|
386
|
-
akshare-1.15.
|
|
387
|
-
akshare-1.15.
|
|
383
|
+
akshare-1.15.94.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
384
|
+
akshare-1.15.94.dist-info/METADATA,sha256=jm8UvRnGQaPArvjDJoZruYr0M4Ky6y_qIOAiYLnU4_k,13679
|
|
385
|
+
akshare-1.15.94.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
386
|
+
akshare-1.15.94.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
387
|
+
akshare-1.15.94.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|