build_config_commands sorted exchanges

This commit is contained in:
Sam Germain 2022-02-02 01:42:56 -06:00
parent 60db1b1c0c
commit 0117c1de83

View File

@ -108,16 +108,14 @@ def ask_user_config() -> Dict[str, Any]:
"name": "exchange_name", "name": "exchange_name",
"message": "Select exchange", "message": "Select exchange",
"choices": lambda x: [ "choices": lambda x: [
Separator("------ Spot and Perpetual Swaps/Futures -------"),
"binance", "binance",
"gateio",
Separator("----------------- Spot Only -------------------"),
"okex",
"binanceus", "binanceus",
"ftx",
"bittrex", "bittrex",
"ftx",
"gateio",
"kraken", "kraken",
"kucoin", "kucoin",
"okex",
Separator("-----------------------------------------------"), Separator("-----------------------------------------------"),
"other", "other",
], ],
@ -206,9 +204,9 @@ def ask_user_config() -> Dict[str, Any]:
if not answers: if not answers:
# Interrupted questionary sessions return an empty dict. # Interrupted questionary sessions return an empty dict.
raise OperationalException("User interrupted interactive questions.") raise OperationalException("User interrupted interactive questions.")
answers["margin_mode"] = ( answers['margin_mode'] = (
'isolated' 'isolated'
if answers.get("trading_mode") == 'futures' if answers.get('trading_mode') == 'futures'
else '' else ''
) )
# Force JWT token to be a random string # Force JWT token to be a random string