akshare 1.17.75__py3-none-any.whl → 1.17.76__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 -5
- akshare/futures/futures_index_ccidx.py +1 -59
- {akshare-1.17.75.dist-info → akshare-1.17.76.dist-info}/METADATA +1 -1
- {akshare-1.17.75.dist-info → akshare-1.17.76.dist-info}/RECORD +7 -7
- {akshare-1.17.75.dist-info → akshare-1.17.76.dist-info}/WHEEL +0 -0
- {akshare-1.17.75.dist-info → akshare-1.17.76.dist-info}/licenses/LICENSE +0 -0
- {akshare-1.17.75.dist-info → akshare-1.17.76.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -3182,9 +3182,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
3182
3182
|
1.17.73 fix: fix get_receipt interface
|
|
3183
3183
|
1.17.74 fix: fix futures_dce_position_rank interface
|
|
3184
3184
|
1.17.75 fix: fix stock_a_ttm_lyr interface
|
|
3185
|
+
1.17.76 fix: fix futures_index_ccidx interface
|
|
3185
3186
|
"""
|
|
3186
3187
|
|
|
3187
|
-
__version__ = "1.17.
|
|
3188
|
+
__version__ = "1.17.76"
|
|
3188
3189
|
__author__ = "AKFamily"
|
|
3189
3190
|
|
|
3190
3191
|
import sys
|
|
@@ -5007,10 +5008,7 @@ from akshare.article.fred_md import fred_md, fred_qd
|
|
|
5007
5008
|
"""
|
|
5008
5009
|
中证商品指数
|
|
5009
5010
|
"""
|
|
5010
|
-
from akshare.futures.futures_index_ccidx import
|
|
5011
|
-
futures_index_min_ccidx,
|
|
5012
|
-
futures_index_ccidx,
|
|
5013
|
-
)
|
|
5011
|
+
from akshare.futures.futures_index_ccidx import futures_index_ccidx
|
|
5014
5012
|
|
|
5015
5013
|
"""
|
|
5016
5014
|
futures_em_spot_stock
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- coding:utf-8 -*-
|
|
2
2
|
# !/usr/bin/env python
|
|
3
3
|
"""
|
|
4
|
-
Date: 2025/
|
|
4
|
+
Date: 2025/10/29 15:00
|
|
5
5
|
Desc: 中证商品指数
|
|
6
6
|
http://www.ccidx.com/
|
|
7
7
|
"""
|
|
@@ -54,64 +54,6 @@ def futures_index_ccidx(symbol: str = "中证商品期货指数") -> pd.DataFram
|
|
|
54
54
|
return temp_df
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
def futures_index_min_ccidx(symbol: str = "中证监控油脂油料期货指数") -> pd.DataFrame:
|
|
58
|
-
"""
|
|
59
|
-
中证商品指数-商品指数-分时数据
|
|
60
|
-
http://www.ccidx.com/index.html
|
|
61
|
-
:param symbol: choice of {"中证商品期货指数", "中证商品期货价格指数", "中证监控油脂油料期货指数", "中证监控软商品期货指数",
|
|
62
|
-
"中证监控能化期货指数", "中证监控钢铁期货指数"}
|
|
63
|
-
:type symbol: str
|
|
64
|
-
:return: 商品指数-分时数据
|
|
65
|
-
:rtype: pandas.DataFrame
|
|
66
|
-
"""
|
|
67
|
-
futures_index_map = {
|
|
68
|
-
"中证商品期货指数": ["100001.CCI", "0"],
|
|
69
|
-
"中证商品期货价格指数": ["000001.CCI", "1"],
|
|
70
|
-
"中证监控油脂油料期货指数": ["606005.CCI", "2"],
|
|
71
|
-
"中证监控软商品期货指数": ["606008.CCI", "3"],
|
|
72
|
-
"中证监控能化期货指数": ["606010.CCI", "4"],
|
|
73
|
-
"中证监控钢铁期货指数": ["606011.CCI", "5"],
|
|
74
|
-
}
|
|
75
|
-
url = "http://www.ccidx.com/cscidx/csciAction/loadTimeData"
|
|
76
|
-
params = {"r": "0.08644997232349438"}
|
|
77
|
-
payload = {
|
|
78
|
-
"indexCode": futures_index_map[symbol][0],
|
|
79
|
-
"indexType": futures_index_map[symbol][1],
|
|
80
|
-
"pointer": "all",
|
|
81
|
-
}
|
|
82
|
-
headers = {
|
|
83
|
-
"Accept": "application/json, text/javascript, */*; q=0.01",
|
|
84
|
-
"Accept-Encoding": "gzip, deflate",
|
|
85
|
-
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
|
|
86
|
-
"Cache-Control": "no-cache",
|
|
87
|
-
"Content-Length": "44",
|
|
88
|
-
"Connection": "keep-alive",
|
|
89
|
-
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
90
|
-
"Host": "www.ccidx.com",
|
|
91
|
-
"Origin": "http://www.ccidx.com",
|
|
92
|
-
"Pragma": "no-cache",
|
|
93
|
-
"Proxy-Connection": "keep-alive",
|
|
94
|
-
"Referer": "http://www.ccidx.com/cscidx/quote1",
|
|
95
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
96
|
-
"Chrome/92.0.4515.159 Safari/537.36",
|
|
97
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
98
|
-
}
|
|
99
|
-
r = requests.post(url, params=params, data=payload, headers=headers)
|
|
100
|
-
data_json = r.json()
|
|
101
|
-
temp_df = pd.DataFrame(
|
|
102
|
-
[data_json["dataMap"]["axisList"], data_json["dataMap"]["lineList"]]
|
|
103
|
-
).T
|
|
104
|
-
temp_df.columns = [
|
|
105
|
-
"datetime",
|
|
106
|
-
"value",
|
|
107
|
-
]
|
|
108
|
-
temp_df["value"] = pd.to_numeric(temp_df["value"], errors="coerce")
|
|
109
|
-
return temp_df
|
|
110
|
-
|
|
111
|
-
|
|
112
57
|
if __name__ == "__main__":
|
|
113
58
|
futures_index_ccidx_df = futures_index_ccidx(symbol="中证商品期货指数")
|
|
114
59
|
print(futures_index_ccidx_df)
|
|
115
|
-
|
|
116
|
-
futures_index_min_ccidx_df = futures_index_min_ccidx(symbol="中证商品期货指数")
|
|
117
|
-
print(futures_index_min_ccidx_df)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=jL8SC0z10pTXEYXE39KQDrNuXrQBy9G_n6x1FqSeCL0,199732
|
|
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
|
|
@@ -120,7 +120,7 @@ akshare/futures/futures_foreign.py,sha256=2cbMA-eug_jriDFwKZWmA_TbPW2GQAjscpZHBr
|
|
|
120
120
|
akshare/futures/futures_hf_em.py,sha256=juiJauO7T6YTHXIS--ZDW-Idk73KMOrXgRBi1xEiBqA,8195
|
|
121
121
|
akshare/futures/futures_hist_em.py,sha256=TuHdpcfVxdqoHzg5-JwppLUQgwuaz_LG2UZBlgf73i4,6509
|
|
122
122
|
akshare/futures/futures_hq_sina.py,sha256=HZBAve1yxp1fnwgEy_2CqVoniTXRkt8KI3REt0N0TiY,9575
|
|
123
|
-
akshare/futures/futures_index_ccidx.py,sha256=
|
|
123
|
+
akshare/futures/futures_index_ccidx.py,sha256=4jP0cW_4zPWP1ZIkFSvQAsSxBO39fq5sSlBFUsmu8F8,1988
|
|
124
124
|
akshare/futures/futures_inventory_99.py,sha256=fUsb1ghPcz3KyoAWva_h_oj6EcEuhp_tHtJIO0eLMKI,3424
|
|
125
125
|
akshare/futures/futures_inventory_em.py,sha256=OwgONgg3Tu1WCIADcH6LpahDedAPz0iQcmNJb4ma5Dw,2620
|
|
126
126
|
akshare/futures/futures_news_shmet.py,sha256=1epZ3MwDc-T2n1ie4SSDfvUaBiMpSL0Q_xb2VoZ_llU,2465
|
|
@@ -399,10 +399,10 @@ akshare/utils/func.py,sha256=4cwmXFztU86yJNONJ40KJLvsIEQHBbct4iMm3zT2v30,2315
|
|
|
399
399
|
akshare/utils/multi_decrypt.py,sha256=aWoL2iEPeuXHJg8-n7OtMKixLnIhfzepACgxfrfmQB4,1657
|
|
400
400
|
akshare/utils/token_process.py,sha256=nGtgnZGRprXJkhLXH8mcUH4TgIFwzsTOb0EaEPa0Euo,667
|
|
401
401
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
402
|
-
akshare-1.17.
|
|
402
|
+
akshare-1.17.76.dist-info/licenses/LICENSE,sha256=s18q7gS2g1F9-Cnk5eqrJG4OGWSwSxVEMzIuT6HyYNY,1073
|
|
403
403
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
404
404
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
|
405
|
-
akshare-1.17.
|
|
406
|
-
akshare-1.17.
|
|
407
|
-
akshare-1.17.
|
|
408
|
-
akshare-1.17.
|
|
405
|
+
akshare-1.17.76.dist-info/METADATA,sha256=lrV-kMILMSBggWN3O3Zr7Xf0FM9dl6Vd-EksmXdOTJg,12593
|
|
406
|
+
akshare-1.17.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
407
|
+
akshare-1.17.76.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
408
|
+
akshare-1.17.76.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|