akshare 1.14.35__py3-none-any.whl → 1.14.36__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 +2 -1
- akshare/option/option_commodity.py +22 -5
- akshare/stock_feature/stock_board_industry_ths.py +5 -3
- {akshare-1.14.35.dist-info → akshare-1.14.36.dist-info}/METADATA +1 -1
- {akshare-1.14.35.dist-info → akshare-1.14.36.dist-info}/RECORD +8 -8
- {akshare-1.14.35.dist-info → akshare-1.14.36.dist-info}/WHEEL +1 -1
- {akshare-1.14.35.dist-info → akshare-1.14.36.dist-info}/LICENSE +0 -0
- {akshare-1.14.35.dist-info → akshare-1.14.36.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2846,9 +2846,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2846
2846
|
1.14.33 fix: fix stock_concept_cons_futu interface
|
|
2847
2847
|
1.14.34 add: add macro_rmb_loan interface
|
|
2848
2848
|
1.14.35 add: add macro_rmb_deposit interface
|
|
2849
|
+
1.14.36 fix: fix option_czce_daily interface
|
|
2849
2850
|
"""
|
|
2850
2851
|
|
|
2851
|
-
__version__ = "1.14.
|
|
2852
|
+
__version__ = "1.14.36"
|
|
2852
2853
|
__author__ = "AKFamily"
|
|
2853
2854
|
|
|
2854
2855
|
import sys
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/7/19 14:00
|
|
5
5
|
Desc: 商品期权数据
|
|
6
6
|
说明:
|
|
7
7
|
(1) 价格:自2019年12月02日起,纤维板报价单位由元/张改为元/立方米
|
|
@@ -144,10 +144,11 @@ def option_czce_daily(
|
|
|
144
144
|
) -> pd.DataFrame:
|
|
145
145
|
"""
|
|
146
146
|
郑州商品交易所-期权-日频行情数据
|
|
147
|
-
|
|
147
|
+
http://www.czce.com.cn/cn/sspz/dejbqhqq/H770227index_1.htm#tabs-2
|
|
148
148
|
:param trade_date: 交易日
|
|
149
149
|
:type trade_date: str
|
|
150
|
-
:param symbol: choice of {"白糖期权", "棉花期权", "甲醇期权", "PTA期权",
|
|
150
|
+
:param symbol: choice of {"白糖期权", "棉花期权", "甲醇期权", "PTA期权", "菜籽粕期权", "动力煤期权", "短纤期权",
|
|
151
|
+
"菜籽油期权", "花生期权", "棉花期权", "短纤期权", "纯碱期权", "锰硅期权", "硅铁期权", "尿素期权", "对二甲苯期权", "烧碱期权", "玻璃期权"}
|
|
151
152
|
:type symbol: str
|
|
152
153
|
:return: 日频行情数据
|
|
153
154
|
:rtype: pandas.DataFrame
|
|
@@ -157,7 +158,7 @@ def option_czce_daily(
|
|
|
157
158
|
if day.strftime("%Y%m%d") not in calendar:
|
|
158
159
|
warnings.warn("{}非交易日".format(day.strftime("%Y%m%d")))
|
|
159
160
|
return pd.DataFrame()
|
|
160
|
-
if day > datetime.date(2010, 8, 24):
|
|
161
|
+
if day > datetime.date(year=2010, month=8, day=24):
|
|
161
162
|
url = CZCE_DAILY_OPTION_URL_3.format(day.strftime("%Y"), day.strftime("%Y%m%d"))
|
|
162
163
|
try:
|
|
163
164
|
r = requests.get(url)
|
|
@@ -215,6 +216,22 @@ def option_czce_daily(
|
|
|
215
216
|
temp_df = table_df[table_df.iloc[:, 0].str.contains("UR")]
|
|
216
217
|
temp_df.reset_index(inplace=True, drop=True)
|
|
217
218
|
return temp_df.iloc[:-1, :]
|
|
219
|
+
elif symbol == "对二甲苯期权":
|
|
220
|
+
temp_df = table_df[table_df.iloc[:, 0].str.contains("PX")]
|
|
221
|
+
temp_df.reset_index(inplace=True, drop=True)
|
|
222
|
+
return temp_df.iloc[:-1, :]
|
|
223
|
+
elif symbol == "烧碱期权":
|
|
224
|
+
temp_df = table_df[table_df.iloc[:, 0].str.contains("SH")]
|
|
225
|
+
temp_df.reset_index(inplace=True, drop=True)
|
|
226
|
+
return temp_df.iloc[:-1, :]
|
|
227
|
+
elif symbol == "玻璃期权":
|
|
228
|
+
temp_df = table_df[table_df.iloc[:, 0].str.contains("FG")]
|
|
229
|
+
temp_df.reset_index(inplace=True, drop=True)
|
|
230
|
+
return temp_df.iloc[:-1, :]
|
|
231
|
+
elif symbol == "短纤期权":
|
|
232
|
+
temp_df = table_df[table_df.iloc[:, 0].str.contains("PF")]
|
|
233
|
+
temp_df.reset_index(inplace=True, drop=True)
|
|
234
|
+
return temp_df.iloc[:-1, :]
|
|
218
235
|
else:
|
|
219
236
|
temp_df = table_df[table_df.iloc[:, 0].str.contains("AP")]
|
|
220
237
|
temp_df.reset_index(inplace=True, drop=True)
|
|
@@ -485,7 +502,7 @@ def option_gfex_vol_daily(symbol: str = "碳酸锂", trade_date: str = "20230724
|
|
|
485
502
|
|
|
486
503
|
|
|
487
504
|
if __name__ == "__main__":
|
|
488
|
-
option_czce_daily_df = option_czce_daily(symbol="
|
|
505
|
+
option_czce_daily_df = option_czce_daily(symbol="短纤期权", trade_date="20240718")
|
|
489
506
|
print(option_czce_daily_df)
|
|
490
507
|
|
|
491
508
|
option_dce_daily_one, option_dce_daily_two = option_dce_daily(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/7/
|
|
4
|
+
Date: 2024/7/19 14:20
|
|
5
5
|
Desc: 同花顺-板块-行业板块
|
|
6
6
|
https://q.10jqka.com.cn/thshy/
|
|
7
7
|
"""
|
|
@@ -117,6 +117,8 @@ def stock_board_industry_name_ths() -> pd.DataFrame:
|
|
|
117
117
|
"881180": "石油加工贸易",
|
|
118
118
|
"881181": "环保",
|
|
119
119
|
"881182": "美容护理",
|
|
120
|
+
"881207": "元件", # 20240719
|
|
121
|
+
"881266": "橡胶制品", # 20240719
|
|
120
122
|
"884001": "种子生产",
|
|
121
123
|
"884002": "粮食种植",
|
|
122
124
|
"884003": "其他种植业",
|
|
@@ -572,7 +574,7 @@ def stock_board_industry_summary_ths() -> pd.DataFrame:
|
|
|
572
574
|
url = f"http://q.10jqka.com.cn/thshy/index/field/199112/order/desc/page/{page}/ajax/1/"
|
|
573
575
|
r = requests.get(url, headers=headers)
|
|
574
576
|
temp_df = pd.read_html(StringIO(r.text))[0]
|
|
575
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
|
577
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
|
576
578
|
|
|
577
579
|
big_df.columns = [
|
|
578
580
|
"序号",
|
|
@@ -604,7 +606,7 @@ if __name__ == "__main__":
|
|
|
604
606
|
stock_board_industry_name_ths_df = stock_board_industry_name_ths()
|
|
605
607
|
print(stock_board_industry_name_ths_df)
|
|
606
608
|
|
|
607
|
-
stock_board_industry_info_ths_df = stock_board_industry_info_ths(symbol="
|
|
609
|
+
stock_board_industry_info_ths_df = stock_board_industry_info_ths(symbol="橡胶制品")
|
|
608
610
|
print(stock_board_industry_info_ths_df)
|
|
609
611
|
|
|
610
612
|
stock_board_industry_index_ths_df = stock_board_industry_index_ths(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=4Y7cTqbOXw2mVnmx31CfTyVD8tP2JerFwQ7RiJjqJ34,179595
|
|
2
2
|
akshare/datasets.py,sha256=oIu1zC7o_LMHY22lQmdM7vCnryHibKrJLBqJwQiitlI,1167
|
|
3
3
|
akshare/air/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
|
|
4
4
|
akshare/air/air_hebei.py,sha256=xIXNGLK7IGYqrkteM9fxnHAwWqk6PCQs6D9-ggZ7byY,4442
|
|
@@ -196,7 +196,7 @@ akshare/nlp/nlp_interface.py,sha256=PyZjT3PkuTbloop-JwLwZ2kNi22zdO-r_pRUWQ5SmgM,
|
|
|
196
196
|
akshare/option/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
|
|
197
197
|
akshare/option/cons.py,sha256=zTRZ62RFwOcAKfmso-7nZJtT3a8Dt1nQbNnEjSqgjpI,4811
|
|
198
198
|
akshare/option/option_comm_qihuo.py,sha256=kjbdp-94KJJJi1ex5U03abtlgviqwP0Aahb6FwddPkk,3128
|
|
199
|
-
akshare/option/option_commodity.py,sha256=
|
|
199
|
+
akshare/option/option_commodity.py,sha256=_SWFCP0EoKtwwF72WecK6YL-ogKnY7Yjnd2IwjA95Og,21261
|
|
200
200
|
akshare/option/option_commodity_sina.py,sha256=r6qK_K7w3A6Uqp5ZtBb4pW7vH04oMyeCEZLLGqi0jpA,7776
|
|
201
201
|
akshare/option/option_czce.py,sha256=L4i7TVKcOns5ZKoqq-mrSykdx3SGwu6OL4eI77-A_lc,1812
|
|
202
202
|
akshare/option/option_daily_stats_sse_szse.py,sha256=Ip_vE81qbEGt4ocbtWfUT7XGu0HWU0zKkzauZeq9RJA,4962
|
|
@@ -293,7 +293,7 @@ akshare/stock_feature/stock_a_pe_and_pb.py,sha256=0HMD-49G9KYSe1pQFN6UnqvPHa-JZq
|
|
|
293
293
|
akshare/stock_feature/stock_account_em.py,sha256=PA-531xnv5uerFrYGc40mk8q8O0DGciHC_XVlE9udis,3342
|
|
294
294
|
akshare/stock_feature/stock_all_pb.py,sha256=2yQLq03qXNbTB5AtJ-Q8uJldOluElH5zTjYneY3aaZ0,1194
|
|
295
295
|
akshare/stock_feature/stock_analyst_em.py,sha256=0MmDNZYET0TAn7PBasGJgBV0Y3ljkgocQL4X5bn-7RU,9610
|
|
296
|
-
akshare/stock_feature/stock_board_industry_ths.py,sha256=
|
|
296
|
+
akshare/stock_feature/stock_board_industry_ths.py,sha256=epezEJd7Hfpg7795bKzuZiMX2r1OBD5SYU8eKZtsFlE,21790
|
|
297
297
|
akshare/stock_feature/stock_buffett_index_lg.py,sha256=NpNccHmGjtqLz6aUladB6InPzO2pjoImbgCgmNEYUuM,2027
|
|
298
298
|
akshare/stock_feature/stock_classify_sina.py,sha256=Lg7ROG5W9HioFRplJI2rZ6tAAHM09N3g9qF6kReIQYI,3210
|
|
299
299
|
akshare/stock_feature/stock_comment_em.py,sha256=3HpMZkCiIC6o6LzLZLNA-rYKBMRPeuTaj6xfuU7o4J0,14252
|
|
@@ -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=tfvy_YnYmDra2dkKZ5JvprU1gNW5X9T634PszdSdH1A,944
|
|
383
|
-
akshare-1.14.
|
|
384
|
-
akshare-1.14.
|
|
385
|
-
akshare-1.14.
|
|
386
|
-
akshare-1.14.
|
|
387
|
-
akshare-1.14.
|
|
383
|
+
akshare-1.14.36.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
384
|
+
akshare-1.14.36.dist-info/METADATA,sha256=ilOLiSMmeJvZacscRcVdoaTNOjry7NFrgVOHPac9-Cc,14010
|
|
385
|
+
akshare-1.14.36.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
|
|
386
|
+
akshare-1.14.36.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
387
|
+
akshare-1.14.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|