mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-17 11:25:55 +08:00
BUG: fixed issue with low order amount after adjustment
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user