Skip to content

Commit 8bd4926

Browse files
committed
feat: add Min Stake to list-pairs command
1 parent a9195c8 commit 8bd4926

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

freqtrade/commands/list_commands.py

+12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from freqtrade.enums import RunMode
77
from freqtrade.exceptions import ConfigurationError, OperationalException
88
from freqtrade.ft_types import ValidExchangesType
9+
from freqtrade.misc import safe_value_fallback
910

1011

1112
logger = logging.getLogger(__name__)
@@ -246,6 +247,8 @@ def start_list_markets(args: dict[str, Any], pairs_only: bool = False) -> None:
246247
except Exception as e:
247248
raise OperationalException(f"Cannot get markets. Reason: {e}") from e
248249

250+
tickers = exchange.get_tickers()
251+
249252
summary_str = (
250253
(f"Exchange {exchange.name} has {len(pairs)} ")
251254
+ ("active " if active_only else "")
@@ -275,6 +278,7 @@ def start_list_markets(args: dict[str, Any], pairs_only: bool = False) -> None:
275278
"Margin",
276279
"Future",
277280
"Leverage",
281+
"Min Stake",
278282
]
279283

280284
tabular_data = [
@@ -288,6 +292,14 @@ def start_list_markets(args: dict[str, Any], pairs_only: bool = False) -> None:
288292
"Margin": "Margin" if exchange.market_is_margin(v) else "",
289293
"Future": "Future" if exchange.market_is_future(v) else "",
290294
"Leverage": exchange.get_max_leverage(v["symbol"], 20),
295+
"Min Stake": round(
296+
exchange.get_min_pair_stake_amount(
297+
v["symbol"],
298+
safe_value_fallback(tickers.get(v["symbol"], {}), "last", "ask", 0.0),
299+
0.0,
300+
),
301+
8,
302+
),
291303
}
292304
for _, v in pairs.items()
293305
]

0 commit comments

Comments
 (0)