Improve output for futures

This commit is contained in:
Matthias
2023-04-24 12:03:00 +02:00
parent 94a6bc608c
commit 68a8c79c08
2 changed files with 7 additions and 2 deletions

View File

@@ -592,7 +592,7 @@ class RPC:
if self._config.get('trading_mode', TradingMode.SPOT) != TradingMode.SPOT:
# in Futures, "total" includes the locked stake, and therefore all positions
est_stake = balance.free
est_bot_stake = est_stake
est_bot_stake = amount
else:
try:
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
@@ -665,6 +665,7 @@ class RPC:
position: PositionWallet
for symbol, position in self._freqtrade.wallets.get_all_positions().items():
total += position.collateral
total_bot += position.collateral
currencies.append({
'currency': symbol,
@@ -673,6 +674,7 @@ class RPC:
'used': 0,
'position': position.position,
'est_stake': position.collateral,
'est_stake_bot': position.collateral,
'stake': stake_currency,
'leverage': position.leverage,
'side': position.side,

View File

@@ -928,7 +928,10 @@ class Telegram(RPCHandler):
total_dust_currencies = 0
for curr in result['currencies']:
curr_output = ''
if curr['est_stake'] > balance_dust_level and (full_result or curr['is_bot_managed']):
if (
(curr['is_position'] or curr['est_stake'] > balance_dust_level)
and (full_result or curr['is_bot_managed'])
):
if curr['is_position']:
curr_output = (
f"*{curr['currency']}:*\n"