mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: returned object
This commit is contained in:
@@ -619,4 +619,5 @@ class Health(BaseModel):
|
||||
bot_startup_ts: int | None = None
|
||||
|
||||
class ListCustomData(BaseModel):
|
||||
custom_data: list[dict[str, Any]] | None = None
|
||||
trade_id: int
|
||||
custom_data: list[dict[str, Any]]
|
||||
|
||||
@@ -535,7 +535,7 @@ def sysinfo():
|
||||
def health(rpc: RPC = Depends(get_rpc)):
|
||||
return rpc.health()
|
||||
|
||||
@router.get("/trades/{tradeid}/custom_data", response_model=ListCustomData, tags=["info"])
|
||||
@router.get("/trades/{tradeid}/custom-data", response_model=list[ListCustomData], tags=["info"])
|
||||
def list_custom_data(trade_id: int, rpc: RPC = Depends(get_rpc)):
|
||||
custom_data = rpc._rpc_list_custom_data(trade_id)
|
||||
return ListCustomData(custom_data=custom_data)
|
||||
return custom_data
|
||||
|
||||
Reference in New Issue
Block a user