Added price "rate" to be trimmed to the precision the exchange supports

Also moved from round() to math.floor / ceil

amount will round down to exchange precision
price will round up to exchange precision
This commit is contained in:
creslinux 2018-07-29 13:30:34 +00:00
parent 894181bf37
commit 28159f2fca

View File

@ -96,10 +96,6 @@ class Exchange(object):
except (KeyError, AttributeError):
raise OperationalException(f'Exchange {name} is not supported')
# check if config requests sandbox, if so use ['test'] from url
if (exchange_config.get('sandbox')):
api.urls['api'] = api.urls['test']
return api
@property