diff --git a/freqtrade/rpc/api_server/api_schemas.py b/freqtrade/rpc/api_server/api_schemas.py index fb0b9299c..97f6251bc 100644 --- a/freqtrade/rpc/api_server/api_schemas.py +++ b/freqtrade/rpc/api_server/api_schemas.py @@ -308,6 +308,7 @@ class TradeSchema(BaseModel): min_rate: Optional[float] = None max_rate: Optional[float] = None + has_open_orders: bool orders: List[OrderSchema] leverage: Optional[float] = None @@ -331,7 +332,6 @@ class OpenTradeSchema(TradeSchema): total_profit_abs: float total_profit_fiat: Optional[float] = None total_profit_ratio: Optional[float] = None - has_open_orders: bool class TradeResponse(BaseModel): diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 97f880077..89cb47830 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -1364,6 +1364,7 @@ def test_api_force_entry(botclient, mocker, fee, endpoint): 'amount_precision': None, 'price_precision': None, 'precision_mode': None, + 'has_open_orders': False, 'orders': [], }