Skip to content

Commit

Permalink
Date (#4365)
Browse files Browse the repository at this point in the history
* add version 1.12.3

* fix stock_gdfx_free_holding_teamwork_em

* update date
  • Loading branch information
albertandking authored Dec 25, 2023
1 parent e2c2e8d commit 167a360
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 21 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2615,9 +2615,10 @@
1.11.99 fix: fix stock_zh_index_spot interface
1.12.1 fix: fix futures_comm_info interface
1.12.2 fix: fix hurun_rank interface
1.12.3 fix: fix stock_gdfx_free_holding_teamwork_em interface
"""

__version__ = "1.12.2"
__version__ = "1.12.3"
__author__ = "AKFamily"

import sys
Expand Down
9 changes: 7 additions & 2 deletions akshare/stock_feature/stock_gdfx_em.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,13 +775,16 @@ def stock_gdfx_holding_analyse_em(date: str = "20230331") -> pd.DataFrame:
return big_df


def stock_gdfx_free_holding_teamwork_em() -> pd.DataFrame:
def stock_gdfx_free_holding_teamwork_em(symbol: str = "社保") -> pd.DataFrame:
"""
东方财富网-数据中心-股东分析-股东协同-十大流通股东
https://data.eastmoney.com/gdfx/HoldingAnalyse.html
:param symbol: 全部; choice of {"全部", "个人", "基金", "QFII", "社保", "券商", "信托"}
:type symbol: str
:return: 十大流通股东
:rtype: pandas.DataFrame
"""
symbol_dict = {} if symbol == "全部" else {"filter": f'(HOLDER_TYPE="{symbol}")'}
url = "https://datacenter-web.eastmoney.com/api/data/v1/get"
params = {
"sortColumns": "COOPERAT_NUM,HOLDER_NEW,COOPERAT_HOLDER_NEW",
Expand All @@ -793,6 +796,7 @@ def stock_gdfx_free_holding_teamwork_em() -> pd.DataFrame:
"source": "WEB",
"client": "WEB",
}
params.update(symbol_dict)
r = requests.get(url, params=params)
data_json = r.json()
total_page = data_json["result"]["pages"]
Expand All @@ -815,6 +819,7 @@ def stock_gdfx_free_holding_teamwork_em() -> pd.DataFrame:
"协同股东名称",
"协同股东类型",
"协同次数",
"-",
"个股详情",
]
big_df = big_df[
Expand All @@ -828,7 +833,7 @@ def stock_gdfx_free_holding_teamwork_em() -> pd.DataFrame:
"个股详情",
]
]
big_df["协同次数"] = pd.to_numeric(big_df["协同次数"])
big_df["协同次数"] = pd.to_numeric(big_df["协同次数"], errors="coerce")
return big_df


Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@

## 更新说明详情

1.12.3 fix: fix stock_gdfx_free_holding_teamwork_em interface

1. 修复 stock_gdfx_free_holding_teamwork_em 接口

1.12.2 fix: fix hurun_rank interface

1. 修复 hurun_rank 接口
Expand Down Expand Up @@ -3269,6 +3273,8 @@

## 版本更新说明

1.12.3 fix: fix stock_gdfx_free_holding_teamwork_em interface

1.12.2 fix: fix hurun_rank interface

1.12.1 fix: fix futures_comm_info interface
Expand Down
37 changes: 20 additions & 17 deletions docs/data/stock/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -5955,11 +5955,13 @@ print(stock_hsgt_fund_flow_summary_em_df)
数据示例

```
交易日 类型 板块 资金方向 交易状态 ... 上涨数 持平数 下跌数 相关指数 指数涨跌幅
交易日 类型 板块 资金方向 交易状态 ... 上涨数 持平数 下跌数 相关指数 指数涨跌幅
0 2022-11-25 沪港通 沪股通 北向 3 ... 302 8 284 上证指数 0.40
1 2022-11-25 沪港通 港股通(沪) 南向 3 ... 179 16 186 恒生指数 -0.49
2 2022-11-25 深港通 深股通 北向 3 ... 283 29 621 深证成指 -0.48
3 2022-11-25 深港通 港股通(深) 南向 3 ... 247 33 268 恒生指数 -0.49

[4 rows x 13 columns]
```

### 沪深港通持股
Expand Down Expand Up @@ -12082,9 +12084,9 @@ print(stock_gdfx_holding_statistics_em_df)

输入参数

| 名称 | 类型 | 描述 |
|-----|-----|-----|
| - | - | - |
| 名称 | 类型 | 描述 |
|--------|-----|---------------------------------------------------------------------|
| symbol | str | symbol="社保"; choice of {"全部", "个人", "基金", "QFII", "社保", "券商", "信托"} |

输出参数

Expand All @@ -12103,25 +12105,26 @@ print(stock_gdfx_holding_statistics_em_df)
```python
import akshare as ak

stock_gdfx_free_holding_teamwork_em_df = ak.stock_gdfx_free_holding_teamwork_em()
stock_gdfx_free_holding_teamwork_em_df = ak.stock_gdfx_free_holding_teamwork_em(symbol="社保")
print(stock_gdfx_free_holding_teamwork_em_df)
```

数据示例

```
序号 ... 个股详情
0 1 ... 600655|豫园股份|2021-06-30,600352|浙江龙盛|2021-03-31,...
1 2 ... 600655|豫园股份|2021-06-30,600352|浙江龙盛|2021-03-31,...
2 3 ... 600522|中天科技|2021-09-30,000333|美的集团|2021-09-30,...
3 4 ... 600522|中天科技|2021-09-30,000333|美的集团|2021-09-30,...
4 5 ... 600522|中天科技|2021-09-30,000333|美的集团|2021-09-30,...
... ... ...
4995 4996 ... 002600|领益智造|2020-09-30,600309|万华化学|2021-09-30,...
4996 4997 ... 301002|崧盛股份|2021-06-30,600521|华海药业|2021-06-30,...
4997 4998 ... 300735|光弘科技|2020-03-31,002920|德赛西威|2020-06-30,...
4998 4999 ... 300470|中密控股|2020-06-30,002182|云海金属|2020-12-31,...
4999 5000 ... 002912|中新赛克|2020-03-31,300136|信维通信|2020-09-30,...
序号 ... 个股详情
0 1 ... 601668|中国建筑|2023-09-30,600066|宇通客车|2023-06-30,...
1 2 ... 600028|中国石化|2022-09-30,300059|东方财富|2022-12-31,...
2 3 ... 600782|新钢股份|2022-09-30,002463|沪电股份|2021-12-31,...
3 4 ... 601899|紫金矿业|2023-03-31,600031|三一重工|2023-09-30,...
4 5 ... 002340|格林美|2022-06-30,600968|海油发展|2022-09-30,6...
... ... ...
19421 19422 ... 600019|宝钢股份|2021-03-31
19422 19423 ... 600019|宝钢股份|2021-03-31
19423 19424 ... 600019|宝钢股份|2021-03-31
19424 19425 ... 600019|宝钢股份|2021-03-31
19425 19426 ... 600019|宝钢股份|2021-03-31
[19426 rows x 7 columns]
```

#### 股东协同-十大股东
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**风险提示:[AKShare](https://github.com/akfamily/akshare) 开源财经数据接口库所采集的数据皆来自公开的数据源,不涉及任何个人隐私数据和非公开数据。
同时本项目提供的数据接口及相关数据仅用于学术研究,任何个人、机构及团体使用本项目的数据接口及相关数据请注意商业风险。**

1. 本文档更新时间:**2023-12-22**
1. 本文档更新时间:**2023-12-25**
2. 如有 [AKShare](https://github.com/akfamily/akshare) 库、文档及数据的相关问题,请在 [AKShare Issues](https://github.com/akfamily/akshare/issues) 中提 Issues;
3. 欢迎关注 **数据科学实战** 微信公众号:<div><img src="https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/readme/qrcode/ds.png"></div>;
4. 如果您的问题未能在文档中找到答案,您也可以加入 **AKShare-VIP QQ 群**: 为了提高问答质量,此群为收费群(一杯咖啡钱即可入群,赠送[《AKShare-初阶-使用教学》](https://zmj.xet.tech/s/wck86)视频课),可以添加 **AKShare-小助手** QQ:1254836886,由小助手邀请入群! ![](https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/readme/qrcode/qr_code_1254836886.jpg)
Expand Down

0 comments on commit 167a360

Please sign in to comment.