Skip to content

Commit

Permalink
fix(stock_zt_pool_em): fix stock_zt_pool_em interface
Browse files Browse the repository at this point in the history
fix stock_zt_pool_em interface
  • Loading branch information
ak-quant committed Apr 26, 2022
1 parent cce8bd1 commit 5738d0f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1962,9 +1962,10 @@
1.5.40 fix: fix js_news interface
1.5.41 fix: fix stock_margin_underlying_info_szse interface
1.5.42 fix: fix stock_zt_pool_dtgc_em interface
1.5.43 fix: fix stock_zt_pool_em interface
"""

__version__ = "1.5.42"
__version__ = "1.5.43"
__author__ = "AKFamily"

import sys
Expand Down
20 changes: 15 additions & 5 deletions akshare/stock_feature/stock_ztb_em.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2022/2/13 15:30
Date: 2022/4/26 15:30
Desc: 首页-行情中心-涨停板行情-涨停股池
http://quote.eastmoney.com/ztb/detail#type=ztgc
Expand All @@ -18,7 +18,7 @@
import requests


def stock_zt_pool_em(date: str = '20211224') -> pd.DataFrame:
def stock_zt_pool_em(date: str = '20220426') -> pd.DataFrame:
"""
东方财富网-行情中心-涨停板行情-涨停股池
http://quote.eastmoney.com/ztb/detail#type=ztgc
Expand All @@ -30,7 +30,7 @@ def stock_zt_pool_em(date: str = '20211224') -> pd.DataFrame:
'ut': '7eea3edcaed734bea9cbfc24409ed989',
'dpt': 'wz.ztzt',
'Pageindex': '0',
'pagesize': '320',
'pagesize': '10000',
'sort': 'fbt:asc',
'date': date,
'_': '1621590489736',
Expand Down Expand Up @@ -83,6 +83,16 @@ def stock_zt_pool_em(date: str = '20211224') -> pd.DataFrame:
temp_df['首次封板时间'] = temp_df['首次封板时间'].astype(str).str.zfill(6)
temp_df['最后封板时间'] = temp_df['最后封板时间'].astype(str).str.zfill(6)
temp_df['最新价'] = temp_df['最新价'] / 1000
temp_df['涨跌幅'] = pd.to_numeric(temp_df['涨跌幅'])
temp_df['最新价'] = pd.to_numeric(temp_df['最新价'])
temp_df['成交额'] = pd.to_numeric(temp_df['成交额'])
temp_df['流通市值'] = pd.to_numeric(temp_df['流通市值'])
temp_df['总市值'] = pd.to_numeric(temp_df['总市值'])
temp_df['换手率'] = pd.to_numeric(temp_df['换手率'])
temp_df['封板资金'] = pd.to_numeric(temp_df['封板资金'])
temp_df['炸板次数'] = pd.to_numeric(temp_df['炸板次数'])
temp_df['连板数'] = pd.to_numeric(temp_df['连板数'])

return temp_df


Expand Down Expand Up @@ -444,7 +454,7 @@ def stock_zt_pool_dtgc_em(date: str = '20220425') -> pd.DataFrame:


if __name__ == '__main__':
stock_zt_pool_em_df = stock_zt_pool_em(date='20210104')
stock_zt_pool_em_df = stock_zt_pool_em(date='20220411')
print(stock_zt_pool_em_df)

stock_zt_pool_previous_em_df = stock_zt_pool_previous_em(date='20211224')
Expand All @@ -459,5 +469,5 @@ def stock_zt_pool_dtgc_em(date: str = '20220425') -> pd.DataFrame:
stock_zt_pool_zbgc_em_df = stock_zt_pool_zbgc_em(date='20211224')
print(stock_zt_pool_zbgc_em_df)

stock_zt_pool_dtgc_em_df = stock_zt_pool_dtgc_em(date='20220425')
stock_zt_pool_dtgc_em_df = stock_zt_pool_dtgc_em(date='20220426')
print(stock_zt_pool_dtgc_em_df)
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

## 更新说明

1.5.43 fix: fix stock_zt_pool_em interface

1. 修复 stock_zt_pool_em 接口,获取所有股票的数据

1.5.42 fix: fix stock_zt_pool_dtgc_em interface

1. 修复 stock_zt_pool_dtgc_em 接口,获取所有股票的数据
Expand Down Expand Up @@ -431,6 +435,8 @@

## 版本更新说明

1.5.43 fix: fix stock_zt_pool_em interface

1.5.42 fix: fix stock_zt_pool_dtgc_em interface

1.5.41 fix: fix stock_margin_underlying_info_szse interface
Expand Down
2 changes: 1 addition & 1 deletion docs/data/stock/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -15605,7 +15605,7 @@ print(stock_changes_em_df)
| 代码 | object | - |
| 名称 | object | - |
| 涨跌幅 | float64 | 注意单位: % |
| 最新价 | int64 | - |
| 最新价 | float64 | - |
| 成交额 | int64 | - |
| 流通市值 | float64 | - |
| 总市值 | float64 | - |
Expand Down

0 comments on commit 5738d0f

Please sign in to comment.