Skip to content

Commit

Permalink
Merge pull request #50 from 1nchaos/dev
Browse files Browse the repository at this point in the history
version 1.2.3
  • Loading branch information
1nchaos authored Dec 29, 2023
2 parents 49a7b62 + fbfd05e commit 55d2793
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ master

专注股票量化数据,为Ai(爱)发电,向阳而生。

1.2.3 (2023-12-29)
------------------
1. 修复:修复指数行情接口bug。

1.2.2 (2023-12-26)
------------------
1. 更新:更新2024年交易日码表缓存文件。突发公告,除夕停止交易。
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ print(res_df)

> 对于项目有支持,包括但不仅限:内容贡献,bug提交,思想交流等等,对项目有影响的个人和机构
| Simon | [bigbigbigfish](https://github.com/bigbigbigfish) | [LuneZ99](https://github.com/LuneZ99) | 匿名用户 | thue | [Triones009](https://github.com/Triones009) | [lzd-1230](https://github.com/lzd-1230) | [hanxuanliang](https://github.com/hanxuanliang) |
| ----- | ------------------------------------------------- | ------------------------------------- | -------- | ---- | ------------------------------------------- | --------------------------------------- | ----------------------------------------------- |
| Simon | [bigbigbigfish](https://github.com/bigbigbigfish) | [LuneZ99](https://github.com/LuneZ99) | 匿名用户 | thue | [Triones009](https://github.com/Triones009) |
| --------------------------------------------- | ------------------------------------------------- | ------------------------------------- | -------- | ---- | ------------------------------------------- |
| [LeslieWuboy](https://github.com/LeslieWuboy) | | | | | |

----------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion adata/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

VERSION = (1, 2, 2)
VERSION = (1, 2, 3)
PRERELEASE = None # alpha, beta or rc
REVISION = None

Expand Down
2 changes: 1 addition & 1 deletion adata/stock/market/index_market/market_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ def get_market_index_current(self, index_code: str = '000001'):


if __name__ == '__main__':
print(StockMarketIndex().get_market_index(index_code='000001', start_date='2022-12-01'))
print(StockMarketIndex().get_market_index(index_code='000001', start_date='2022-12-01', k_type=1))
print(StockMarketIndex().get_market_index_min(index_code='000001'))
print(StockMarketIndex().get_market_index_current(index_code='000001'))
8 changes: 4 additions & 4 deletions adata/stock/market/index_market/market_index_east.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def get_market_index(self, index_code: str = '000001', start_date='2020-01-01',
:param k_type: k线类型:1.日;2.周;3.月 默认:1 日k
:return: k线行情数据 [日期,开,高,低,收,成交量,成交额]
"""
url = f"http://77.push2his.eastmoney.com/api/qt/stock/kline/get?" \
url = f"https://push2his.eastmoney.com/api/qt/stock/kline/get?" \
f"secid=1.{index_code}&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&" \
f"klt=10{k_type}&fqt=1&beg=0&end=20500101&smplmt=1247.73&lmt=1000000"
f"klt=10{k_type}&fqt=1&end=20500101&lmt=1000000"
res_json = requests.request('get', url, headers={}, proxies={}).json()
# 解析数据
code = res_json['data']['code']
Expand Down Expand Up @@ -126,6 +126,6 @@ def get_market_index_current(self, index_code: str = '000001'):


if __name__ == '__main__':
# print(StockMarketIndexEast().get_market_index(index_code='000001', start_date='2022-12-01'))
print(StockMarketIndexEast().get_market_index(index_code='000001', start_date='2022-12-01'))
print(StockMarketIndexEast().get_market_index_min(index_code='000001'))
# print(StockMarketIndexEast().get_market_index_current(index_code='000001'))
print(StockMarketIndexEast().get_market_index_current(index_code='000001'))

0 comments on commit 55d2793

Please sign in to comment.