diff --git a/freqtrade/rpc/api_server/webserver.py b/freqtrade/rpc/api_server/webserver.py index 2413e5264..8030e303b 100644 --- a/freqtrade/rpc/api_server/webserver.py +++ b/freqtrade/rpc/api_server/webserver.py @@ -1,6 +1,6 @@ import logging from ipaddress import IPv4Address -from typing import Any, Optional +from typing import Any, Dict, Optional import orjson import uvicorn diff --git a/freqtrade/rpc/rpc_types.py b/freqtrade/rpc/rpc_types.py index 0fb5a6bfa..bde985548 100644 --- a/freqtrade/rpc/rpc_types.py +++ b/freqtrade/rpc/rpc_types.py @@ -27,12 +27,12 @@ class RPCProtectionMsg(RPCSendMsgBase): class RPCBuyMsg(RPCSendMsgBase): - trade_id: str - buy_tag: str - enter_tag: str + trade_id: int + buy_tag: Optional[str] + enter_tag: Optional[str] exchange: str pair: str - leverage: float + leverage: Optional[float] direction: str limit: float open_rate: float @@ -42,7 +42,7 @@ class RPCBuyMsg(RPCSendMsgBase): fiat_currency: Optional[str] amount: float open_date: datetime - current_rate: float + current_rate: Optional[float] sub_trade: bool @@ -56,10 +56,11 @@ class RPCSellMsg(RPCBuyMsg): close_rate: float profit_amount: float profit_ratio: float - sell_reason: str - exit_reason: str + sell_reason: Optional[str] + exit_reason: Optional[str] close_date: datetime - current_rate: Optional[float] + # current_rate: Optional[float] + order_rate: Optional[float] class RPCSellCancelMsg(RPCBuyMsg): @@ -67,8 +68,8 @@ class RPCSellCancelMsg(RPCBuyMsg): gain: str # Literal["profit", "loss"] profit_amount: float profit_ratio: float - sell_reason: str - exit_reason: str + sell_reason: Optional[str] + exit_reason: Optional[str] close_date: datetime