PoC: use defaults in json schema for some exchange options
This commit is contained in:
parent
91dc2b96fc
commit
4559a38172
@ -172,11 +172,11 @@ CONF_SCHEMA = {
|
|||||||
'exchange': {
|
'exchange': {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'properties': {
|
'properties': {
|
||||||
'name': {'type': 'string'},
|
'name': {'type': 'string', 'default': 'bittrex'},
|
||||||
'sandbox': {'type': 'boolean'},
|
'sandbox': {'type': 'boolean', 'default': False},
|
||||||
'key': {'type': 'string'},
|
'key': {'type': 'string', 'default': ''},
|
||||||
'secret': {'type': 'string'},
|
'secret': {'type': 'string', 'default': ''},
|
||||||
'password': {'type': 'string'},
|
'password': {'type': 'string', 'default': ''},
|
||||||
'uid': {'type': 'string'},
|
'uid': {'type': 'string'},
|
||||||
'pair_whitelist': {
|
'pair_whitelist': {
|
||||||
'type': 'array',
|
'type': 'array',
|
||||||
@ -199,7 +199,7 @@ CONF_SCHEMA = {
|
|||||||
'ccxt_config': {'type': 'object'},
|
'ccxt_config': {'type': 'object'},
|
||||||
'ccxt_async_config': {'type': 'object'}
|
'ccxt_async_config': {'type': 'object'}
|
||||||
},
|
},
|
||||||
'required': ['name', 'key', 'secret', 'pair_whitelist']
|
'required': ['pair_whitelist']
|
||||||
},
|
},
|
||||||
'edge': {
|
'edge': {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
|
@ -53,7 +53,7 @@ class FreqtradeBot(object):
|
|||||||
|
|
||||||
self.rpc: RPCManager = RPCManager(self)
|
self.rpc: RPCManager = RPCManager(self)
|
||||||
|
|
||||||
exchange_name = self.config.get('exchange', {}).get('name', 'bittrex').title()
|
exchange_name = self.config.get('exchange', {}).get('name').title()
|
||||||
self.exchange = ExchangeResolver(exchange_name, self.config).exchange
|
self.exchange = ExchangeResolver(exchange_name, self.config).exchange
|
||||||
|
|
||||||
self.wallets = Wallets(self.config, self.exchange)
|
self.wallets = Wallets(self.config, self.exchange)
|
||||||
|
@ -66,7 +66,7 @@ class Backtesting(object):
|
|||||||
self.config['dry_run'] = True
|
self.config['dry_run'] = True
|
||||||
self.strategylist: List[IStrategy] = []
|
self.strategylist: List[IStrategy] = []
|
||||||
|
|
||||||
exchange_name = self.config.get('exchange', {}).get('name', 'bittrex').title()
|
exchange_name = self.config.get('exchange', {}).get('name').title()
|
||||||
self.exchange = ExchangeResolver(exchange_name, self.config).exchange
|
self.exchange = ExchangeResolver(exchange_name, self.config).exchange
|
||||||
self.fee = self.exchange.get_fee()
|
self.fee = self.exchange.get_fee()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user