akshare 1.15.73__py3-none-any.whl → 1.15.75__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 +8 -1
- akshare/economic/macro_australia.py +74 -62
- akshare/futures/futures_hist_em.py +189 -0
- akshare/futures/futures_rule_em.py +38 -0
- akshare/index/index_option_qvix.py +78 -72
- {akshare-1.15.73.dist-info → akshare-1.15.75.dist-info}/METADATA +1 -1
- {akshare-1.15.73.dist-info → akshare-1.15.75.dist-info}/RECORD +10 -8
- {akshare-1.15.73.dist-info → akshare-1.15.75.dist-info}/LICENSE +0 -0
- {akshare-1.15.73.dist-info → akshare-1.15.75.dist-info}/WHEEL +0 -0
- {akshare-1.15.73.dist-info → akshare-1.15.75.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2983,9 +2983,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2983
2983
|
1.15.71 fix: fix stock_dzjy_sctj interface
|
|
2984
2984
|
1.15.72 fix: fix stock_us_spot interface
|
|
2985
2985
|
1.15.73 fix: fix stock_dzjy_hygtj interface
|
|
2986
|
+
1.15.74 fix: fix macro_australia_retail_rate_monthly interface
|
|
2987
|
+
1.15.75 feat: add futures_hist_em interface
|
|
2986
2988
|
"""
|
|
2987
2989
|
|
|
2988
|
-
__version__ = "1.15.
|
|
2990
|
+
__version__ = "1.15.75"
|
|
2989
2991
|
__author__ = "AKFamily"
|
|
2990
2992
|
|
|
2991
2993
|
import sys
|
|
@@ -3007,6 +3009,11 @@ if sys.version_info < (3, 9):
|
|
|
3007
3009
|
|
|
3008
3010
|
del sys
|
|
3009
3011
|
|
|
3012
|
+
"""
|
|
3013
|
+
期货行情-内盘-历史行情数据-东财
|
|
3014
|
+
"""
|
|
3015
|
+
from akshare.futures.futures_hist_em import futures_hist_table_em, futures_hist_em
|
|
3016
|
+
|
|
3010
3017
|
"""
|
|
3011
3018
|
巨潮资讯-数据中心-专题统计-股东股本-股本变动
|
|
3012
3019
|
"""
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2025/1/17 15:30
|
|
5
5
|
Desc: 东方财富-经济数据-澳大利亚
|
|
6
6
|
https://data.eastmoney.com/cjsj/foreign_5_0.html
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
import pandas as pd
|
|
9
10
|
import requests
|
|
10
11
|
|
|
11
|
-
from akshare.utils import demjson
|
|
12
|
-
|
|
13
12
|
|
|
14
13
|
# 零售销售月率
|
|
15
14
|
def macro_australia_retail_rate_monthly() -> pd.DataFrame:
|
|
@@ -47,18 +46,19 @@ def macro_australia_retail_rate_monthly() -> pd.DataFrame:
|
|
|
47
46
|
"发布日期",
|
|
48
47
|
"现值",
|
|
49
48
|
"前值",
|
|
50
|
-
|
|
51
|
-
|
|
52
49
|
]
|
|
53
|
-
temp_df = temp_df[
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
temp_df = temp_df[
|
|
51
|
+
[
|
|
52
|
+
"时间",
|
|
53
|
+
"前值",
|
|
54
|
+
"现值",
|
|
55
|
+
"发布日期",
|
|
56
|
+
]
|
|
57
|
+
]
|
|
59
58
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
60
59
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
61
|
-
temp_df[
|
|
60
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
61
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
62
62
|
return temp_df
|
|
63
63
|
|
|
64
64
|
|
|
@@ -98,17 +98,19 @@ def macro_australia_trade() -> pd.DataFrame:
|
|
|
98
98
|
"发布日期",
|
|
99
99
|
"现值",
|
|
100
100
|
"前值",
|
|
101
|
-
|
|
102
101
|
]
|
|
103
|
-
temp_df = temp_df[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
temp_df = temp_df[
|
|
103
|
+
[
|
|
104
|
+
"时间",
|
|
105
|
+
"前值",
|
|
106
|
+
"现值",
|
|
107
|
+
"发布日期",
|
|
108
|
+
]
|
|
109
|
+
]
|
|
109
110
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
110
111
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
111
|
-
temp_df[
|
|
112
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
113
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
112
114
|
return temp_df
|
|
113
115
|
|
|
114
116
|
|
|
@@ -148,17 +150,19 @@ def macro_australia_unemployment_rate() -> pd.DataFrame:
|
|
|
148
150
|
"发布日期",
|
|
149
151
|
"现值",
|
|
150
152
|
"前值",
|
|
151
|
-
|
|
152
153
|
]
|
|
153
|
-
temp_df = temp_df[
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
temp_df = temp_df[
|
|
155
|
+
[
|
|
156
|
+
"时间",
|
|
157
|
+
"前值",
|
|
158
|
+
"现值",
|
|
159
|
+
"发布日期",
|
|
160
|
+
]
|
|
161
|
+
]
|
|
159
162
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
160
163
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
161
|
-
temp_df[
|
|
164
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
165
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
162
166
|
return temp_df
|
|
163
167
|
|
|
164
168
|
|
|
@@ -198,17 +202,19 @@ def macro_australia_ppi_quarterly() -> pd.DataFrame:
|
|
|
198
202
|
"发布日期",
|
|
199
203
|
"现值",
|
|
200
204
|
"前值",
|
|
201
|
-
|
|
202
205
|
]
|
|
203
|
-
temp_df = temp_df[
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
temp_df = temp_df[
|
|
207
|
+
[
|
|
208
|
+
"时间",
|
|
209
|
+
"前值",
|
|
210
|
+
"现值",
|
|
211
|
+
"发布日期",
|
|
212
|
+
]
|
|
213
|
+
]
|
|
209
214
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
210
215
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
211
|
-
temp_df[
|
|
216
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
217
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
212
218
|
return temp_df
|
|
213
219
|
|
|
214
220
|
|
|
@@ -216,7 +222,7 @@ def macro_australia_ppi_quarterly() -> pd.DataFrame:
|
|
|
216
222
|
def macro_australia_cpi_quarterly() -> pd.DataFrame:
|
|
217
223
|
"""
|
|
218
224
|
东方财富-经济数据-澳大利亚-消费者物价指数季率
|
|
219
|
-
|
|
225
|
+
https://data.eastmoney.com/cjsj/foreign_5_4.html
|
|
220
226
|
:return: 消费者物价指数季率
|
|
221
227
|
:rtype: pandas.DataFrame
|
|
222
228
|
"""
|
|
@@ -248,17 +254,19 @@ def macro_australia_cpi_quarterly() -> pd.DataFrame:
|
|
|
248
254
|
"发布日期",
|
|
249
255
|
"现值",
|
|
250
256
|
"前值",
|
|
251
|
-
|
|
252
257
|
]
|
|
253
|
-
temp_df = temp_df[
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
temp_df = temp_df[
|
|
259
|
+
[
|
|
260
|
+
"时间",
|
|
261
|
+
"前值",
|
|
262
|
+
"现值",
|
|
263
|
+
"发布日期",
|
|
264
|
+
]
|
|
265
|
+
]
|
|
259
266
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
260
267
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
261
|
-
temp_df[
|
|
268
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
269
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
262
270
|
return temp_df
|
|
263
271
|
|
|
264
272
|
|
|
@@ -298,17 +306,19 @@ def macro_australia_cpi_yearly() -> pd.DataFrame:
|
|
|
298
306
|
"发布日期",
|
|
299
307
|
"现值",
|
|
300
308
|
"前值",
|
|
301
|
-
|
|
302
309
|
]
|
|
303
|
-
temp_df = temp_df[
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
310
|
+
temp_df = temp_df[
|
|
311
|
+
[
|
|
312
|
+
"时间",
|
|
313
|
+
"前值",
|
|
314
|
+
"现值",
|
|
315
|
+
"发布日期",
|
|
316
|
+
]
|
|
317
|
+
]
|
|
309
318
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
310
319
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
311
|
-
temp_df[
|
|
320
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
321
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
312
322
|
return temp_df
|
|
313
323
|
|
|
314
324
|
|
|
@@ -348,21 +358,23 @@ def macro_australia_bank_rate() -> pd.DataFrame:
|
|
|
348
358
|
"发布日期",
|
|
349
359
|
"现值",
|
|
350
360
|
"前值",
|
|
351
|
-
|
|
352
361
|
]
|
|
353
|
-
temp_df = temp_df[
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
362
|
+
temp_df = temp_df[
|
|
363
|
+
[
|
|
364
|
+
"时间",
|
|
365
|
+
"前值",
|
|
366
|
+
"现值",
|
|
367
|
+
"发布日期",
|
|
368
|
+
]
|
|
369
|
+
]
|
|
359
370
|
temp_df["前值"] = pd.to_numeric(temp_df["前值"], errors="coerce")
|
|
360
371
|
temp_df["现值"] = pd.to_numeric(temp_df["现值"], errors="coerce")
|
|
361
|
-
temp_df[
|
|
372
|
+
temp_df["发布日期"] = pd.to_datetime(temp_df["发布日期"], errors="coerce").dt.date
|
|
373
|
+
temp_df.sort_values(by="发布日期", ignore_index=True, inplace=True)
|
|
362
374
|
return temp_df
|
|
363
375
|
|
|
364
376
|
|
|
365
|
-
if __name__ ==
|
|
377
|
+
if __name__ == "__main__":
|
|
366
378
|
macro_australia_retail_rate_monthly_df = macro_australia_retail_rate_monthly()
|
|
367
379
|
print(macro_australia_retail_rate_monthly_df)
|
|
368
380
|
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding:utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Date: 2024/1/17 19:30
|
|
5
|
+
Desc: 东方财富网-期货行情
|
|
6
|
+
https://qhweb.eastmoney.com/quote
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import re
|
|
10
|
+
from functools import lru_cache
|
|
11
|
+
|
|
12
|
+
import pandas as pd
|
|
13
|
+
import requests
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __futures_hist_separate_char_and_numbers_em(symbol: str = "焦煤2506") -> tuple:
|
|
17
|
+
"""
|
|
18
|
+
东方财富网-期货行情-交易所品种对照表原始数据
|
|
19
|
+
https://quote.eastmoney.com/qihuo/al2505.html
|
|
20
|
+
:param symbol: 股票代码
|
|
21
|
+
:type symbol: str
|
|
22
|
+
:return: 交易所品种对照表原始数据
|
|
23
|
+
:rtype: pandas.DataFrame
|
|
24
|
+
"""
|
|
25
|
+
char = re.findall(pattern="[\u4e00-\u9fa5a-zA-Z]+", string=symbol)
|
|
26
|
+
numbers = re.findall(pattern=r"\d+", string=symbol)
|
|
27
|
+
return char[0], numbers[0]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@lru_cache()
|
|
31
|
+
def __fetch_exchange_symbol_raw_em() -> list:
|
|
32
|
+
"""
|
|
33
|
+
东方财富网-期货行情-交易所品种对照表原始数据
|
|
34
|
+
https://quote.eastmoney.com/qihuo/al2505.html
|
|
35
|
+
:return: 交易所品种对照表原始数据
|
|
36
|
+
:rtype: pandas.DataFrame
|
|
37
|
+
"""
|
|
38
|
+
url = "https://futsse-static.eastmoney.com/redis"
|
|
39
|
+
params = {"msgid": "gnweb"}
|
|
40
|
+
r = requests.get(url, params=params)
|
|
41
|
+
data_json = r.json()
|
|
42
|
+
all_exchange_symbol_list = []
|
|
43
|
+
for item in data_json:
|
|
44
|
+
params = {"msgid": str(item["mktid"])}
|
|
45
|
+
r = requests.get(url, params=params)
|
|
46
|
+
inner_data_json = r.json()
|
|
47
|
+
for num in range(1, len(inner_data_json) + 1):
|
|
48
|
+
params = {"msgid": str(item["mktid"]) + f"_{num}"}
|
|
49
|
+
r = requests.get(url, params=params)
|
|
50
|
+
inner_data_json = r.json()
|
|
51
|
+
all_exchange_symbol_list.extend(inner_data_json)
|
|
52
|
+
return all_exchange_symbol_list
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@lru_cache()
|
|
56
|
+
def __get_exchange_symbol_map() -> tuple[dict, dict, dict, dict]:
|
|
57
|
+
"""
|
|
58
|
+
东方财富网-期货行情-交易所品种映射
|
|
59
|
+
https://quote.eastmoney.com/qihuo/al2505.html
|
|
60
|
+
:return: 交易所品种映射
|
|
61
|
+
:rtype: pandas.DataFrame
|
|
62
|
+
"""
|
|
63
|
+
all_exchange_symbol_list = __fetch_exchange_symbol_raw_em()
|
|
64
|
+
c_contract_mkt = {}
|
|
65
|
+
c_contract_to_e_contract = {}
|
|
66
|
+
e_symbol_mkt = {}
|
|
67
|
+
c_symbol_mkt = {}
|
|
68
|
+
for item in all_exchange_symbol_list:
|
|
69
|
+
c_contract_mkt[item["name"]] = item["mktid"]
|
|
70
|
+
c_contract_to_e_contract[item["name"]] = item["code"]
|
|
71
|
+
e_symbol_mkt[item["vcode"]] = item["mktid"]
|
|
72
|
+
c_symbol_mkt[item["vname"]] = item["mktid"]
|
|
73
|
+
return c_contract_mkt, c_contract_to_e_contract, e_symbol_mkt, c_symbol_mkt
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def futures_hist_table_em() -> pd.DataFrame:
|
|
77
|
+
"""
|
|
78
|
+
东方财富网-期货行情-交易所品种对照表
|
|
79
|
+
https://quote.eastmoney.com/qihuo/al2505.html
|
|
80
|
+
:return: 交易所品种对照表
|
|
81
|
+
:rtype: pandas.DataFrame
|
|
82
|
+
"""
|
|
83
|
+
all_exchange_symbol_list = __fetch_exchange_symbol_raw_em()
|
|
84
|
+
temp_df = pd.DataFrame(all_exchange_symbol_list)
|
|
85
|
+
temp_df = temp_df[["mktname", "name", "code"]]
|
|
86
|
+
temp_df.columns = ["市场简称", "合约中文代码", "合约代码"]
|
|
87
|
+
return temp_df
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def futures_hist_em(
|
|
91
|
+
symbol: str = "热卷主连",
|
|
92
|
+
period: str = "daily",
|
|
93
|
+
start_date: str = "19900101",
|
|
94
|
+
end_date: str = "20500101",
|
|
95
|
+
) -> pd.DataFrame:
|
|
96
|
+
"""
|
|
97
|
+
东方财富网-期货行情-行情数据
|
|
98
|
+
https://qhweb.eastmoney.com/quote
|
|
99
|
+
:param symbol: 期货代码
|
|
100
|
+
:type symbol: str
|
|
101
|
+
:param period: choice of {'daily', 'weekly', 'monthly'}
|
|
102
|
+
:type period: str
|
|
103
|
+
:param start_date: 开始日期
|
|
104
|
+
:type start_date: str
|
|
105
|
+
:param end_date: 结束日期
|
|
106
|
+
:type end_date: str
|
|
107
|
+
:return: 行情数据
|
|
108
|
+
:rtype: pandas.DataFrame
|
|
109
|
+
"""
|
|
110
|
+
url = "https://push2his.eastmoney.com/api/qt/stock/kline/get"
|
|
111
|
+
period_dict = {"daily": "101", "weekly": "102", "monthly": "103"}
|
|
112
|
+
c_contract_mkt, c_contract_to_e_contract, e_symbol_mkt, c_symbol_mkt = (
|
|
113
|
+
__get_exchange_symbol_map()
|
|
114
|
+
)
|
|
115
|
+
try:
|
|
116
|
+
sec_id = f"{c_contract_mkt[symbol]}.{c_contract_to_e_contract[symbol]}"
|
|
117
|
+
except KeyError:
|
|
118
|
+
symbol_char, numbers = __futures_hist_separate_char_and_numbers_em(symbol)
|
|
119
|
+
if re.match(pattern="^[\u4e00-\u9fa5]+$", string=symbol_char):
|
|
120
|
+
sec_id = str(c_symbol_mkt[symbol_char]) + "." + symbol
|
|
121
|
+
else:
|
|
122
|
+
sec_id = str(e_symbol_mkt[symbol_char]) + "." + symbol
|
|
123
|
+
params = {
|
|
124
|
+
"secid": sec_id,
|
|
125
|
+
"klt": period_dict[period],
|
|
126
|
+
"fqt": "1",
|
|
127
|
+
"lmt": "10000",
|
|
128
|
+
"end": "20500000",
|
|
129
|
+
"iscca": "1",
|
|
130
|
+
"fields1": "f1,f2,f3,f4,f5,f6,f7,f8",
|
|
131
|
+
"fields2": "f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64",
|
|
132
|
+
"ut": "7eea3edcaed734bea9cbfc24409ed989",
|
|
133
|
+
"forcect": "1",
|
|
134
|
+
}
|
|
135
|
+
r = requests.get(url, timeout=15, params=params)
|
|
136
|
+
data_json = r.json()
|
|
137
|
+
temp_df = pd.DataFrame([item.split(",") for item in data_json["data"]["klines"]])
|
|
138
|
+
temp_df.columns = [
|
|
139
|
+
"时间",
|
|
140
|
+
"开盘",
|
|
141
|
+
"收盘",
|
|
142
|
+
"最高",
|
|
143
|
+
"最低",
|
|
144
|
+
"成交量",
|
|
145
|
+
"成交额",
|
|
146
|
+
"-",
|
|
147
|
+
"涨跌幅",
|
|
148
|
+
"涨跌",
|
|
149
|
+
"_",
|
|
150
|
+
"_",
|
|
151
|
+
"持仓量",
|
|
152
|
+
"_",
|
|
153
|
+
]
|
|
154
|
+
temp_df = temp_df[
|
|
155
|
+
[
|
|
156
|
+
"时间",
|
|
157
|
+
"开盘",
|
|
158
|
+
"最高",
|
|
159
|
+
"最低",
|
|
160
|
+
"收盘",
|
|
161
|
+
"涨跌",
|
|
162
|
+
"涨跌幅",
|
|
163
|
+
"成交量",
|
|
164
|
+
"成交额",
|
|
165
|
+
"持仓量",
|
|
166
|
+
]
|
|
167
|
+
]
|
|
168
|
+
temp_df.index = pd.to_datetime(temp_df["时间"])
|
|
169
|
+
temp_df = temp_df[start_date:end_date]
|
|
170
|
+
temp_df.reset_index(drop=True, inplace=True)
|
|
171
|
+
temp_df["开盘"] = pd.to_numeric(temp_df["开盘"], errors="coerce")
|
|
172
|
+
temp_df["收盘"] = pd.to_numeric(temp_df["收盘"], errors="coerce")
|
|
173
|
+
temp_df["最高"] = pd.to_numeric(temp_df["最高"], errors="coerce")
|
|
174
|
+
temp_df["最低"] = pd.to_numeric(temp_df["最低"], errors="coerce")
|
|
175
|
+
temp_df["成交量"] = pd.to_numeric(temp_df["成交量"], errors="coerce")
|
|
176
|
+
temp_df["成交额"] = pd.to_numeric(temp_df["成交额"], errors="coerce")
|
|
177
|
+
temp_df["涨跌"] = pd.to_numeric(temp_df["涨跌"], errors="coerce")
|
|
178
|
+
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
|
|
179
|
+
temp_df["持仓量"] = pd.to_numeric(temp_df["持仓量"], errors="coerce")
|
|
180
|
+
temp_df["时间"] = pd.to_datetime(temp_df["时间"], errors="coerce").dt.date
|
|
181
|
+
return temp_df
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
if __name__ == "__main__":
|
|
185
|
+
futures_hist_table_em_df = futures_hist_table_em()
|
|
186
|
+
print(futures_hist_table_em_df)
|
|
187
|
+
|
|
188
|
+
futures_hist_em_df = futures_hist_em(symbol="热卷主连", period="daily")
|
|
189
|
+
print(futures_hist_em_df)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding:utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Date: 2024/1/17 19:30
|
|
5
|
+
Desc: 东方财富网-期货行情-品种及交易规则
|
|
6
|
+
https://portal.eastmoneyfutures.com/pages/service/jyts.html#jyrl
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import pandas as pd
|
|
10
|
+
import requests
|
|
11
|
+
from akshare.utils.cons import headers
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def futures_rule_em() -> pd.DataFrame:
|
|
15
|
+
"""
|
|
16
|
+
东方财富网-期货行情-品种及交易规则
|
|
17
|
+
https://portal.eastmoneyfutures.com/pages/service/jyts.html#jyrl
|
|
18
|
+
:return: 品种及交易规则
|
|
19
|
+
:rtype: pandas.DataFrame
|
|
20
|
+
"""
|
|
21
|
+
url = "https://eastmoneyfutures.com/api/ComManage/GetPZJYInfo"
|
|
22
|
+
r = requests.get(url, headers=headers)
|
|
23
|
+
data_json = r.json()
|
|
24
|
+
temp_df = pd.DataFrame(data_json["Data"])
|
|
25
|
+
return temp_df
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def futures_trading_hours_em():
|
|
29
|
+
"""
|
|
30
|
+
东方财富网-期货交易时间
|
|
31
|
+
https://qhweb.eastmoney.com/tradinghours
|
|
32
|
+
"""
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
futures_rule_em_df = futures_rule_em()
|
|
38
|
+
print(futures_rule_em_df)
|
|
@@ -7,7 +7,22 @@ Desc: 50 ETF 期权波动率指数 QVIX
|
|
|
7
7
|
http://1.optbbs.com/s/vix.shtml?50ETF
|
|
8
8
|
http://1.optbbs.com/s/vix.shtml?300ETF
|
|
9
9
|
"""
|
|
10
|
+
|
|
10
11
|
import pandas as pd
|
|
12
|
+
from functools import lru_cache
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@lru_cache
|
|
16
|
+
def __get_optbbs_daily() -> pd.DataFrame:
|
|
17
|
+
"""
|
|
18
|
+
读取原始数据
|
|
19
|
+
http://1.optbbs.com/d/csv/d/k.csv
|
|
20
|
+
:return: 原始数据
|
|
21
|
+
:rtype: pandas.DataFrame
|
|
22
|
+
"""
|
|
23
|
+
url = "http://1.optbbs.com/d/csv/d/k.csv"
|
|
24
|
+
temp_df = pd.read_csv(url, encoding="gbk")
|
|
25
|
+
return temp_df
|
|
11
26
|
|
|
12
27
|
|
|
13
28
|
def index_option_50etf_qvix() -> pd.DataFrame:
|
|
@@ -17,8 +32,7 @@ def index_option_50etf_qvix() -> pd.DataFrame:
|
|
|
17
32
|
:return: 50ETF 期权波动率指数 QVIX
|
|
18
33
|
:rtype: pandas.DataFrame
|
|
19
34
|
"""
|
|
20
|
-
|
|
21
|
-
temp_df = pd.read_csv(url).iloc[:, :5]
|
|
35
|
+
temp_df = __get_optbbs_daily().iloc[:, :5]
|
|
22
36
|
temp_df.columns = [
|
|
23
37
|
"date",
|
|
24
38
|
"open",
|
|
@@ -26,11 +40,11 @@ def index_option_50etf_qvix() -> pd.DataFrame:
|
|
|
26
40
|
"low",
|
|
27
41
|
"close",
|
|
28
42
|
]
|
|
29
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
30
|
-
temp_df[
|
|
31
|
-
temp_df[
|
|
32
|
-
temp_df[
|
|
33
|
-
temp_df[
|
|
43
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
44
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
45
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
46
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
47
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
34
48
|
return temp_df
|
|
35
49
|
|
|
36
50
|
|
|
@@ -47,7 +61,7 @@ def index_option_50etf_min_qvix() -> pd.DataFrame:
|
|
|
47
61
|
"time",
|
|
48
62
|
"qvix",
|
|
49
63
|
]
|
|
50
|
-
temp_df[
|
|
64
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
51
65
|
return temp_df
|
|
52
66
|
|
|
53
67
|
|
|
@@ -58,8 +72,7 @@ def index_option_300etf_qvix() -> pd.DataFrame:
|
|
|
58
72
|
:return: 300 ETF 期权波动率指数 QVIX
|
|
59
73
|
:rtype: pandas.DataFrame
|
|
60
74
|
"""
|
|
61
|
-
|
|
62
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 9, 10, 11, 12]]
|
|
75
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 9, 10, 11, 12]]
|
|
63
76
|
temp_df.columns = [
|
|
64
77
|
"date",
|
|
65
78
|
"open",
|
|
@@ -67,11 +80,11 @@ def index_option_300etf_qvix() -> pd.DataFrame:
|
|
|
67
80
|
"low",
|
|
68
81
|
"close",
|
|
69
82
|
]
|
|
70
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
71
|
-
temp_df[
|
|
72
|
-
temp_df[
|
|
73
|
-
temp_df[
|
|
74
|
-
temp_df[
|
|
83
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
84
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
85
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
86
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
87
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
75
88
|
return temp_df
|
|
76
89
|
|
|
77
90
|
|
|
@@ -88,7 +101,7 @@ def index_option_300etf_min_qvix() -> pd.DataFrame:
|
|
|
88
101
|
"time",
|
|
89
102
|
"qvix",
|
|
90
103
|
]
|
|
91
|
-
temp_df[
|
|
104
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
92
105
|
return temp_df
|
|
93
106
|
|
|
94
107
|
|
|
@@ -99,8 +112,7 @@ def index_option_500etf_qvix() -> pd.DataFrame:
|
|
|
99
112
|
:return: 500 ETF 期权波动率指数 QVIX
|
|
100
113
|
:rtype: pandas.DataFrame
|
|
101
114
|
"""
|
|
102
|
-
|
|
103
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 67, 68, 69, 70]]
|
|
115
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 67, 68, 69, 70]]
|
|
104
116
|
temp_df.columns = [
|
|
105
117
|
"date",
|
|
106
118
|
"open",
|
|
@@ -108,11 +120,11 @@ def index_option_500etf_qvix() -> pd.DataFrame:
|
|
|
108
120
|
"low",
|
|
109
121
|
"close",
|
|
110
122
|
]
|
|
111
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
112
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
113
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
114
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
115
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
123
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
124
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
125
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
126
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
127
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
116
128
|
return temp_df
|
|
117
129
|
|
|
118
130
|
|
|
@@ -129,7 +141,7 @@ def index_option_500etf_min_qvix() -> pd.DataFrame:
|
|
|
129
141
|
"time",
|
|
130
142
|
"qvix",
|
|
131
143
|
]
|
|
132
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
144
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
133
145
|
return temp_df
|
|
134
146
|
|
|
135
147
|
|
|
@@ -140,8 +152,7 @@ def index_option_cyb_qvix() -> pd.DataFrame:
|
|
|
140
152
|
:return: 创业板 期权波动率指数 QVIX
|
|
141
153
|
:rtype: pandas.DataFrame
|
|
142
154
|
"""
|
|
143
|
-
|
|
144
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 71, 72, 73, 74]]
|
|
155
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 71, 72, 73, 74]]
|
|
145
156
|
temp_df.columns = [
|
|
146
157
|
"date",
|
|
147
158
|
"open",
|
|
@@ -149,11 +160,11 @@ def index_option_cyb_qvix() -> pd.DataFrame:
|
|
|
149
160
|
"low",
|
|
150
161
|
"close",
|
|
151
162
|
]
|
|
152
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
153
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
154
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
155
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
156
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
163
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
164
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
165
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
166
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
167
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
157
168
|
return temp_df
|
|
158
169
|
|
|
159
170
|
|
|
@@ -170,7 +181,7 @@ def index_option_cyb_min_qvix() -> pd.DataFrame:
|
|
|
170
181
|
"time",
|
|
171
182
|
"qvix",
|
|
172
183
|
]
|
|
173
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
184
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
174
185
|
return temp_df
|
|
175
186
|
|
|
176
187
|
|
|
@@ -181,8 +192,7 @@ def index_option_kcb_qvix() -> pd.DataFrame:
|
|
|
181
192
|
:return: 科创板 期权波动率指数 QVIX
|
|
182
193
|
:rtype: pandas.DataFrame
|
|
183
194
|
"""
|
|
184
|
-
|
|
185
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 83, 84, 85, 86]]
|
|
195
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 83, 84, 85, 86]]
|
|
186
196
|
temp_df.columns = [
|
|
187
197
|
"date",
|
|
188
198
|
"open",
|
|
@@ -190,11 +200,11 @@ def index_option_kcb_qvix() -> pd.DataFrame:
|
|
|
190
200
|
"low",
|
|
191
201
|
"close",
|
|
192
202
|
]
|
|
193
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
194
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
195
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
196
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
197
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
203
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
204
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
205
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
206
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
207
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
198
208
|
return temp_df
|
|
199
209
|
|
|
200
210
|
|
|
@@ -211,7 +221,7 @@ def index_option_kcb_min_qvix() -> pd.DataFrame:
|
|
|
211
221
|
"time",
|
|
212
222
|
"qvix",
|
|
213
223
|
]
|
|
214
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
224
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
215
225
|
return temp_df
|
|
216
226
|
|
|
217
227
|
|
|
@@ -222,8 +232,7 @@ def index_option_100etf_qvix() -> pd.DataFrame:
|
|
|
222
232
|
:return: 深证100ETF 期权波动率指数 QVIX
|
|
223
233
|
:rtype: pandas.DataFrame
|
|
224
234
|
"""
|
|
225
|
-
|
|
226
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 75, 76, 77, 78]]
|
|
235
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 75, 76, 77, 78]]
|
|
227
236
|
temp_df.columns = [
|
|
228
237
|
"date",
|
|
229
238
|
"open",
|
|
@@ -231,11 +240,11 @@ def index_option_100etf_qvix() -> pd.DataFrame:
|
|
|
231
240
|
"low",
|
|
232
241
|
"close",
|
|
233
242
|
]
|
|
234
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
235
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
236
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
237
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
238
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
243
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
244
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
245
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
246
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
247
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
239
248
|
return temp_df
|
|
240
249
|
|
|
241
250
|
|
|
@@ -252,7 +261,7 @@ def index_option_100etf_min_qvix() -> pd.DataFrame:
|
|
|
252
261
|
"time",
|
|
253
262
|
"qvix",
|
|
254
263
|
]
|
|
255
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
264
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
256
265
|
return temp_df
|
|
257
266
|
|
|
258
267
|
|
|
@@ -263,8 +272,7 @@ def index_option_300index_qvix() -> pd.DataFrame:
|
|
|
263
272
|
:return: 中证300股指 期权波动率指数 QVIX
|
|
264
273
|
:rtype: pandas.DataFrame
|
|
265
274
|
"""
|
|
266
|
-
|
|
267
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 17, 18, 19, 20]]
|
|
275
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 17, 18, 19, 20]]
|
|
268
276
|
temp_df.columns = [
|
|
269
277
|
"date",
|
|
270
278
|
"open",
|
|
@@ -272,11 +280,11 @@ def index_option_300index_qvix() -> pd.DataFrame:
|
|
|
272
280
|
"low",
|
|
273
281
|
"close",
|
|
274
282
|
]
|
|
275
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
276
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
277
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
278
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
279
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
283
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
284
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
285
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
286
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
287
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
280
288
|
return temp_df
|
|
281
289
|
|
|
282
290
|
|
|
@@ -293,7 +301,7 @@ def index_option_300index_min_qvix() -> pd.DataFrame:
|
|
|
293
301
|
"time",
|
|
294
302
|
"qvix",
|
|
295
303
|
]
|
|
296
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
304
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
297
305
|
return temp_df
|
|
298
306
|
|
|
299
307
|
|
|
@@ -304,8 +312,7 @@ def index_option_1000index_qvix() -> pd.DataFrame:
|
|
|
304
312
|
:return: 中证1000股指 期权波动率指数 QVIX
|
|
305
313
|
:rtype: pandas.DataFrame
|
|
306
314
|
"""
|
|
307
|
-
|
|
308
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 25, 26, 27, 28]]
|
|
315
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 25, 26, 27, 28]]
|
|
309
316
|
temp_df.columns = [
|
|
310
317
|
"date",
|
|
311
318
|
"open",
|
|
@@ -313,11 +320,11 @@ def index_option_1000index_qvix() -> pd.DataFrame:
|
|
|
313
320
|
"low",
|
|
314
321
|
"close",
|
|
315
322
|
]
|
|
316
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
317
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
318
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
319
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
320
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
323
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
324
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
325
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
326
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
327
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
321
328
|
return temp_df
|
|
322
329
|
|
|
323
330
|
|
|
@@ -334,7 +341,7 @@ def index_option_1000index_min_qvix() -> pd.DataFrame:
|
|
|
334
341
|
"time",
|
|
335
342
|
"qvix",
|
|
336
343
|
]
|
|
337
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
344
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
338
345
|
return temp_df
|
|
339
346
|
|
|
340
347
|
|
|
@@ -345,8 +352,7 @@ def index_option_50index_qvix() -> pd.DataFrame:
|
|
|
345
352
|
:return: 上证50股指 期权波动率指数 QVIX
|
|
346
353
|
:rtype: pandas.DataFrame
|
|
347
354
|
"""
|
|
348
|
-
|
|
349
|
-
temp_df = pd.read_csv(url).iloc[:, [0, 79, 80, 81, 82]]
|
|
355
|
+
temp_df = __get_optbbs_daily().iloc[:, [0, 79, 80, 81, 82]]
|
|
350
356
|
temp_df.columns = [
|
|
351
357
|
"date",
|
|
352
358
|
"open",
|
|
@@ -354,11 +360,11 @@ def index_option_50index_qvix() -> pd.DataFrame:
|
|
|
354
360
|
"low",
|
|
355
361
|
"close",
|
|
356
362
|
]
|
|
357
|
-
temp_df["date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
358
|
-
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
359
|
-
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
360
|
-
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
361
|
-
temp_df["close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
363
|
+
temp_df.loc[:, "date"] = pd.to_datetime(temp_df["date"], errors="coerce").dt.date
|
|
364
|
+
temp_df.loc[:, "open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
365
|
+
temp_df.loc[:, "high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
366
|
+
temp_df.loc[:, "low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
367
|
+
temp_df.loc[:, "close"] = pd.to_numeric(temp_df["close"], errors="coerce")
|
|
362
368
|
return temp_df
|
|
363
369
|
|
|
364
370
|
|
|
@@ -375,7 +381,7 @@ def index_option_50index_min_qvix() -> pd.DataFrame:
|
|
|
375
381
|
"time",
|
|
376
382
|
"qvix",
|
|
377
383
|
]
|
|
378
|
-
temp_df["qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
384
|
+
temp_df.loc[:, "qvix"] = pd.to_numeric(temp_df["qvix"], errors="coerce")
|
|
379
385
|
return temp_df
|
|
380
386
|
|
|
381
387
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=yuHgcgTP8iCMPnvdcJ2ARcDzFXrs3Sz5_e3XhiCe55g,186367
|
|
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
|
|
@@ -50,7 +50,7 @@ akshare/data/crypto_info.zip,sha256=egMaxGtQiac_yDsbuHxNUkLQem_D7UWrJtJ4ofe1Rw4,
|
|
|
50
50
|
akshare/data/ths.js,sha256=AWPkHf3L2Il1UUL0F5qDqNn1dfU0OlZBNUbMf8AmI3Y,39664
|
|
51
51
|
akshare/economic/__init__.py,sha256=7dWJSrPs7KTj9_Ffs-ZS3aYDrf3v4nOnZYqwUZ3DJms,82
|
|
52
52
|
akshare/economic/cons.py,sha256=0JM61Eiro0xqXGnCaDSoLsw5iQWKAtqhRHcXmDfJgyw,16594
|
|
53
|
-
akshare/economic/macro_australia.py,sha256=
|
|
53
|
+
akshare/economic/macro_australia.py,sha256=qniqZn2DKPe0ahKqO_5OTgVug3kOUAJt7knSwe_3Y-0,11648
|
|
54
54
|
akshare/economic/macro_bank.py,sha256=wG_u5w5YjeFRn1wr-Re7ty_s2CbQ0Qphxs_bIF_20UQ,11495
|
|
55
55
|
akshare/economic/macro_canada.py,sha256=nNaZ3yZIvgTtRiQhwoEybMX6UpqszPKeixzYITv9ox0,15195
|
|
56
56
|
akshare/economic/macro_china.py,sha256=O3pgTke7VbHMJKY3ZRU6hC_noOXnaQFPr0u2qJsebEY,148855
|
|
@@ -113,6 +113,7 @@ akshare/futures/futures_contract_detail.py,sha256=auwzNdaoFi5hoJY6rNkO54v5FD2gmE
|
|
|
113
113
|
akshare/futures/futures_daily_bar.py,sha256=pultXs8digLfWT0dzyWs0AtFk3Fi2uZDT-zxbg_PcOM,25299
|
|
114
114
|
akshare/futures/futures_foreign.py,sha256=oSIoAg5oy-CIlPWHkQffcvZGu02Y2GWOrt-6aPA53Xg,2059
|
|
115
115
|
akshare/futures/futures_hf_em.py,sha256=jne-wUYr2QTUkDq3qAxYKE0Hm90L3H8qUDu3JavKiUg,3338
|
|
116
|
+
akshare/futures/futures_hist_em.py,sha256=23poFID_GE2mWf9NnkJBE3N7FgxNYiqrbTKO0VciS_A,6441
|
|
116
117
|
akshare/futures/futures_hq_sina.py,sha256=eK1gEan4DPvpYmln8-tNnzh_J_733s95DBr--NqNYVA,9576
|
|
117
118
|
akshare/futures/futures_index_ccidx.py,sha256=Ni5GICleqcHrmLatOE_Bs4i1DS3bn0lEm_RyrjlucB0,4581
|
|
118
119
|
akshare/futures/futures_inventory_99.py,sha256=xdX8GSCEcRWYnbw0XS22rcblXOvlzUvfUltv7oyRh3Y,2990
|
|
@@ -120,6 +121,7 @@ akshare/futures/futures_inventory_em.py,sha256=C5nt4F51WB-oc8o3GrMvEGo0SO2mIq_H1
|
|
|
120
121
|
akshare/futures/futures_news_shmet.py,sha256=1epZ3MwDc-T2n1ie4SSDfvUaBiMpSL0Q_xb2VoZ_llU,2465
|
|
121
122
|
akshare/futures/futures_roll_yield.py,sha256=RiwN0yYwzYy8zGhmTopBwJ37aUQ7Llwh3eQRzn0apaE,6135
|
|
122
123
|
akshare/futures/futures_rule.py,sha256=38fJnUTohGqbwE65ZR1id7Oy-0DS-ODrGYsmx2jtGZ8,1571
|
|
124
|
+
akshare/futures/futures_rule_em.py,sha256=qcXfYZibRJLN2pb3ybNIkNonUOjDMvSirG5xKkRoWqk,963
|
|
123
125
|
akshare/futures/futures_settlement_price_sgx.py,sha256=R0PZOEkdYDf7H242iHYz70rxdvsMWoAL60bmGlj-0GY,2428
|
|
124
126
|
akshare/futures/futures_spot_stock_em.py,sha256=43CPkAouDu691M6aCMdO1SGKglTak2aba2Np7ftkAdg,3523
|
|
125
127
|
akshare/futures/futures_stock_js.py,sha256=BV_1Hm9osxWQmNSt24DQ52hAMrfMqP6eud657Y-D6x4,1665
|
|
@@ -159,7 +161,7 @@ akshare/index/index_eri.py,sha256=7X0KNDBntEkE_qSb2jb6IBv-S8PsevLFdxGT8nKT3W0,21
|
|
|
159
161
|
akshare/index/index_hog.py,sha256=kb867BVagt70_ycZMn22ks5Z9jlVbMiuTsvq5ygjeig,1657
|
|
160
162
|
akshare/index/index_kq_fz.py,sha256=Y-cbxWLpRyGcFcMSDxZZQXdAuD85IuQH5xC2rhtGbRc,3395
|
|
161
163
|
akshare/index/index_kq_ss.py,sha256=m4hAMNnzHk8JNAnKjkYYVeyG4zUC5zR5i0-u-OxmaGU,3333
|
|
162
|
-
akshare/index/index_option_qvix.py,sha256=
|
|
164
|
+
akshare/index/index_option_qvix.py,sha256=UHqLJXObn31Oa-RAB4Lgk5LwZ2FYAr1p--JvEfRpdUQ,14387
|
|
163
165
|
akshare/index/index_research_fund_sw.py,sha256=kVYjBl3vZg6CyYBCrxZiSv8taHMnqmG7PQ-LVmMNd3I,4603
|
|
164
166
|
akshare/index/index_research_sw.py,sha256=Mm1YtiP-PXhDysJwmFidX3RZSZZ92AyXpjl_tVrjdwA,21758
|
|
165
167
|
akshare/index/index_spot.py,sha256=meTBTCp2DPVTX_N3qpCLtkI-0q3XhrJ3gndNugRBGKg,1767
|
|
@@ -378,8 +380,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
|
378
380
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
379
381
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
380
382
|
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.
|
|
383
|
+
akshare-1.15.75.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
384
|
+
akshare-1.15.75.dist-info/METADATA,sha256=zK_9oFxDTT7z4jd6ousw8rvxaKk-IGObQ1i8XeNAwfE,13679
|
|
385
|
+
akshare-1.15.75.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
386
|
+
akshare-1.15.75.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
387
|
+
akshare-1.15.75.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|