Merge remote-tracking branch 'origin/gdax_enabled' into gdax_enabled
# Conflicts: # freqtrade/exchange/__init__.py
This commit is contained in:
commit
894181bf37
@ -96,7 +96,9 @@ class Exchange(object):
|
||||
except (KeyError, AttributeError):
|
||||
raise OperationalException(f'Exchange {name} is not supported')
|
||||
|
||||
self.set_sandbox(api, exchange_config, name)
|
||||
# check if config requests sandbox, if so use ['test'] from url
|
||||
if (exchange_config.get('sandbox')):
|
||||
api.urls['api'] = api.urls['test']
|
||||
|
||||
return api
|
||||
|
||||
@ -110,16 +112,6 @@ class Exchange(object):
|
||||
"""exchange ccxt id"""
|
||||
return self._api.id
|
||||
|
||||
def set_sandbox(self, api, exchange_config: dict, name: str):
|
||||
if exchange_config.get('sandbox'):
|
||||
if api.urls.get('test'):
|
||||
api.urls['api'] = api.urls['test']
|
||||
logger.info("Enabled Sandbox API on %s", name)
|
||||
else:
|
||||
logger.warning(self, "No Sandbox URL in CCXT, exiting. "
|
||||
"Please check your config.json")
|
||||
raise OperationalException(f'Exchange {name} does not provide a sandbox api')
|
||||
|
||||
def validate_pairs(self, pairs: List[str]) -> None:
|
||||
"""
|
||||
Checks if all given pairs are tradable on the current exchange.
|
||||
|
Loading…
Reference in New Issue
Block a user