Skip to content

Commit

Permalink
Date (#4200)
Browse files Browse the repository at this point in the history
* add version

* fix index_fear_greed_funddb

* remove stock_fear_greed_funddb

* add index_fear_greed_funddb
  • Loading branch information
albertandking authored Oct 18, 2023
1 parent 66d0b7a commit 7e04b37
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 59 deletions.
5 changes: 3 additions & 2 deletions akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2550,9 +2550,10 @@
1.11.34 add: add stock_board_concept_graph_ths interface
1.11.35 fix: fix stock_board_concept_hist_ths interface
1.11.36 add: add stock_fear_greed_funddb interface
1.11.37 fix: fix index_fear_greed_funddb interface
"""

__version__ = "1.11.36"
__version__ = "1.11.37"
__author__ = "AKFamily"

import sys
Expand All @@ -2570,7 +2571,7 @@
"""
funddb-工具-估值情绪-恐贪指数
"""
from akshare.stock.stock_fear_greed_funddb import stock_fear_greed_funddb
from akshare.index.index_fear_greed_funddb import index_fear_greed_funddb

"""
东财财富-分时数据
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str:
return file_data


def stock_fear_greed_funddb(symbol: str = "上证指数") -> pd.DataFrame:
def index_fear_greed_funddb(symbol: str = "上证指数") -> pd.DataFrame:
"""
funddb-工具-估值情绪-恐惧贪婪指数
https://funddb.cn/tool/fear
Expand Down Expand Up @@ -67,5 +67,5 @@ def stock_fear_greed_funddb(symbol: str = "上证指数") -> pd.DataFrame:


if __name__ == "__main__":
stock_fear_greed_funddb_df = stock_fear_greed_funddb(symbol="上证指数")
print(stock_fear_greed_funddb_df)
index_fear_greed_funddb_df = index_fear_greed_funddb(symbol="上证指数")
print(index_fear_greed_funddb_df)
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@

## 更新说明详情

1.11.37 fix: fix index_fear_greed_funddb interface

1. 重命名 stock_fear_greed_funddb 为 index_fear_greed_funddb 接口

1.11.36 add: add stock_fear_greed_funddb interface

1. 新增 stock_fear_greed_funddb 接口
Expand Down Expand Up @@ -2976,6 +2980,8 @@

## 版本更新说明

1.11.37 fix: fix index_fear_greed_funddb interface

1.11.36 add: add stock_fear_greed_funddb interface

1.11.35 fix: fix stock_board_concept_hist_ths interface
Expand Down
53 changes: 53 additions & 0 deletions docs/data/index/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4291,6 +4291,59 @@ print(index_value_hist_funddb_df)
[3274 rows x 7 columns]
```

#### 估值情绪

##### 恐惧贪婪指数

接口: index_fear_greed_funddb

目标地址: https://funddb.cn/tool/fear

描述: funddb-工具-估值情绪-恐惧贪婪指数

限量: 单次返回所有数据

输入参数

| 名称 | 类型 | 描述 |
|--------|-----|--------------------------------------------|
| symbol | str | symbol="上证指数"; choice of {"上证指数", "沪深300"} |

输出参数

| 名称 | 类型 | 描述 |
|-------|---------|---------|
| date | object | - |
| fear | float64 | - |
| index | float64 | float64 |

接口示例

```python
import akshare as ak

index_fear_greed_funddb_df = ak.index_fear_greed_funddb(symbol="上证指数")
print(index_fear_greed_funddb_df)
```

数据示例

```
date fear index
0 2021-10-18 30.8896 3568.14
1 2021-10-19 40.1977 3593.15
2 2021-10-20 41.5157 3587.00
3 2021-10-21 53.8715 3594.78
4 2021-10-22 58.4843 3582.60
.. ... ... ...
482 2023-10-12 39.8682 3107.90
483 2023-10-13 46.0461 3088.10
484 2023-10-16 40.3624 3073.81
485 2023-10-17 31.8781 3083.50
486 2023-10-18 30.0659 3058.71
[487 rows x 3 columns]
```

### 申万宏源研究

#### 申万指数实时行情
Expand Down
53 changes: 0 additions & 53 deletions docs/data/stock/stock.md
Original file line number Diff line number Diff line change
Expand Up @@ -21981,56 +21981,3 @@ print(stock_esg_hz_sina_df)
5163 2023-04-30 000038.SZ cn *ST大通 56.95 ... CC 65.05 CCC 49.79 C
[5164 rows x 12 columns]
```

### 估值情绪

#### 恐惧贪婪指数

接口: stock_fear_greed_funddb

目标地址: https://funddb.cn/tool/fear

描述: funddb-工具-估值情绪-恐惧贪婪指数

限量: 单次返回所有数据

输入参数

| 名称 | 类型 | 描述 |
|--------|-----|--------------------------------------------|
| symbol | str | symbol="上证指数"; choice of {"上证指数", "沪深300"} |

输出参数

| 名称 | 类型 | 描述 |
|-------|---------|---------|
| date | object | - |
| fear | float64 | - |
| index | float64 | float64 |

接口示例

```python
import akshare as ak

stock_fear_greed_funddb_df = ak.stock_fear_greed_funddb(symbol="上证指数")
print(stock_fear_greed_funddb_df)
```

数据示例

```
date fear index
0 2021-10-18 30.8896 3568.14
1 2021-10-19 40.1977 3593.15
2 2021-10-20 41.5157 3587.00
3 2021-10-21 53.8715 3594.78
4 2021-10-22 58.4843 3582.60
.. ... ... ...
482 2023-10-12 39.8682 3107.90
483 2023-10-13 46.0461 3088.10
484 2023-10-16 40.3624 3073.81
485 2023-10-17 31.8781 3083.50
486 2023-10-18 30.0659 3058.71
[487 rows x 3 columns]
```
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@
# 同花顺-板块-概念板块-概念图谱
"stock_board_concept_graph_ths" # 同花顺-板块-概念板块-概念图谱
# 恐惧贪婪指数
"stock_fear_greed_funddb" # 恐惧贪婪指数
"index_fear_greed_funddb" # 恐惧贪婪指数
```

## 案例演示
Expand Down

0 comments on commit 7e04b37

Please sign in to comment.