Improve output for futures
This commit is contained in:
@@ -592,7 +592,7 @@ class RPC:
|
|||||||
if self._config.get('trading_mode', TradingMode.SPOT) != TradingMode.SPOT:
|
if self._config.get('trading_mode', TradingMode.SPOT) != TradingMode.SPOT:
|
||||||
# in Futures, "total" includes the locked stake, and therefore all positions
|
# in Futures, "total" includes the locked stake, and therefore all positions
|
||||||
est_stake = balance.free
|
est_stake = balance.free
|
||||||
est_bot_stake = est_stake
|
est_bot_stake = amount
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
|
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
|
||||||
@@ -665,6 +665,7 @@ class RPC:
|
|||||||
position: PositionWallet
|
position: PositionWallet
|
||||||
for symbol, position in self._freqtrade.wallets.get_all_positions().items():
|
for symbol, position in self._freqtrade.wallets.get_all_positions().items():
|
||||||
total += position.collateral
|
total += position.collateral
|
||||||
|
total_bot += position.collateral
|
||||||
|
|
||||||
currencies.append({
|
currencies.append({
|
||||||
'currency': symbol,
|
'currency': symbol,
|
||||||
@@ -673,6 +674,7 @@ class RPC:
|
|||||||
'used': 0,
|
'used': 0,
|
||||||
'position': position.position,
|
'position': position.position,
|
||||||
'est_stake': position.collateral,
|
'est_stake': position.collateral,
|
||||||
|
'est_stake_bot': position.collateral,
|
||||||
'stake': stake_currency,
|
'stake': stake_currency,
|
||||||
'leverage': position.leverage,
|
'leverage': position.leverage,
|
||||||
'side': position.side,
|
'side': position.side,
|
||||||
|
|||||||
@@ -928,7 +928,10 @@ class Telegram(RPCHandler):
|
|||||||
total_dust_currencies = 0
|
total_dust_currencies = 0
|
||||||
for curr in result['currencies']:
|
for curr in result['currencies']:
|
||||||
curr_output = ''
|
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']:
|
if curr['is_position']:
|
||||||
curr_output = (
|
curr_output = (
|
||||||
f"*{curr['currency']}:*\n"
|
f"*{curr['currency']}:*\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user