akshare 1.15.49__py3-none-any.whl → 1.15.50__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 +2 -1
- akshare/stock/stock_xq.py +6 -2
- akshare/stock_feature/stock_gpzy_em.py +30 -20
- {akshare-1.15.49.dist-info → akshare-1.15.50.dist-info}/METADATA +1 -1
- {akshare-1.15.49.dist-info → akshare-1.15.50.dist-info}/RECORD +8 -8
- {akshare-1.15.49.dist-info → akshare-1.15.50.dist-info}/LICENSE +0 -0
- {akshare-1.15.49.dist-info → akshare-1.15.50.dist-info}/WHEEL +0 -0
- {akshare-1.15.49.dist-info → akshare-1.15.50.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2959,9 +2959,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2959
2959
|
1.15.47 fix: fix stock_individual_spot_xq interface
|
|
2960
2960
|
1.15.48 fix: fix stock_mda_ym interface
|
|
2961
2961
|
1.15.49 fix: fix option_dce_daily interface
|
|
2962
|
+
1.15.50 fix: fix stock_gpzy_profile_em interface
|
|
2962
2963
|
"""
|
|
2963
2964
|
|
|
2964
|
-
__version__ = "1.15.
|
|
2965
|
+
__version__ = "1.15.50"
|
|
2965
2966
|
__author__ = "AKFamily"
|
|
2966
2967
|
|
|
2967
2968
|
import sys
|
akshare/stock/stock_xq.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# !/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/
|
|
4
|
+
Date: 2024/12/18 17:50
|
|
5
5
|
Desc: 雪球-行情中心-个股
|
|
6
6
|
https://xueqiu.com/S/SH513520
|
|
7
7
|
"""
|
|
@@ -29,6 +29,7 @@ def _convert_timestamp(timestamp_ms: int) -> str:
|
|
|
29
29
|
def stock_individual_spot_xq(
|
|
30
30
|
symbol: str = "SH600000",
|
|
31
31
|
timeout: float = None,
|
|
32
|
+
token: str = None,
|
|
32
33
|
) -> pd.DataFrame:
|
|
33
34
|
"""
|
|
34
35
|
雪球-行情中心-个股
|
|
@@ -37,12 +38,15 @@ def stock_individual_spot_xq(
|
|
|
37
38
|
:type symbol: str
|
|
38
39
|
:param timeout: choice of None or a positive float number
|
|
39
40
|
:type timeout: float
|
|
41
|
+
:param token: set xueqiu token
|
|
42
|
+
:type token: str
|
|
40
43
|
:return: 证券最新行情
|
|
41
44
|
:rtype: pandas.DataFrame
|
|
42
45
|
"""
|
|
43
46
|
session = requests.Session()
|
|
47
|
+
xq_a_token = token or "cccb558956c11f5aaf8b9a30bcf1f214117e8d67"
|
|
44
48
|
headers = {
|
|
45
|
-
"cookie": "xq_a_token=
|
|
49
|
+
"cookie": f"xq_a_token={xq_a_token};",
|
|
46
50
|
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 "
|
|
47
51
|
"(KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
|
|
48
52
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/
|
|
4
|
+
Date: 2024/12/18 17:30
|
|
5
5
|
Desc: 东方财富网-数据中心-特色数据-股权质押
|
|
6
6
|
东方财富网-数据中心-特色数据-股权质押-股权质押市场概况: https://data.eastmoney.com/gpzy/marketProfile.aspx
|
|
7
7
|
东方财富网-数据中心-特色数据-股权质押-上市公司质押比例: https://data.eastmoney.com/gpzy/pledgeRatio.aspx
|
|
@@ -15,7 +15,7 @@ import math
|
|
|
15
15
|
|
|
16
16
|
import pandas as pd
|
|
17
17
|
import requests
|
|
18
|
-
from tqdm import
|
|
18
|
+
from akshare.utils.tqdm import get_tqdm
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def stock_gpzy_profile_em() -> pd.DataFrame:
|
|
@@ -112,6 +112,7 @@ def stock_gpzy_pledge_ratio_em(date: str = "20240906") -> pd.DataFrame:
|
|
|
112
112
|
data_json = r.json()
|
|
113
113
|
total_page = data_json["result"]["pages"]
|
|
114
114
|
big_df = pd.DataFrame()
|
|
115
|
+
tqdm = get_tqdm()
|
|
115
116
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
116
117
|
params.update({"pageNumber": page})
|
|
117
118
|
r = requests.get(url, params=params)
|
|
@@ -199,6 +200,7 @@ def stock_gpzy_pledge_ratio_detail_em() -> pd.DataFrame:
|
|
|
199
200
|
url = "https://datacenter-web.eastmoney.com/api/data/v1/get"
|
|
200
201
|
total_page = _get_page_num_gpzy_market_pledge_ratio_detail()
|
|
201
202
|
big_df = pd.DataFrame()
|
|
203
|
+
tqdm = get_tqdm()
|
|
202
204
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
|
203
205
|
params = {
|
|
204
206
|
"sortColumns": "NOTICE_DATE",
|
|
@@ -346,14 +348,18 @@ def stock_gpzy_distribute_statistics_company_em() -> pd.DataFrame:
|
|
|
346
348
|
"达到平仓线比例",
|
|
347
349
|
]
|
|
348
350
|
]
|
|
349
|
-
temp_df["质押公司数量"] = pd.to_numeric(temp_df["质押公司数量"])
|
|
350
|
-
temp_df["质押笔数"] = pd.to_numeric(temp_df["质押笔数"])
|
|
351
|
-
temp_df["质押数量"] = pd.to_numeric(temp_df["质押数量"])
|
|
352
|
-
temp_df["未达预警线比例"] = pd.to_numeric(
|
|
351
|
+
temp_df["质押公司数量"] = pd.to_numeric(temp_df["质押公司数量"], errors="coerce")
|
|
352
|
+
temp_df["质押笔数"] = pd.to_numeric(temp_df["质押笔数"], errors="coerce")
|
|
353
|
+
temp_df["质押数量"] = pd.to_numeric(temp_df["质押数量"], errors="coerce")
|
|
354
|
+
temp_df["未达预警线比例"] = pd.to_numeric(
|
|
355
|
+
temp_df["未达预警线比例"], errors="coerce"
|
|
356
|
+
)
|
|
353
357
|
temp_df["达到预警线未达平仓线比例"] = pd.to_numeric(
|
|
354
|
-
temp_df["达到预警线未达平仓线比例"]
|
|
358
|
+
temp_df["达到预警线未达平仓线比例"], errors="coerce"
|
|
359
|
+
)
|
|
360
|
+
temp_df["达到平仓线比例"] = pd.to_numeric(
|
|
361
|
+
temp_df["达到平仓线比例"], errors="coerce"
|
|
355
362
|
)
|
|
356
|
-
temp_df["达到平仓线比例"] = pd.to_numeric(temp_df["达到平仓线比例"])
|
|
357
363
|
return temp_df
|
|
358
364
|
|
|
359
365
|
|
|
@@ -411,14 +417,18 @@ def stock_gpzy_distribute_statistics_bank_em() -> pd.DataFrame:
|
|
|
411
417
|
"达到平仓线比例",
|
|
412
418
|
]
|
|
413
419
|
]
|
|
414
|
-
temp_df["质押公司数量"] = pd.to_numeric(temp_df["质押公司数量"])
|
|
415
|
-
temp_df["质押笔数"] = pd.to_numeric(temp_df["质押笔数"])
|
|
416
|
-
temp_df["质押数量"] = pd.to_numeric(temp_df["质押数量"])
|
|
417
|
-
temp_df["未达预警线比例"] = pd.to_numeric(
|
|
420
|
+
temp_df["质押公司数量"] = pd.to_numeric(temp_df["质押公司数量"], errors="coerce")
|
|
421
|
+
temp_df["质押笔数"] = pd.to_numeric(temp_df["质押笔数"], errors="coerce")
|
|
422
|
+
temp_df["质押数量"] = pd.to_numeric(temp_df["质押数量"], errors="coerce")
|
|
423
|
+
temp_df["未达预警线比例"] = pd.to_numeric(
|
|
424
|
+
temp_df["未达预警线比例"], errors="coerce"
|
|
425
|
+
)
|
|
418
426
|
temp_df["达到预警线未达平仓线比例"] = pd.to_numeric(
|
|
419
|
-
temp_df["达到预警线未达平仓线比例"]
|
|
427
|
+
temp_df["达到预警线未达平仓线比例"], errors="coerce"
|
|
428
|
+
)
|
|
429
|
+
temp_df["达到平仓线比例"] = pd.to_numeric(
|
|
430
|
+
temp_df["达到平仓线比例"], errors="coerce"
|
|
420
431
|
)
|
|
421
|
-
temp_df["达到平仓线比例"] = pd.to_numeric(temp_df["达到平仓线比例"])
|
|
422
432
|
return temp_df
|
|
423
433
|
|
|
424
434
|
|
|
@@ -469,12 +479,12 @@ def stock_gpzy_industry_data_em() -> pd.DataFrame:
|
|
|
469
479
|
"统计时间",
|
|
470
480
|
]
|
|
471
481
|
]
|
|
472
|
-
temp_df["统计时间"] = pd.to_datetime(temp_df["统计时间"]).dt.date
|
|
473
|
-
temp_df["平均质押比例"] = pd.to_numeric(temp_df["平均质押比例"])
|
|
474
|
-
temp_df["公司家数"] = pd.to_numeric(temp_df["公司家数"])
|
|
475
|
-
temp_df["质押总笔数"] = pd.to_numeric(temp_df["质押总笔数"])
|
|
476
|
-
temp_df["质押总股本"] = pd.to_numeric(temp_df["质押总股本"])
|
|
477
|
-
temp_df["最新质押市值"] = pd.to_numeric(temp_df["最新质押市值"])
|
|
482
|
+
temp_df["统计时间"] = pd.to_datetime(temp_df["统计时间"], errors="coerce").dt.date
|
|
483
|
+
temp_df["平均质押比例"] = pd.to_numeric(temp_df["平均质押比例"], errors="coerce")
|
|
484
|
+
temp_df["公司家数"] = pd.to_numeric(temp_df["公司家数"], errors="coerce")
|
|
485
|
+
temp_df["质押总笔数"] = pd.to_numeric(temp_df["质押总笔数"], errors="coerce")
|
|
486
|
+
temp_df["质押总股本"] = pd.to_numeric(temp_df["质押总股本"], errors="coerce")
|
|
487
|
+
temp_df["最新质押市值"] = pd.to_numeric(temp_df["最新质押市值"], errors="coerce")
|
|
478
488
|
return temp_df
|
|
479
489
|
|
|
480
490
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=2BaNCEIsG20AwVMr2jJbwbLnx8vmWxD4OjhE8Dr-Y4g,184683
|
|
2
2
|
akshare/datasets.py,sha256=-qdwaQjgBlftX84uM74KJqCYJYkQ50PV416_neA4uls,995
|
|
3
3
|
akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
|
|
4
4
|
akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
|
|
@@ -274,7 +274,7 @@ akshare/stock/stock_us_js.py,sha256=wwZpRvVHqjxwd0cb2O5vtRW8Zw90Kdl5O4XNwoevN64,
|
|
|
274
274
|
akshare/stock/stock_us_pink.py,sha256=jgkEjPm_qa4zSN1MH0unHJopSkcF-8Rqlp5Kus2KaQ8,3062
|
|
275
275
|
akshare/stock/stock_us_sina.py,sha256=3bD41Y5GqDTv52bx5jbjrt0psaHZS10UL_e7E2B6wW8,8146
|
|
276
276
|
akshare/stock/stock_weibo_nlp.py,sha256=eM7ofsNSrKiYeS0g38Qj9CxT6dkJZrn_pmziIiTqp4U,3286
|
|
277
|
-
akshare/stock/stock_xq.py,sha256=
|
|
277
|
+
akshare/stock/stock_xq.py,sha256=zlNMk7cMSFyRkAzOsxCfgfklHj_RHGNxeIp7MlH2K3w,4641
|
|
278
278
|
akshare/stock/stock_zh_a_sina.py,sha256=ZobGnFMIR67ENk05ocqIkeiItLlgK67dW8ZjLdDss3s,18862
|
|
279
279
|
akshare/stock/stock_zh_a_special.py,sha256=RRXkeZtRWm_maIPWgxvhBdX6eNybECjhSuEesZHRFJI,10294
|
|
280
280
|
akshare/stock/stock_zh_a_tick_tx.py,sha256=TJUAWLKAeoLEaVVJQlj0t-1smZGoAO0X0rPsUPVhZZ4,2131
|
|
@@ -309,7 +309,7 @@ akshare/stock_feature/stock_gddh_em.py,sha256=I_MUJhyy0mwjNG46ZsQINEQvHR42EmS7gJ
|
|
|
309
309
|
akshare/stock_feature/stock_gdfx_em.py,sha256=rnGnHYmPH7b2mk4R9LJ3xl5XTMUaQqsFyQejje0qhyQ,38645
|
|
310
310
|
akshare/stock_feature/stock_gdhs.py,sha256=Z6ZMy1A03BqMu9TghcIu2Sd_wwEtpIH7qawHun9G7ns,9036
|
|
311
311
|
akshare/stock_feature/stock_gdzjc_em.py,sha256=SHJH5iS3_NhvjTqRXF0vPooZl0s_ASeyZmNCC50ZYqs,4426
|
|
312
|
-
akshare/stock_feature/stock_gpzy_em.py,sha256=
|
|
312
|
+
akshare/stock_feature/stock_gpzy_em.py,sha256=LOdR3s7NLKk-PB_pLjhX5rmIeV-9ouG4CMHAv-GUVOk,17869
|
|
313
313
|
akshare/stock_feature/stock_gxl_lg.py,sha256=I8TpDEpFzadZSSyZisyIk6163mJlRxup91dmlBH4t4U,2641
|
|
314
314
|
akshare/stock_feature/stock_hist_em.py,sha256=H8bbC0LJBvDTRnrhZvFtrMM8Y6H4LZk-C0KIPar1aQs,69201
|
|
315
315
|
akshare/stock_feature/stock_hist_tx.py,sha256=WpLsbkG2didSx7lYNkSbTWNTrLhUKbcopfD18WO2Rlc,3397
|
|
@@ -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=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
|
383
|
-
akshare-1.15.
|
|
384
|
-
akshare-1.15.
|
|
385
|
-
akshare-1.15.
|
|
386
|
-
akshare-1.15.
|
|
387
|
-
akshare-1.15.
|
|
383
|
+
akshare-1.15.50.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
384
|
+
akshare-1.15.50.dist-info/METADATA,sha256=9DLPR2QVNTwSktTE6eBBUk8Wzqfi9aLSDG9n9ChCPRg,13423
|
|
385
|
+
akshare-1.15.50.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
386
|
+
akshare-1.15.50.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
387
|
+
akshare-1.15.50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|