BUG: fixed issue with low order amount after adjustment

This commit is contained in:
Frederic Fortier
2018-01-12 16:46:57 -05:00
parent db1ad9aac8
commit b9150aab79
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ if __name__ == '__main__':
if live:
run_algorithm(
capital_base=0.1,
capital_base=0.01,
initialize=initialize,
handle_data=handle_data,
analyze=analyze,
@@ -257,7 +257,7 @@ if __name__ == '__main__':
algo_namespace=NAMESPACE,
base_currency='btc',
live_graph=False,
simulate_orders=True,
simulate_orders=False,
stats_output=None,
)
+6
View File
@@ -707,6 +707,12 @@ class CCXT(Exchange):
else:
adj_amount = abs(amount)
if adj_amount == 0:
raise CreateOrderError(
exchange=self.name,
e='order amount lower than the smallest lot: {}'.format(amount)
)
try:
result = self.api.create_order(
symbol=symbol,