mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 13:21:15 +00:00
fix: formating
This commit is contained in:
@@ -638,6 +638,7 @@ class Health(BaseModel):
|
||||
bot_startup: datetime | None = None
|
||||
bot_startup_ts: int | None = None
|
||||
|
||||
|
||||
class ListCustomData(BaseModel):
|
||||
trade_id: int
|
||||
custom_data: list[dict[str, Any]]
|
||||
|
||||
@@ -510,6 +510,7 @@ def sysinfo():
|
||||
def health(rpc: RPC = Depends(get_rpc)):
|
||||
return rpc.health()
|
||||
|
||||
|
||||
@router.get("/trades/open/custom-data", response_model=list[ListCustomData], tags=["info"])
|
||||
def list_open_trades_custom_data(rpc: RPC = Depends(get_rpc)):
|
||||
"""
|
||||
@@ -517,6 +518,7 @@ def list_open_trades_custom_data(rpc: RPC = Depends(get_rpc)):
|
||||
"""
|
||||
return rpc._rpc_list_custom_data()
|
||||
|
||||
|
||||
@router.get("/trades/{trade_id}/custom-data", response_model=list[ListCustomData], tags=["info"])
|
||||
def list_custom_data(trade_id: int, rpc: RPC = Depends(get_rpc)):
|
||||
"""
|
||||
|
||||
@@ -1117,7 +1117,8 @@ class RPC:
|
||||
}
|
||||
|
||||
def _rpc_list_custom_data(
|
||||
self, trade_id: int | None = None, key: str | None = None) -> list[dict[str, Any]]:
|
||||
self, trade_id: int | None = None, key: str | None = None
|
||||
) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Fetch custom data for a specific trade, or all open trades if `trade_id` is not provided.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user