Add max_drawdown_start and end to /profit API endpoints

This commit is contained in:
Matthias 2023-09-04 18:27:45 +02:00
parent 7bf20d9060
commit e854667eb8
2 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,10 @@ class Profit(BaseModel):
expectancy_ratio: float expectancy_ratio: float
max_drawdown: float max_drawdown: float
max_drawdown_abs: float max_drawdown_abs: float
max_drawdown_start: str
max_drawdown_start_timestamp: int
max_drawdown_end: str
max_drawdown_end_timestamp: int
trading_volume: Optional[float] = None trading_volume: Optional[float] = None
bot_start_timestamp: int bot_start_timestamp: int
bot_start_date: str bot_start_date: str

View File

@ -977,6 +977,10 @@ def test_api_profit(botclient, mocker, ticker, fee, markets, is_short, expected)
'expectancy_ratio': expected['expectancy_ratio'], 'expectancy_ratio': expected['expectancy_ratio'],
'max_drawdown': ANY, 'max_drawdown': ANY,
'max_drawdown_abs': ANY, 'max_drawdown_abs': ANY,
'max_drawdown_start': ANY,
'max_drawdown_start_timestamp': ANY,
'max_drawdown_end': ANY,
'max_drawdown_end_timestamp': ANY,
'trading_volume': expected['trading_volume'], 'trading_volume': expected['trading_volume'],
'bot_start_timestamp': 0, 'bot_start_timestamp': 0,
'bot_start_date': '', 'bot_start_date': '',