update
This commit is contained in:
parent
e148797850
commit
59efc06b99
@ -23,6 +23,17 @@ class AStockAPI:
|
||||
return []
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_mine_clearance_tdx(stock_code: str) -> pd.DataFrame:
|
||||
"""
|
||||
获取股票扫雷避险信息
|
||||
"""
|
||||
try:
|
||||
return adata.sentiment.mine.mine_clearance_tdx(stock_code=stock_code)
|
||||
except Exception as e:
|
||||
print(f"获取情绪数据失败: {str(e)}")
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def get_concept_east(stock_code: str) -> pd.DataFrame:
|
||||
"""
|
||||
|
||||
@ -70,6 +70,11 @@ async def get_stock_data(stock_code: str):
|
||||
flow_data = api.get_capital_flow(stock_code, start_date, end_date)
|
||||
result["flow_data"] = json.loads(flow_data.to_json(orient="records"))
|
||||
|
||||
# 获取扫雷避险数据
|
||||
mine_clearance = api.get_mine_clearance_tdx(stock_code)
|
||||
result["mine_clearance"] = json.loads(mine_clearance.to_json(orient="records"))
|
||||
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"获取股票数据失败: {e}")
|
||||
return {}
|
||||
|
||||
@ -29,7 +29,7 @@ services:
|
||||
cryptoai-api:
|
||||
build: .
|
||||
container_name: cryptoai-api
|
||||
image: cryptoai-api:0.0.22
|
||||
image: cryptoai-api:0.0.23
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user