new-config asks exchange before asking futures
This commit is contained in:
parent
51b368c8dc
commit
894c8f64f2
@ -103,33 +103,32 @@ def ask_user_config() -> Dict[str, Any]:
|
||||
"message": "Please insert your display Currency (for reporting):",
|
||||
"default": 'USD',
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "exchange_name",
|
||||
"message": "Select exchange",
|
||||
"choices": lambda x: [
|
||||
Separator("------ Spot and Perpetual Swaps/Futures -------"),
|
||||
"binance",
|
||||
"gateio",
|
||||
Separator("----------------- Spot Only -------------------"),
|
||||
"okex",
|
||||
"binanceus",
|
||||
"ftx",
|
||||
"bittrex",
|
||||
"kraken",
|
||||
"kucoin",
|
||||
Separator("-----------------------------------------------"),
|
||||
"other",
|
||||
],
|
||||
},
|
||||
{
|
||||
"type": "confirm",
|
||||
"name": "trading_mode",
|
||||
"message": "Do you want to trade Perpetual Swaps (perpetual futures)?",
|
||||
"default": False,
|
||||
"filter": lambda val: '"futures"' if val else '"spot"',
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"name": "exchange_name",
|
||||
"message": "Select exchange",
|
||||
"choices": lambda x: [
|
||||
"binance",
|
||||
"binanceus",
|
||||
"okex",
|
||||
"ftx",
|
||||
"gateio",
|
||||
"bittrex",
|
||||
"kraken",
|
||||
"kucoin",
|
||||
Separator(),
|
||||
"other",
|
||||
] if x['trading_mode'] == '"spot"' else [
|
||||
"binance",
|
||||
# "okex",
|
||||
"gateio",
|
||||
],
|
||||
"when": lambda x: x["exchange_name"] in ['binance', 'gateio'],
|
||||
},
|
||||
{
|
||||
"type": "autocomplete",
|
||||
|
Loading…
Reference in New Issue
Block a user