akshare 1.15.55__py3-none-any.whl → 1.15.56__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of akshare might be problematic. Click here for more details.
- akshare/__init__.py +2 -1
- akshare/futures/futures_news_shmet.py +2 -2
- akshare/index/index_spot.py +9 -5
- {akshare-1.15.55.dist-info → akshare-1.15.56.dist-info}/METADATA +1 -1
- {akshare-1.15.55.dist-info → akshare-1.15.56.dist-info}/RECORD +8 -8
- {akshare-1.15.55.dist-info → akshare-1.15.56.dist-info}/LICENSE +0 -0
- {akshare-1.15.55.dist-info → akshare-1.15.56.dist-info}/WHEEL +0 -0
- {akshare-1.15.55.dist-info → akshare-1.15.56.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2965,9 +2965,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2965
2965
|
1.15.53 fix: fix futures_inventory_99 interface
|
|
2966
2966
|
1.15.54 fix: fix stock_sy_profile_em interface
|
|
2967
2967
|
1.15.55 fix: fix fund_etf_spot_em interface
|
|
2968
|
+
1.15.56 fix: fix spot_goods interface
|
|
2968
2969
|
"""
|
|
2969
2970
|
|
|
2970
|
-
__version__ = "1.15.
|
|
2971
|
+
__version__ = "1.15.56"
|
|
2971
2972
|
__author__ = "AKFamily"
|
|
2972
2973
|
|
|
2973
2974
|
import sys
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- coding:utf-8 -*-
|
|
2
2
|
# !/usr/bin/env python
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/
|
|
4
|
+
Date: 2024/12/26 18:00
|
|
5
5
|
Desc: 上海金属网-快讯
|
|
6
6
|
https://www.shmet.com/newsFlash/newsFlash.html?searchKeyword=
|
|
7
7
|
"""
|
|
@@ -38,7 +38,7 @@ def futures_news_shmet(symbol: str = "全部") -> pd.DataFrame:
|
|
|
38
38
|
}
|
|
39
39
|
payload = {
|
|
40
40
|
"currentPage": 1,
|
|
41
|
-
"pageSize":
|
|
41
|
+
"pageSize": 2000,
|
|
42
42
|
"content": "",
|
|
43
43
|
"flashTag": symbol_map[symbol],
|
|
44
44
|
}
|
akshare/index/index_spot.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/12/26 18:30
|
|
5
5
|
Desc: 商品现货价格指数
|
|
6
|
-
|
|
6
|
+
https://finance.sina.com.cn/futuremarket/spotprice.shtml#titlePos_0
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
import pandas as pd
|
|
9
10
|
import requests
|
|
10
11
|
|
|
@@ -12,13 +13,13 @@ import requests
|
|
|
12
13
|
def spot_goods(symbol: str = "波罗的海干散货指数") -> pd.DataFrame:
|
|
13
14
|
"""
|
|
14
15
|
新浪财经-商品现货价格指数
|
|
15
|
-
|
|
16
|
+
https://finance.sina.com.cn/futuremarket/spotprice.shtml#titlePos_0
|
|
16
17
|
:param symbol: choice of {"波罗的海干散货指数", "钢坯价格指数", "澳大利亚粉矿价格"}
|
|
17
18
|
:type symbol: str
|
|
18
19
|
:return: 商品现货价格指数
|
|
19
20
|
:rtype: pandas.DataFrame
|
|
20
21
|
"""
|
|
21
|
-
url = "
|
|
22
|
+
url = "https://stock.finance.sina.com.cn/futures/api/openapi.php/GoodsIndexService.get_goods_index"
|
|
22
23
|
symbol_url_dict = {
|
|
23
24
|
"波罗的海干散货指数": "BDI",
|
|
24
25
|
"钢坯价格指数": "GP",
|
|
@@ -31,10 +32,13 @@ def spot_goods(symbol: str = "波罗的海干散货指数") -> pd.DataFrame:
|
|
|
31
32
|
temp_df = pd.DataFrame(data_json["result"]["data"]["data"])
|
|
32
33
|
temp_df = temp_df[["opendate", "price", "zde", "zdf"]]
|
|
33
34
|
temp_df.columns = ["日期", "指数", "涨跌额", "涨跌幅"]
|
|
34
|
-
temp_df["日期"] = pd.to_datetime(
|
|
35
|
+
temp_df["日期"] = pd.to_datetime(
|
|
36
|
+
temp_df["日期"], format="%Y-%m-%d", errors="coerce"
|
|
37
|
+
).dt.date
|
|
35
38
|
temp_df["指数"] = pd.to_numeric(temp_df["指数"], errors="coerce")
|
|
36
39
|
temp_df["涨跌额"] = pd.to_numeric(temp_df["涨跌额"], errors="coerce")
|
|
37
40
|
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
|
|
41
|
+
temp_df.dropna(inplace=True, ignore_index=True)
|
|
38
42
|
return temp_df
|
|
39
43
|
|
|
40
44
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=uXtocNkDrGZAXqxbdw_gjynzUrSujwkM7P9i7QyhEiA,184713
|
|
2
2
|
akshare/datasets.py,sha256=-qdwaQjgBlftX84uM74KJqCYJYkQ50PV416_neA4uls,995
|
|
3
3
|
akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
|
|
4
4
|
akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
|
|
@@ -117,7 +117,7 @@ akshare/futures/futures_index_ccidx.py,sha256=Ni5GICleqcHrmLatOE_Bs4i1DS3bn0lEm_
|
|
|
117
117
|
akshare/futures/futures_inventory_99.py,sha256=xdX8GSCEcRWYnbw0XS22rcblXOvlzUvfUltv7oyRh3Y,2990
|
|
118
118
|
akshare/futures/futures_inventory_em.py,sha256=C5nt4F51WB-oc8o3GrMvEGo0SO2mIq_H1vHVl42vzT0,2340
|
|
119
119
|
akshare/futures/futures_news_baidu.py,sha256=uqXUgQa7_aNjj1g4IBt6Ic4DhlsuBvjEEYC3OTPeqmA,1544
|
|
120
|
-
akshare/futures/futures_news_shmet.py,sha256=
|
|
120
|
+
akshare/futures/futures_news_shmet.py,sha256=1epZ3MwDc-T2n1ie4SSDfvUaBiMpSL0Q_xb2VoZ_llU,2465
|
|
121
121
|
akshare/futures/futures_roll_yield.py,sha256=RiwN0yYwzYy8zGhmTopBwJ37aUQ7Llwh3eQRzn0apaE,6135
|
|
122
122
|
akshare/futures/futures_rule.py,sha256=38fJnUTohGqbwE65ZR1id7Oy-0DS-ODrGYsmx2jtGZ8,1571
|
|
123
123
|
akshare/futures/futures_settlement_price_sgx.py,sha256=R0PZOEkdYDf7H242iHYz70rxdvsMWoAL60bmGlj-0GY,2428
|
|
@@ -162,7 +162,7 @@ akshare/index/index_kq_ss.py,sha256=m4hAMNnzHk8JNAnKjkYYVeyG4zUC5zR5i0-u-OxmaGU,
|
|
|
162
162
|
akshare/index/index_option_qvix.py,sha256=sCx0iiIetkp5ELE9sDwesVFgJNfa_1tAEWVCJI-I2u4,3270
|
|
163
163
|
akshare/index/index_research_fund_sw.py,sha256=kVYjBl3vZg6CyYBCrxZiSv8taHMnqmG7PQ-LVmMNd3I,4603
|
|
164
164
|
akshare/index/index_research_sw.py,sha256=Mm1YtiP-PXhDysJwmFidX3RZSZZ92AyXpjl_tVrjdwA,21758
|
|
165
|
-
akshare/index/index_spot.py,sha256=
|
|
165
|
+
akshare/index/index_spot.py,sha256=meTBTCp2DPVTX_N3qpCLtkI-0q3XhrJ3gndNugRBGKg,1767
|
|
166
166
|
akshare/index/index_stock_hk.py,sha256=nPFzRrjyiUpRK-OSDsdi5AFCKHNKqOVji6WJcQxOvNo,9781
|
|
167
167
|
akshare/index/index_stock_us_sina.py,sha256=IxOk4G49oasv7EfEQenL9-GLuelyUus6c4JPyRlaOzY,1551
|
|
168
168
|
akshare/index/index_stock_zh.py,sha256=A-tfbz6KHTLmBJimSzvaINrdmkWJ8V-mUkjcy7ly258,17669
|
|
@@ -378,8 +378,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
|
378
378
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
379
379
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
380
380
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
|
381
|
-
akshare-1.15.
|
|
382
|
-
akshare-1.15.
|
|
383
|
-
akshare-1.15.
|
|
384
|
-
akshare-1.15.
|
|
385
|
-
akshare-1.15.
|
|
381
|
+
akshare-1.15.56.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
382
|
+
akshare-1.15.56.dist-info/METADATA,sha256=PerUCjVkWjZ1nlin32R9cpQaSbVi78WhcrhnGNXpteU,13423
|
|
383
|
+
akshare-1.15.56.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
384
|
+
akshare-1.15.56.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
385
|
+
akshare-1.15.56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|