mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fixes: ruff
This commit is contained in:
@@ -518,7 +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)):
|
||||
def list_custom_data(trade_id: int, rpc: RPC = Depends(get_rpc)):
|
||||
"""
|
||||
Fetch custom data for a specific trade.
|
||||
"""
|
||||
|
||||
@@ -1132,7 +1132,7 @@ class RPC:
|
||||
# Collect custom data
|
||||
custom_data = []
|
||||
if key:
|
||||
data = trade.get_custom_data(key=key)
|
||||
data = trades.get_custom_data(key=key)
|
||||
if data:
|
||||
custom_data = [data]
|
||||
else:
|
||||
|
||||
@@ -496,5 +496,5 @@ class FtRestClient:
|
||||
trade_id = -1
|
||||
if trade_id is not None:
|
||||
params["trade_id"] = trade_id
|
||||
|
||||
|
||||
return self._get("trades/{tradeid}/custom_data", params=params)
|
||||
|
||||
Reference in New Issue
Block a user