akshare 1.16.44__py3-none-any.whl → 1.16.45__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_risk_analysis_em.py +11 -9
- {akshare-1.16.44.dist-info → akshare-1.16.45.dist-info}/METADATA +1 -1
- {akshare-1.16.44.dist-info → akshare-1.16.45.dist-info}/RECORD +7 -7
- {akshare-1.16.44.dist-info → akshare-1.16.45.dist-info}/LICENSE +0 -0
- {akshare-1.16.44.dist-info → akshare-1.16.45.dist-info}/WHEEL +0 -0
- {akshare-1.16.44.dist-info → akshare-1.16.45.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
@@ -3053,9 +3053,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
3053
3053
|
1.16.42 fix: fix stock_concept_fund_flow_hist interface
|
3054
3054
|
1.16.43 fix: fix option_value_analysis_em interface
|
3055
3055
|
1.16.44 fix: fix stock_board_concept_hist_em interface
|
3056
|
+
1.16.45 fix: fix option_risk_analysis_em interface
|
3056
3057
|
"""
|
3057
3058
|
|
3058
|
-
__version__ = "1.16.
|
3059
|
+
__version__ = "1.16.45"
|
3059
3060
|
__author__ = "AKFamily"
|
3060
3061
|
|
3061
3062
|
import sys
|
@@ -1,14 +1,15 @@
|
|
1
1
|
# -*- coding:utf-8 -*-
|
2
2
|
# !/usr/bin/env python
|
3
3
|
"""
|
4
|
-
Date: 2025/
|
4
|
+
Date: 2025/3/13 21:50
|
5
5
|
Desc: 东方财富网-数据中心-特色数据-期权风险分析
|
6
6
|
https://data.eastmoney.com/other/riskanal.html
|
7
7
|
"""
|
8
8
|
|
9
|
-
import requests
|
10
9
|
import pandas as pd
|
11
10
|
|
11
|
+
from akshare.utils.func import fetch_paginated_data
|
12
|
+
|
12
13
|
|
13
14
|
def option_risk_analysis_em() -> pd.DataFrame:
|
14
15
|
"""
|
@@ -19,21 +20,20 @@ def option_risk_analysis_em() -> pd.DataFrame:
|
|
19
20
|
"""
|
20
21
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
21
22
|
params = {
|
22
|
-
"fid": "
|
23
|
+
"fid": "f12",
|
23
24
|
"po": "1",
|
24
|
-
"pz": "
|
25
|
+
"pz": "100",
|
25
26
|
"pn": "1",
|
26
|
-
"np": "
|
27
|
+
"np": "1",
|
27
28
|
"fltt": "2",
|
28
29
|
"invt": "2",
|
29
30
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
30
31
|
"fields": "f1,f2,f3,f12,f13,f14,f302,f303,f325,f326,f327,f329,f328,f301,f152,f154",
|
31
32
|
"fs": "m:10",
|
32
33
|
}
|
33
|
-
|
34
|
-
data_json = r.json()
|
35
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
34
|
+
temp_df = fetch_paginated_data(url, params)
|
36
35
|
temp_df.columns = [
|
36
|
+
"-",
|
37
37
|
"-",
|
38
38
|
"最新价",
|
39
39
|
"涨跌幅",
|
@@ -76,7 +76,9 @@ def option_risk_analysis_em() -> pd.DataFrame:
|
|
76
76
|
temp_df["Vega"] = pd.to_numeric(temp_df["Vega"], errors="coerce")
|
77
77
|
temp_df["Rho"] = pd.to_numeric(temp_df["Rho"], errors="coerce")
|
78
78
|
temp_df["Theta"] = pd.to_numeric(temp_df["Theta"], errors="coerce")
|
79
|
-
temp_df["到期日"] = pd.to_datetime(
|
79
|
+
temp_df["到期日"] = pd.to_datetime(
|
80
|
+
temp_df["到期日"], format="%Y%m%d", errors="coerce"
|
81
|
+
).dt.date
|
80
82
|
return temp_df
|
81
83
|
|
82
84
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
akshare/__init__.py,sha256=
|
1
|
+
akshare/__init__.py,sha256=LlUT8S4hhcp3AvSrfHbZtr4Z7WaA9ppZiRqasKLWI90,191000
|
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
|
@@ -204,7 +204,7 @@ akshare/option/option_finance.py,sha256=7rnEeHo-7Sddrs36Q4c99CXL_9m8IJzw9S1Aqh3B
|
|
204
204
|
akshare/option/option_finance_sina.py,sha256=Pzsrl_NKN99nWPSAirq7ushGwSfd738ISVYeCHxMZXE,37843
|
205
205
|
akshare/option/option_lhb_em.py,sha256=VHrV2BWAPE7tj8q7J5Crjm-sey8QarYd1lgxKbkX2CQ,9090
|
206
206
|
akshare/option/option_premium_analysis_em.py,sha256=E0_RVSnEcUBlicHv1GdWG5gJYzCgqx6uTXY81y4LY5c,2543
|
207
|
-
akshare/option/option_risk_analysis_em.py,sha256=
|
207
|
+
akshare/option/option_risk_analysis_em.py,sha256=OcmZ42Ewg9XCJkNDt8uLjtF9akmKsEdoF9Zu97Hz4eE,2587
|
208
208
|
akshare/option/option_risk_indicator_sse.py,sha256=W1_mGrk8M9pbbadzSAy5euWMEGn4-cVWBc8Jk_I2WmI,2484
|
209
209
|
akshare/option/option_value_analysis_em.py,sha256=KIzLJxax1P8SuIUFD0CnnEpTntSnaObwYotGn28DgoY,2658
|
210
210
|
akshare/other/__init__.py,sha256=guH4GLhFcE_5iaMHOHtgK7QKa0i7esYdmZFfJMG6E10,82
|
@@ -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.45.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
393
|
+
akshare-1.16.45.dist-info/METADATA,sha256=kpRwFQizLDZmEHrIpUdUWr0yBlNCnK7obzi6HVvMDxE,13653
|
394
|
+
akshare-1.16.45.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
395
|
+
akshare-1.16.45.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
396
|
+
akshare-1.16.45.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|