Include realized_profit in api output
This commit is contained in:
parent
75d1dd2793
commit
46b987042b
@ -244,6 +244,7 @@ class TradeSchema(BaseModel):
|
|||||||
profit_pct: Optional[float]
|
profit_pct: Optional[float]
|
||||||
profit_abs: Optional[float]
|
profit_abs: Optional[float]
|
||||||
profit_fiat: Optional[float]
|
profit_fiat: Optional[float]
|
||||||
|
realized_profit: float
|
||||||
exit_reason: Optional[str]
|
exit_reason: Optional[str]
|
||||||
exit_order_status: Optional[str]
|
exit_order_status: Optional[str]
|
||||||
stop_loss_abs: Optional[float]
|
stop_loss_abs: Optional[float]
|
||||||
|
@ -1015,6 +1015,7 @@ def test_api_status(botclient, mocker, ticker, fee, markets, is_short,
|
|||||||
'profit_pct': ANY,
|
'profit_pct': ANY,
|
||||||
'profit_abs': ANY,
|
'profit_abs': ANY,
|
||||||
'profit_fiat': ANY,
|
'profit_fiat': ANY,
|
||||||
|
'realized_profit': 0.0,
|
||||||
'current_rate': current_rate,
|
'current_rate': current_rate,
|
||||||
'open_date': ANY,
|
'open_date': ANY,
|
||||||
'open_timestamp': ANY,
|
'open_timestamp': ANY,
|
||||||
@ -1244,6 +1245,7 @@ def test_api_force_entry(botclient, mocker, fee, endpoint):
|
|||||||
'profit_pct': None,
|
'profit_pct': None,
|
||||||
'profit_abs': None,
|
'profit_abs': None,
|
||||||
'profit_fiat': None,
|
'profit_fiat': None,
|
||||||
|
'realized_profit': 0.0,
|
||||||
'fee_close': 0.0025,
|
'fee_close': 0.0025,
|
||||||
'fee_close_cost': None,
|
'fee_close_cost': None,
|
||||||
'fee_close_currency': None,
|
'fee_close_currency': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user