Expose total_profit_ratio through API
This commit is contained in:
parent
c4a80e33ea
commit
d779d60812
@ -286,6 +286,7 @@ class OpenTradeSchema(TradeSchema):
|
|||||||
current_rate: float
|
current_rate: float
|
||||||
total_profit_abs: float
|
total_profit_abs: float
|
||||||
total_profit_fiat: Optional[float]
|
total_profit_fiat: Optional[float]
|
||||||
|
total_profit_ratio: Optional[float]
|
||||||
|
|
||||||
open_order: Optional[str]
|
open_order: Optional[str]
|
||||||
|
|
||||||
|
@ -42,7 +42,8 @@ logger = logging.getLogger(__name__)
|
|||||||
# 2.22: Add FreqAI to backtesting
|
# 2.22: Add FreqAI to backtesting
|
||||||
# 2.23: Allow plot config request in webserver mode
|
# 2.23: Allow plot config request in webserver mode
|
||||||
# 2.24: Add cancel_open_order endpoint
|
# 2.24: Add cancel_open_order endpoint
|
||||||
API_VERSION = 2.24
|
# 2.25: Add several profit values to /status endpoint
|
||||||
|
API_VERSION = 2.25
|
||||||
|
|
||||||
# Public API, requires no auth.
|
# Public API, requires no auth.
|
||||||
router_public = APIRouter()
|
router_public = APIRouter()
|
||||||
|
@ -1012,6 +1012,7 @@ def test_api_status(botclient, mocker, ticker, fee, markets, is_short,
|
|||||||
'profit_fiat': ANY,
|
'profit_fiat': ANY,
|
||||||
'total_profit_abs': ANY,
|
'total_profit_abs': ANY,
|
||||||
'total_profit_fiat': ANY,
|
'total_profit_fiat': ANY,
|
||||||
|
'total_profit_ratio': ANY,
|
||||||
'realized_profit': 0.0,
|
'realized_profit': 0.0,
|
||||||
'realized_profit_ratio': None,
|
'realized_profit_ratio': None,
|
||||||
'current_rate': current_rate,
|
'current_rate': current_rate,
|
||||||
|
Loading…
Reference in New Issue
Block a user