From 411173463799f7aac070cefad42080fe954d0d86 Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Mon, 14 Oct 2019 13:48:33 +0300 Subject: [PATCH] Add 'Is pair' in the list-markets tabular output --- freqtrade/utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/freqtrade/utils.py b/freqtrade/utils.py index 67a981461..6c36627f1 100644 --- a/freqtrade/utils.py +++ b/freqtrade/utils.py @@ -10,7 +10,8 @@ from freqtrade import OperationalException from freqtrade.configuration import Configuration, TimeRange from freqtrade.configuration.directory_operations import create_userdata_dir from freqtrade.data.history import refresh_backtest_ohlcv_data -from freqtrade.exchange import (available_exchanges, ccxt_exchanges, market_is_active) +from freqtrade.exchange import (available_exchanges, ccxt_exchanges, market_is_active, + market_is_pair) from freqtrade.misc import plural from freqtrade.resolvers import ExchangeResolver from freqtrade.state import RunMode @@ -157,10 +158,12 @@ def start_list_pairs(args: Dict[str, Any], pairs_only: bool = False) -> None: (f": {sorted(pairs.keys())}" if len(pairs) else "") + ".") else: # print data as a table + headers = ['Id', 'Symbol', 'Base', 'Quote', 'Active'] + if not pairs_only: + headers.append('Is pair') tabular_data = [] for _, v in pairs.items(): tabular_data.append([v['id'], v['symbol'], v['base'], v['quote'], - "Yes" if market_is_active(v) else "No"]) - - headers = ['Id', 'Symbol', 'Base', 'Quote', 'Active'] + "Yes" if market_is_active(v) else "No", + "Yes" if market_is_pair(v) else "No"]) print(tabulate(tabular_data, headers=headers, tablefmt='pipe'))