akshare 1.15.67__py3-none-any.whl → 1.15.69__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 +3 -1
- akshare/futures/cot.py +7 -5
- akshare/index/index_zh_em.py +6 -4
- akshare/stock_feature/stock_research_report_em.py +46 -18
- {akshare-1.15.67.dist-info → akshare-1.15.69.dist-info}/METADATA +14 -2
- {akshare-1.15.67.dist-info → akshare-1.15.69.dist-info}/RECORD +9 -9
- {akshare-1.15.67.dist-info → akshare-1.15.69.dist-info}/WHEEL +1 -1
- {akshare-1.15.67.dist-info → akshare-1.15.69.dist-info}/LICENSE +0 -0
- {akshare-1.15.67.dist-info → akshare-1.15.69.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2977,9 +2977,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2977
2977
|
1.15.65 fix: fix option_czce_daily interface
|
|
2978
2978
|
1.15.66 fix: fix fund_etf_dividend_sina interface
|
|
2979
2979
|
1.15.67 fix: fix stock_hold_change_cninfo interface
|
|
2980
|
+
1.15.68 fix: fix stock_research_report_em interface
|
|
2981
|
+
1.15.69 fix: fix index_zh_a_hist_min_em interface
|
|
2980
2982
|
"""
|
|
2981
2983
|
|
|
2982
|
-
__version__ = "1.15.
|
|
2984
|
+
__version__ = "1.15.69"
|
|
2983
2985
|
__author__ = "AKFamily"
|
|
2984
2986
|
|
|
2985
2987
|
import sys
|
akshare/futures/cot.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2025/1/10 18:30
|
|
5
5
|
Desc: 期货-中国-交易所-会员持仓数据接口
|
|
6
6
|
大连商品交易所、上海期货交易所、郑州商品交易所、中国金融期货交易所、广州期货交易所
|
|
7
7
|
采集前 20 会员持仓数据;
|
|
@@ -1171,7 +1171,7 @@ def __futures_gfex_vars_list() -> list:
|
|
|
1171
1171
|
return var_list
|
|
1172
1172
|
|
|
1173
1173
|
|
|
1174
|
-
def __futures_gfex_contract_list(symbol: str = "si", date: str = "
|
|
1174
|
+
def __futures_gfex_contract_list(symbol: str = "si", date: str = "20240729") -> list:
|
|
1175
1175
|
"""
|
|
1176
1176
|
广州期货交易所-合约具体名称列表
|
|
1177
1177
|
http://www.gfex.com.cn/gfex/rcjccpm/hqsj_tjsj.shtml
|
|
@@ -1194,6 +1194,8 @@ def __futures_gfex_contract_list(symbol: str = "si", date: str = "20231113") ->
|
|
|
1194
1194
|
r = requests.post(url=url, data=payload, headers=headers)
|
|
1195
1195
|
data_json = r.json()
|
|
1196
1196
|
temp_df = pd.DataFrame(data_json["data"])
|
|
1197
|
+
if temp_df.empty:
|
|
1198
|
+
return []
|
|
1197
1199
|
contract_list = temp_df.iloc[:, 0].tolist()
|
|
1198
1200
|
return contract_list
|
|
1199
1201
|
|
|
@@ -1317,7 +1319,7 @@ def futures_gfex_position_rank(date: str = "20231113", vars_list: list = None):
|
|
|
1317
1319
|
symbol=item.lower(), date=date
|
|
1318
1320
|
)
|
|
1319
1321
|
except: # noqa: E722
|
|
1320
|
-
return
|
|
1322
|
+
return big_dict
|
|
1321
1323
|
for name in futures_contract_list:
|
|
1322
1324
|
try:
|
|
1323
1325
|
temp_df = __futures_gfex_contract_data(
|
|
@@ -1325,7 +1327,7 @@ def futures_gfex_position_rank(date: str = "20231113", vars_list: list = None):
|
|
|
1325
1327
|
)
|
|
1326
1328
|
big_dict[name] = temp_df
|
|
1327
1329
|
except: # noqa: E722
|
|
1328
|
-
return
|
|
1330
|
+
return big_dict
|
|
1329
1331
|
return big_dict
|
|
1330
1332
|
|
|
1331
1333
|
|
|
@@ -1371,7 +1373,7 @@ if __name__ == "__main__":
|
|
|
1371
1373
|
print(futures_dce_position_rank_other_df)
|
|
1372
1374
|
|
|
1373
1375
|
# 广州期货交易所
|
|
1374
|
-
futures_gfex_position_rank_df = futures_gfex_position_rank(date="
|
|
1376
|
+
futures_gfex_position_rank_df = futures_gfex_position_rank(date="20240729")
|
|
1375
1377
|
print(futures_gfex_position_rank_df)
|
|
1376
1378
|
|
|
1377
1379
|
# 总接口
|
akshare/index/index_zh_em.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2025/1/10 18:10
|
|
5
5
|
Desc: 东方财富网-指数行情数据
|
|
6
6
|
"""
|
|
7
7
|
|
|
@@ -85,6 +85,8 @@ def index_code_id_map_em() -> dict:
|
|
|
85
85
|
key: value - 1 if value == 1 else value + 1
|
|
86
86
|
for key, value in code_id_dict.items()
|
|
87
87
|
}
|
|
88
|
+
# 单独增加品种
|
|
89
|
+
code_id_dict.update({"932000": 2})
|
|
88
90
|
return code_id_dict
|
|
89
91
|
|
|
90
92
|
|
|
@@ -438,9 +440,9 @@ if __name__ == "__main__":
|
|
|
438
440
|
print(index_zh_a_hist_df)
|
|
439
441
|
|
|
440
442
|
index_zh_a_hist_min_em_df = index_zh_a_hist_min_em(
|
|
441
|
-
symbol="
|
|
443
|
+
symbol="932000",
|
|
442
444
|
period="1",
|
|
443
|
-
start_date="
|
|
444
|
-
end_date="
|
|
445
|
+
start_date="2025-01-10 09:30:00",
|
|
446
|
+
end_date="2025-01-10 19:00:00",
|
|
445
447
|
)
|
|
446
448
|
print(index_zh_a_hist_min_em_df)
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2025/1/9 21:35
|
|
5
5
|
Desc: 东方财富网-数据中心-研究报告-个股研报
|
|
6
6
|
https://data.eastmoney.com/report/stock.jshtml
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
import pandas as pd
|
|
9
10
|
import requests
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
from akshare.utils.tqdm import get_tqdm
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
|
|
@@ -40,7 +42,9 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
|
|
|
40
42
|
r = requests.get(url, params=params)
|
|
41
43
|
data_json = r.json()
|
|
42
44
|
total_page = data_json["TotalPage"]
|
|
45
|
+
current_year = data_json["currentYear"]
|
|
43
46
|
big_df = pd.DataFrame()
|
|
47
|
+
tqdm = get_tqdm()
|
|
44
48
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
45
49
|
params.update(
|
|
46
50
|
{
|
|
@@ -53,9 +57,15 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
|
|
|
53
57
|
r = requests.get(url, params=params)
|
|
54
58
|
data_json = r.json()
|
|
55
59
|
temp_df = pd.DataFrame(data_json["data"])
|
|
56
|
-
big_df = pd.concat([big_df, temp_df], axis=0, ignore_index=True)
|
|
60
|
+
big_df = pd.concat(objs=[big_df, temp_df], axis=0, ignore_index=True)
|
|
57
61
|
big_df.reset_index(inplace=True)
|
|
58
62
|
big_df["index"] = big_df["index"] + 1
|
|
63
|
+
predict_this_year_eps_title = f"{current_year}-盈利预测-收益"
|
|
64
|
+
predict_this_year_pe_title = f"{current_year}-盈利预测-市盈率"
|
|
65
|
+
predict_next_year_eps_title = f"{current_year + 1}-盈利预测-收益"
|
|
66
|
+
predict_next_year_pe_title = f"{current_year + 1}-盈利预测-市盈率"
|
|
67
|
+
predict_next_two_year_eps_title = f"{current_year + 2}-盈利预测-收益"
|
|
68
|
+
predict_next_two_year_pe_title = f"{current_year + 2}-盈利预测-市盈率"
|
|
59
69
|
big_df.rename(
|
|
60
70
|
columns={
|
|
61
71
|
"index": "序号",
|
|
@@ -68,12 +78,12 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
|
|
|
68
78
|
"publishDate": "日期",
|
|
69
79
|
"infoCode": "-",
|
|
70
80
|
"column": "-",
|
|
71
|
-
"predictNextTwoYearEps":
|
|
72
|
-
"predictNextTwoYearPe":
|
|
73
|
-
"predictNextYearEps":
|
|
74
|
-
"predictNextYearPe":
|
|
75
|
-
"predictThisYearEps":
|
|
76
|
-
"predictThisYearPe":
|
|
81
|
+
"predictNextTwoYearEps": predict_next_two_year_eps_title,
|
|
82
|
+
"predictNextTwoYearPe": predict_next_two_year_pe_title,
|
|
83
|
+
"predictNextYearEps": predict_next_year_eps_title,
|
|
84
|
+
"predictNextYearPe": predict_next_year_pe_title,
|
|
85
|
+
"predictThisYearEps": predict_this_year_eps_title,
|
|
86
|
+
"predictThisYearPe": predict_this_year_pe_title,
|
|
77
87
|
"predictLastYearEps": "-",
|
|
78
88
|
"predictLastYearPe": "-",
|
|
79
89
|
"actualLastTwoYearEps": "-",
|
|
@@ -122,20 +132,38 @@ def stock_research_report_em(symbol: str = "000001") -> pd.DataFrame:
|
|
|
122
132
|
"东财评级",
|
|
123
133
|
"机构",
|
|
124
134
|
"近一月个股研报数",
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
predict_this_year_eps_title,
|
|
136
|
+
predict_this_year_pe_title,
|
|
137
|
+
predict_next_year_eps_title,
|
|
138
|
+
predict_next_year_pe_title,
|
|
139
|
+
predict_next_two_year_eps_title,
|
|
140
|
+
predict_next_two_year_pe_title,
|
|
129
141
|
"行业",
|
|
130
142
|
"日期",
|
|
131
143
|
]
|
|
132
144
|
]
|
|
133
145
|
big_df["日期"] = pd.to_datetime(big_df["日期"], errors="coerce").dt.date
|
|
134
|
-
big_df["近一月个股研报数"] = pd.to_numeric(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
big_df[
|
|
138
|
-
|
|
146
|
+
big_df["近一月个股研报数"] = pd.to_numeric(
|
|
147
|
+
big_df["近一月个股研报数"], errors="coerce"
|
|
148
|
+
)
|
|
149
|
+
big_df[predict_this_year_eps_title] = pd.to_numeric(
|
|
150
|
+
big_df[predict_this_year_eps_title], errors="coerce"
|
|
151
|
+
)
|
|
152
|
+
big_df[predict_this_year_pe_title] = pd.to_numeric(
|
|
153
|
+
big_df[predict_this_year_pe_title], errors="coerce"
|
|
154
|
+
)
|
|
155
|
+
big_df[predict_next_year_eps_title] = pd.to_numeric(
|
|
156
|
+
big_df[predict_next_year_eps_title], errors="coerce"
|
|
157
|
+
)
|
|
158
|
+
big_df[predict_next_year_pe_title] = pd.to_numeric(
|
|
159
|
+
big_df[predict_next_year_pe_title], errors="coerce"
|
|
160
|
+
)
|
|
161
|
+
big_df[predict_next_two_year_eps_title] = pd.to_numeric(
|
|
162
|
+
big_df[predict_next_two_year_eps_title], errors="coerce"
|
|
163
|
+
)
|
|
164
|
+
big_df[predict_next_two_year_pe_title] = pd.to_numeric(
|
|
165
|
+
big_df[predict_next_two_year_pe_title], errors="coerce"
|
|
166
|
+
)
|
|
139
167
|
return big_df
|
|
140
168
|
|
|
141
169
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: akshare
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.69
|
|
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
|
|
@@ -37,6 +37,18 @@ Provides-Extra: full
|
|
|
37
37
|
Requires-Dist: akqmt; extra == "full"
|
|
38
38
|
Provides-Extra: qmt
|
|
39
39
|
Requires-Dist: akqmt; extra == "qmt"
|
|
40
|
+
Dynamic: author
|
|
41
|
+
Dynamic: author-email
|
|
42
|
+
Dynamic: classifier
|
|
43
|
+
Dynamic: description
|
|
44
|
+
Dynamic: description-content-type
|
|
45
|
+
Dynamic: home-page
|
|
46
|
+
Dynamic: keywords
|
|
47
|
+
Dynamic: license
|
|
48
|
+
Dynamic: provides-extra
|
|
49
|
+
Dynamic: requires-dist
|
|
50
|
+
Dynamic: requires-python
|
|
51
|
+
Dynamic: summary
|
|
40
52
|
|
|
41
53
|
**欢迎加入专注于财经数据和量化投资的知识社区,请点击[了解更多](https://akshare.akfamily.xyz/learn.html)**
|
|
42
54
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=i0Cz2lTw5pRpEQyUD8wrbM2lTy7WInQeiGUDeG89_Ao,185942
|
|
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
|
|
@@ -104,7 +104,7 @@ akshare/fund/fund_scale_sina.py,sha256=A0qIzWBQdE3IGS9-cxO9_FNpuH-BAG5HhPk5KzTFT
|
|
|
104
104
|
akshare/fund/fund_xq.py,sha256=AxMZB-940bNY7-BatVLZiseHNxiWA17hQzTfuxGibPU,11306
|
|
105
105
|
akshare/futures/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
|
|
106
106
|
akshare/futures/cons.py,sha256=swjc7oENcgqtFobdSLozErxyl2xVlWLVwMx8_Q1jFac,14765
|
|
107
|
-
akshare/futures/cot.py,sha256=
|
|
107
|
+
akshare/futures/cot.py,sha256=GptYlcw4lyHOhW8M5hW55sNMk_fz3swjikhaSJqAmYo,58624
|
|
108
108
|
akshare/futures/futures_basis.py,sha256=pmXNXdWnfvJCRs6xKJ0Ed9R2v92-NK2Sp3AjlwecErc,15691
|
|
109
109
|
akshare/futures/futures_comex_em.py,sha256=V-mkKQkH5N8PyaZWKdyggb2lTnY8DDDxiUPt-1leQu0,3171
|
|
110
110
|
akshare/futures/futures_comm_ctp.py,sha256=V8TEKO0R0i6LfE8DDFqrMA3JGwNlpmaQCvvMugKZ1I8,1004
|
|
@@ -171,7 +171,7 @@ akshare/index/index_sugar.py,sha256=B_Nj9Q6JP-Y_d7myZ0C79izTxxrbuZIp1Vv_CilVMOc,
|
|
|
171
171
|
akshare/index/index_sw.py,sha256=hETMmFszQb7JDY8UHjLK8szfwkr7Ui_6QcseOoEfxaI,10456
|
|
172
172
|
akshare/index/index_yw.py,sha256=6FF38kooLQulnMTqAd1__TNWip4XC1VA72k3T049xYc,4319
|
|
173
173
|
akshare/index/index_zh_a_scope.py,sha256=4Ej2Gnqtd66EBiI67sQZKhblcIJXdD5CoMIJYD_KwYU,1367
|
|
174
|
-
akshare/index/index_zh_em.py,sha256=
|
|
174
|
+
akshare/index/index_zh_em.py,sha256=j62koX1r5ifRNWUgRW8tHs_xRYJrn_CgyMitZlQaoIE,16419
|
|
175
175
|
akshare/interest_rate/__init__.py,sha256=O6dl1roEQUWwtXgRpa6wOABUU7MH0YmFDrkfhBpYOX4,81
|
|
176
176
|
akshare/interest_rate/interbank_rate_em.py,sha256=iKvmWxM4bpl9JgHNvavq0yhzMRq69BPEON1cGcWJrf4,4549
|
|
177
177
|
akshare/movie/__init__.py,sha256=YzijIIzvGpcc9hORC6qJSEK6vkjH5c4Docb5tQq2iHs,82
|
|
@@ -330,7 +330,7 @@ akshare/stock_feature/stock_market_legu.py,sha256=_LeyGUGyZFeD-1fnJPc4eIQkeoWAmo
|
|
|
330
330
|
akshare/stock_feature/stock_pankou_em.py,sha256=A3lu1hKddXwMFo9vKPLCQfL3Zh77xr2IbcAtKs8Lc9Y,5599
|
|
331
331
|
akshare/stock_feature/stock_qsjy_em.py,sha256=7EHroLZC3-X_3WNhb7GV9MPQHbxjtkfKI_YEbTvnSb0,3913
|
|
332
332
|
akshare/stock_feature/stock_report_em.py,sha256=jhePrTKGIYzdz8idiPoDs1vEajd73XRIFpZyWQggKa4,18075
|
|
333
|
-
akshare/stock_feature/stock_research_report_em.py,sha256=
|
|
333
|
+
akshare/stock_feature/stock_research_report_em.py,sha256=z6nsoai1wUK5EfMoef-7KBd-BqqAGgKdoR01qukWBwk,5900
|
|
334
334
|
akshare/stock_feature/stock_sns_sseinfo.py,sha256=TGGLw5P77Hh-sSHgw_KKoK29d1m_V_2GDQXe9m_XFew,4556
|
|
335
335
|
akshare/stock_feature/stock_sy_em.py,sha256=GysP1WvPpqCLhbCRXH5sxwmXCPYvgtbJYQ_jltDqaA0,17721
|
|
336
336
|
akshare/stock_feature/stock_technology_ths.py,sha256=4u9z7H6MYEutOYAQvYfzgc_FxG6XlhkMLujSotAbraw,30827
|
|
@@ -378,8 +378,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
|
378
378
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
379
379
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
380
380
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
|
381
|
-
akshare-1.15.
|
|
382
|
-
akshare-1.15.
|
|
383
|
-
akshare-1.15.
|
|
384
|
-
akshare-1.15.
|
|
385
|
-
akshare-1.15.
|
|
381
|
+
akshare-1.15.69.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
382
|
+
akshare-1.15.69.dist-info/METADATA,sha256=PhHwU8uJGuYZ1qKZEVRe9alcI8GlG61oRJn2NQr363I,13679
|
|
383
|
+
akshare-1.15.69.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
384
|
+
akshare-1.15.69.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
385
|
+
akshare-1.15.69.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|