Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #5519

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Dev #5519

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2978,9 +2978,10 @@
1.15.66 fix: fix fund_etf_dividend_sina interface
1.15.67 fix: fix stock_hold_change_cninfo interface
1.15.68 fix: fix stock_research_report_em interface
1.15.69 fix: fix index_zh_a_hist_min_em interface
"""

__version__ = "1.15.68"
__version__ = "1.15.69"
__author__ = "AKFamily"

import sys
Expand Down
12 changes: 7 additions & 5 deletions akshare/futures/cot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2023/11/15 19:30
Date: 2025/1/10 18:30
Desc: 期货-中国-交易所-会员持仓数据接口
大连商品交易所、上海期货交易所、郑州商品交易所、中国金融期货交易所、广州期货交易所
采集前 20 会员持仓数据;
Expand Down Expand Up @@ -1171,7 +1171,7 @@ def __futures_gfex_vars_list() -> list:
return var_list


def __futures_gfex_contract_list(symbol: str = "si", date: str = "20231113") -> list:
def __futures_gfex_contract_list(symbol: str = "si", date: str = "20240729") -> list:
"""
广州期货交易所-合约具体名称列表
http://www.gfex.com.cn/gfex/rcjccpm/hqsj_tjsj.shtml
Expand All @@ -1194,6 +1194,8 @@ def __futures_gfex_contract_list(symbol: str = "si", date: str = "20231113") ->
r = requests.post(url=url, data=payload, headers=headers)
data_json = r.json()
temp_df = pd.DataFrame(data_json["data"])
if temp_df.empty:
return []
contract_list = temp_df.iloc[:, 0].tolist()
return contract_list

Expand Down Expand Up @@ -1317,15 +1319,15 @@ def futures_gfex_position_rank(date: str = "20231113", vars_list: list = None):
symbol=item.lower(), date=date
)
except: # noqa: E722
return {}
return big_dict
for name in futures_contract_list:
try:
temp_df = __futures_gfex_contract_data(
symbol=item.lower(), contract_id=name, date=date
)
big_dict[name] = temp_df
except: # noqa: E722
return {}
return big_dict
return big_dict


Expand Down Expand Up @@ -1371,7 +1373,7 @@ def futures_gfex_position_rank(date: str = "20231113", vars_list: list = None):
print(futures_dce_position_rank_other_df)

# 广州期货交易所
futures_gfex_position_rank_df = futures_gfex_position_rank(date="20240805")
futures_gfex_position_rank_df = futures_gfex_position_rank(date="20240729")
print(futures_gfex_position_rank_df)

# 总接口
Expand Down
10 changes: 6 additions & 4 deletions akshare/index/index_zh_em.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2023/12/11 20:20
Date: 2025/1/10 18:10
Desc: 东方财富网-指数行情数据
"""

Expand Down Expand Up @@ -85,6 +85,8 @@ def index_code_id_map_em() -> dict:
key: value - 1 if value == 1 else value + 1
for key, value in code_id_dict.items()
}
# 单独增加品种
code_id_dict.update({"932000": 2})
return code_id_dict


Expand Down Expand Up @@ -438,9 +440,9 @@ def index_zh_a_hist_min_em(
print(index_zh_a_hist_df)

index_zh_a_hist_min_em_df = index_zh_a_hist_min_em(
symbol="000001",
symbol="932000",
period="1",
start_date="2024-03-20 09:30:00",
end_date="2024-03-20 19:00:00",
start_date="2025-01-10 09:30:00",
end_date="2025-01-10 19:00:00",
)
print(index_zh_a_hist_min_em_df)
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@

## 更新说明详情

1.15.69 fix: fix index_zh_a_hist_min_em interface

1. 修复 index_zh_a_hist_min_em 接口
2. 修复 futures_gfex_position_rank 接口

1.15.68 fix: fix stock_research_report_em interface

1. 修复 stock_research_report_em 接口
Expand Down Expand Up @@ -4961,6 +4966,8 @@

## 版本更新说明

1.15.69 fix: fix index_zh_a_hist_min_em interface

1.15.68 fix: fix stock_research_report_em interface

1.15.67 fix: fix stock_hold_change_cninfo interface
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. 本文档更新时间:**2025-01-09**;
1. 本文档更新时间:**2025-01-10**;
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. **知识星球【数据科学实战】** 2025 全新改版,聚焦于量化投资内容,欢迎加入 **知识星球【数据科学实战】** 高质量社区,里面有丰富的视频课程、问答、文章、书籍及代码等内容:
Expand Down
Loading