Skip to content

Commit

Permalink
fix(stock_us_hist): fix stock_us_hist interface
Browse files Browse the repository at this point in the history
fix stock_us_hist interface
  • Loading branch information
ak-quant committed Mar 24, 2022
1 parent deef5e5 commit db16b92
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1909,9 +1909,10 @@
1.4.86 fix: fix rename all interface in fund_aum_em.py
1.4.87 add: add fund_portfolio_industry_allocation_em interface
1.4.88 fix: fix fund_new_found_em interface
1.4.89 fix: fix stock_us_hist interface
"""

__version__ = "1.4.88"
__version__ = "1.4.89"
__author__ = "AKFamily"

import sys
Expand Down
5 changes: 3 additions & 2 deletions akshare/stock_feature/stock_hist_em.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def stock_us_spot_em() -> pd.DataFrame:


def stock_us_hist(
symbol: str = "105.APCX",
symbol: str = "105.MSFT",
period: str = "daily",
start_date: str = "19700101",
end_date: str = "22220101",
Expand All @@ -923,7 +923,7 @@ def stock_us_hist(
"""
东方财富网-行情-美股-每日行情
http://quote.eastmoney.com/us/ENTX.html#fullScreenChart
:param symbol: 股票代码; 此股票代码需要通过调用 ak.stock_us_spot_em 的 `代码` 字段获取
:param symbol: 股票代码; 此股票代码需要通过调用 ak.stock_us_spot_em() 的 `代码` 字段获取
:type symbol: str
:param period: choice of {'daily', 'weekly', 'monthly'}
:type period: str
Expand Down Expand Up @@ -981,6 +981,7 @@ def stock_us_hist(
temp_df['涨跌幅'] = pd.to_numeric(temp_df['涨跌幅'])
temp_df['涨跌额'] = pd.to_numeric(temp_df['涨跌额'])
temp_df['换手率'] = pd.to_numeric(temp_df['换手率'])
temp_df.sort_values(['日期'], inplace=True)
return temp_df


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

## 更新说明

1.4.89 fix: fix stock_us_hist interface

1. 修复 stock_us_hist 接口,结果数据根据日期排序

1.4.88 fix: fix fund_new_found_em interface

1. 修复 fund_em_new_found 接口命名为 fund_new_found_em 接口
Expand Down Expand Up @@ -209,6 +213,8 @@

## 版本更新说明

1.4.89 fix: fix stock_us_hist interface

1.4.88 fix: fix fund_new_found_em interface

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

1. 本文档更新时间: **2022-03-23**;
1. 本文档更新时间: **2022-03-24**;
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. **知识星球【数据科学家】** 已上线,想了解更多金融量化、数据科学相关的内容,欢迎加入 **知识星球【数据科学家】** 高质量社区,里面有丰富的视频、问答、文章、书籍及代码等内容:
Expand Down

0 comments on commit db16b92

Please sign in to comment.