1
This commit is contained in:
parent
f21c4039f7
commit
e3a4cd281a
@ -57,13 +57,15 @@ async def get_stock_base(stock_code: str):
|
||||
return result
|
||||
|
||||
@router.get("/stock/data", summary="获取股票数据")
|
||||
async def get_stock_data(stock_code: str):
|
||||
async def get_stock_data(stock_code: str, start_date: Optional[str] = None, end_date: Optional[str] = None):
|
||||
api = AStockAPI()
|
||||
|
||||
result = {}
|
||||
|
||||
try:
|
||||
if start_date is None:
|
||||
start_date = "2025-01-01"
|
||||
if end_date is None:
|
||||
end_date = datetime.now().strftime("%Y-%m-%d")
|
||||
|
||||
# 获取市场数据
|
||||
|
||||
@ -29,7 +29,7 @@ services:
|
||||
cryptoai-api:
|
||||
build: .
|
||||
container_name: cryptoai-api
|
||||
image: cryptoai-api:0.1.4
|
||||
image: cryptoai-api:0.1.5
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user