1
0
mirror of https://github.com/Rikj000/MoniGoMani.git synced 2022-03-06 00:08:05 +03:00

mgm-hurry setup - Allow for other exchanges

This commit is contained in:
Rik Helsen
2021-11-11 16:07:46 +01:00
parent dc00dc79e2
commit 3a497e1a48

View File

@@ -415,7 +415,7 @@ class MGMHurry:
'type': 'list',
'name': 'exchange',
'message': 'Which exchange do you want to use?',
'choices': ['binance', 'bittrex', 'bitvavo', 'ftx', 'gateio', 'kraken', 'kucoin'],
'choices': ['binance', 'bittrex', 'bitvavo', 'ftx', 'gateio', 'kraken', 'kucoin', 'other'],
'when': lambda result: result['proceed_exchange']
}, {
'type': 'password',
@@ -437,6 +437,17 @@ class MGMHurry:
if answers == {}:
sys.exit(1)
exchange = answers.get('exchange')
if exchange == 'other':
answer = prompt(questions=[{
'type': 'input',
'name': 'exchange',
'message': 'Please enter CCXT ID of the other exchange that you\'d like to try:\n'
'(WARNING: Support may vary on these!)',
'default': self.monigomani_config.get('exchange') or ''
}])
exchange = answer.get('exchange')
"""
if answers.get('install_type') == 'source':
ft_binary = f'source {self.basedir}/.env/bin/activate; freqtrade'
@@ -449,7 +460,7 @@ class MGMHurry:
'install_type': 'source', # answers.get('install_type'),
'ft_binary': f'source {self.basedir}/.env/bin/activate; freqtrade', # ft_binary,
'timerange': answers.get('timerange'),
'exchange': answers.get('exchange') or 'none',
'exchange': exchange or 'none',
'hyperopt': {
'strategy': answers.get('ho_strategy'),
'loss': answers.get('ho_loss'),
@@ -471,7 +482,7 @@ class MGMHurry:
if answers.get('proceed_exchange') is True:
self.monigomani_config.save_exchange_credentials({
'exchange': answers.get('exchange'),
'exchange': exchange,
'api_key': answers.get('api_key'),
'api_secret': answers.get('api_secret')
})