akshare 1.16.40__py3-none-any.whl → 1.16.42__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 +3 -1
- akshare/stock/stock_board_industry_em.py +4 -8
- akshare/stock/stock_fund_em.py +18 -31
- {akshare-1.16.40.dist-info → akshare-1.16.42.dist-info}/METADATA +1 -1
- {akshare-1.16.40.dist-info → akshare-1.16.42.dist-info}/RECORD +8 -8
- {akshare-1.16.40.dist-info → akshare-1.16.42.dist-info}/LICENSE +0 -0
- {akshare-1.16.40.dist-info → akshare-1.16.42.dist-info}/WHEEL +0 -0
- {akshare-1.16.40.dist-info → akshare-1.16.42.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
@@ -3049,9 +3049,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
3049
3049
|
1.16.38 fix: fix fund_etf_hist_em interface
|
3050
3050
|
1.16.39 fix: fix option_current_em interface
|
3051
3051
|
1.16.40 add: add stock_individual_basic_info_xq interface
|
3052
|
+
1.16.41 fix: fix stock_individual_fund_flow_rank interface
|
3053
|
+
1.16.42 fix: fix stock_concept_fund_flow_hist interface
|
3052
3054
|
"""
|
3053
3055
|
|
3054
|
-
__version__ = "1.16.
|
3056
|
+
__version__ = "1.16.42"
|
3055
3057
|
__author__ = "AKFamily"
|
3056
3058
|
|
3057
3059
|
import sys
|
@@ -484,9 +484,9 @@ def stock_board_industry_cons_em(symbol: str = "小金属") -> pd.DataFrame:
|
|
484
484
|
url = "https://29.push2.eastmoney.com/api/qt/clist/get"
|
485
485
|
params = {
|
486
486
|
"pn": "1",
|
487
|
-
"pz": "
|
487
|
+
"pz": "100",
|
488
488
|
"po": "1",
|
489
|
-
"np": "
|
489
|
+
"np": "1",
|
490
490
|
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
491
491
|
"fltt": "2",
|
492
492
|
"invt": "2",
|
@@ -496,11 +496,7 @@ def stock_board_industry_cons_em(symbol: str = "小金属") -> pd.DataFrame:
|
|
496
496
|
"f23,f24,f25,f22,f11,f62,f128,f136,f115,f152,f45",
|
497
497
|
"_": "1626081702127",
|
498
498
|
}
|
499
|
-
|
500
|
-
data_json = r.json()
|
501
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
502
|
-
temp_df.reset_index(inplace=True)
|
503
|
-
temp_df["index"] = range(1, len(temp_df) + 1)
|
499
|
+
temp_df = fetch_paginated_data(url, params)
|
504
500
|
temp_df.columns = [
|
505
501
|
"序号",
|
506
502
|
"_",
|
@@ -593,5 +589,5 @@ if __name__ == "__main__":
|
|
593
589
|
)
|
594
590
|
print(stock_board_industry_hist_min_em_df)
|
595
591
|
|
596
|
-
stock_board_industry_cons_em_df = stock_board_industry_cons_em(symbol="
|
592
|
+
stock_board_industry_cons_em_df = stock_board_industry_cons_em(symbol="互联网服务")
|
597
593
|
print(stock_board_industry_cons_em_df)
|
akshare/stock/stock_fund_em.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# -*- coding:utf-8 -*-
|
3
3
|
"""
|
4
|
-
Date: 2025/3/
|
4
|
+
Date: 2025/3/10 19:00
|
5
5
|
Desc: 东方财富网-数据中心-资金流向
|
6
6
|
https://data.eastmoney.com/zjlx/detail.html
|
7
7
|
"""
|
@@ -12,6 +12,8 @@ from functools import lru_cache
|
|
12
12
|
|
13
13
|
import pandas as pd
|
14
14
|
import requests
|
15
|
+
|
16
|
+
from akshare.utils.func import fetch_paginated_data
|
15
17
|
from akshare.utils.tqdm import get_tqdm
|
16
18
|
|
17
19
|
|
@@ -148,7 +150,7 @@ def stock_individual_fund_flow_rank(indicator: str = "5日") -> pd.DataFrame:
|
|
148
150
|
params = {
|
149
151
|
"fid": indicator_map[indicator][0],
|
150
152
|
"po": "1",
|
151
|
-
"pz": "
|
153
|
+
"pz": "100",
|
152
154
|
"pn": "1",
|
153
155
|
"np": "1",
|
154
156
|
"fltt": "2",
|
@@ -159,7 +161,7 @@ def stock_individual_fund_flow_rank(indicator: str = "5日") -> pd.DataFrame:
|
|
159
161
|
}
|
160
162
|
r = requests.get(url, params=params)
|
161
163
|
data_json = r.json()
|
162
|
-
total_page = math.ceil(data_json["data"]["total"] /
|
164
|
+
total_page = math.ceil(data_json["data"]["total"] / 100)
|
163
165
|
temp_list = []
|
164
166
|
tqdm = get_tqdm()
|
165
167
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
@@ -480,7 +482,7 @@ def stock_sector_fund_flow_rank(
|
|
480
482
|
}
|
481
483
|
params = {
|
482
484
|
"pn": "1",
|
483
|
-
"pz": "
|
485
|
+
"pz": "100",
|
484
486
|
"po": "1",
|
485
487
|
"np": "1",
|
486
488
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
@@ -495,7 +497,7 @@ def stock_sector_fund_flow_rank(
|
|
495
497
|
}
|
496
498
|
r = requests.get(url, params=params, headers=headers)
|
497
499
|
data_json = r.json()
|
498
|
-
total_page = math.ceil(data_json["data"]["total"] /
|
500
|
+
total_page = math.ceil(data_json["data"]["total"] / 100)
|
499
501
|
temp_list = []
|
500
502
|
tqdm = get_tqdm()
|
501
503
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
@@ -654,15 +656,11 @@ def _get_stock_sector_fund_flow_summary_code() -> dict:
|
|
654
656
|
:rtype: dict
|
655
657
|
"""
|
656
658
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
657
|
-
headers = {
|
658
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
659
|
-
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
660
|
-
}
|
661
659
|
params = {
|
662
660
|
"pn": "1",
|
663
|
-
"pz": "
|
661
|
+
"pz": "100",
|
664
662
|
"po": "1",
|
665
|
-
"np": "
|
663
|
+
"np": "1",
|
666
664
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
667
665
|
"fltt": "2",
|
668
666
|
"invt": "2",
|
@@ -673,9 +671,7 @@ def _get_stock_sector_fund_flow_summary_code() -> dict:
|
|
673
671
|
"rt": "52975239",
|
674
672
|
"_": int(time.time() * 1000),
|
675
673
|
}
|
676
|
-
|
677
|
-
data_json = r.json()
|
678
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
674
|
+
temp_df = fetch_paginated_data(url, params)
|
679
675
|
name_code_map = dict(zip(temp_df["f14"], temp_df["f12"]))
|
680
676
|
return name_code_map
|
681
677
|
|
@@ -1063,24 +1059,18 @@ def _get_stock_concept_fund_flow_summary_code() -> dict:
|
|
1063
1059
|
:rtype: dict
|
1064
1060
|
"""
|
1065
1061
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
1066
|
-
headers = {
|
1067
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
1068
|
-
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
1069
|
-
}
|
1070
1062
|
params = {
|
1071
1063
|
"pn": "1",
|
1072
|
-
"pz": "
|
1064
|
+
"pz": "100",
|
1073
1065
|
"po": "1",
|
1074
|
-
"np": "
|
1075
|
-
"fields": "f12,f13,f14,f62",
|
1066
|
+
"np": "1",
|
1067
|
+
"fields": "f3,f12,f13,f14,f62",
|
1076
1068
|
"fid": "f62",
|
1077
1069
|
"fs": "m:90+t:3",
|
1078
1070
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
1079
1071
|
"_": int(time.time() * 1000),
|
1080
1072
|
}
|
1081
|
-
|
1082
|
-
data_json = r.json()
|
1083
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
1073
|
+
temp_df = fetch_paginated_data(url, params)
|
1084
1074
|
name_code_map = dict(zip(temp_df["f14"], temp_df["f12"]))
|
1085
1075
|
return name_code_map
|
1086
1076
|
|
@@ -1196,19 +1186,16 @@ def stock_main_fund_flow(symbol: str = "全部股票") -> pd.DataFrame:
|
|
1196
1186
|
params = {
|
1197
1187
|
"fid": "f184",
|
1198
1188
|
"po": "1",
|
1199
|
-
"pz": "
|
1189
|
+
"pz": "100",
|
1200
1190
|
"pn": "1",
|
1201
|
-
"np": "
|
1191
|
+
"np": "1",
|
1202
1192
|
"fltt": "2",
|
1203
1193
|
"invt": "2",
|
1204
1194
|
"fields": "f2,f3,f12,f13,f14,f62,f184,f225,f165,f263,f109,f175,f264,f160,f100,f124,f265,f1",
|
1205
1195
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
1206
1196
|
"fs": symbol_map[symbol],
|
1207
1197
|
}
|
1208
|
-
|
1209
|
-
data_json = r.json()
|
1210
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
1211
|
-
temp_df["序号"] = range(1, len(temp_df) + 1)
|
1198
|
+
temp_df = fetch_paginated_data(url, params)
|
1212
1199
|
temp_df.rename(
|
1213
1200
|
columns={
|
1214
1201
|
"index": "序号",
|
@@ -1329,7 +1316,7 @@ if __name__ == "__main__":
|
|
1329
1316
|
stock_sector_fund_flow_hist_df = stock_sector_fund_flow_hist(symbol="汽车服务")
|
1330
1317
|
print(stock_sector_fund_flow_hist_df)
|
1331
1318
|
|
1332
|
-
stock_concept_fund_flow_hist_df = stock_concept_fund_flow_hist(symbol="
|
1319
|
+
stock_concept_fund_flow_hist_df = stock_concept_fund_flow_hist(symbol="半导体概念")
|
1333
1320
|
print(stock_concept_fund_flow_hist_df)
|
1334
1321
|
|
1335
1322
|
stock_main_fund_flow_df = stock_main_fund_flow(symbol="全部股票")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
akshare/__init__.py,sha256
|
1
|
+
akshare/__init__.py,sha256=-P-dQVfwAFdwj_EGC3J8pDdvbBtFkBP7AlNzVTuJQ8w,190842
|
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
|
@@ -237,13 +237,13 @@ akshare/stock/cons.py,sha256=0oyUW5Pu-iQ3qgh-TFemM_O5f1fAwVe-PsI4Qa8EYpQ,42956
|
|
237
237
|
akshare/stock/stock_allotment_cninfo.py,sha256=OVjVdWp2XVRNbJvVgtgVVoBmPBJgBB4RyIIgA_9QHM8,6066
|
238
238
|
akshare/stock/stock_ask_bid_em.py,sha256=bo7VNkp1PmK4Z-GPZuVn_I-IAdzeW8cs3W_75KodxCg,3368
|
239
239
|
akshare/stock/stock_board_concept_em.py,sha256=9gf-hhb9-s-iOnPD7mlBSAf8_XYbyB-ly1Z8eg5CBGc,18116
|
240
|
-
akshare/stock/stock_board_industry_em.py,sha256=
|
240
|
+
akshare/stock/stock_board_industry_em.py,sha256=h9sQsprP8pqC6hkp9OQ8b9oWiaLqF_18Mt-X3h1ULhI,18755
|
241
241
|
akshare/stock/stock_cg_equity_mortgage.py,sha256=Pui5aWKKPwGuKjF_GNpejDzsMGNPrxiaJviLz3x2e9I,3426
|
242
242
|
akshare/stock/stock_cg_guarantee.py,sha256=ts7qcQhhyN1PHB7Q4XlMn38HhfVvubOvky9RZfmUP94,3844
|
243
243
|
akshare/stock/stock_cg_lawsuit.py,sha256=6Y92pPw0JgyrInteqHuU07G1jwmdX2wjaDtrJN8y6Hg,4129
|
244
244
|
akshare/stock/stock_dividend_cninfo.py,sha256=_vipLQu94qBDoPkaIWZKRFA0mFfgroUMnn5EdLcjAc4,3195
|
245
245
|
akshare/stock/stock_dzjy_em.py,sha256=QMo2w-_I9UnmCr1IXk_InFeW5ok_GpRE9HdWFDUdGyM,22556
|
246
|
-
akshare/stock/stock_fund_em.py,sha256=
|
246
|
+
akshare/stock/stock_fund_em.py,sha256=WG3dKSEwi6FWJWP_4_ktC-6KO2XW56C2yTTTKyYTw0c,49035
|
247
247
|
akshare/stock/stock_fund_hold.py,sha256=iFEmRFber7MF6aPi0QOJxpvYjO7I26KouUvC-xTQdCk,6056
|
248
248
|
akshare/stock/stock_gsrl_em.py,sha256=oy5vO681ZPTEehZgz10T8jgIQ8dNm_E7MXGr1PGoHqI,1951
|
249
249
|
akshare/stock/stock_hk_famous.py,sha256=uF1iUkrwvMMxvxE3-O7byxQ-oS0SjlMBwOEraTBA41s,3018
|
@@ -389,8 +389,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
389
389
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
390
390
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
391
391
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
392
|
-
akshare-1.16.
|
393
|
-
akshare-1.16.
|
394
|
-
akshare-1.16.
|
395
|
-
akshare-1.16.
|
396
|
-
akshare-1.16.
|
392
|
+
akshare-1.16.42.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
393
|
+
akshare-1.16.42.dist-info/METADATA,sha256=cMDLR_9CY4c3wt0agfAyRralyf1AFqhie9DuNIbIEX0,13653
|
394
|
+
akshare-1.16.42.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
395
|
+
akshare-1.16.42.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
396
|
+
akshare-1.16.42.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|