Remove rate for market orders

This commit is contained in:
Matthias
2018-11-17 20:09:05 +01:00
parent c11984d943
commit b3e08831f7
2 changed files with 22 additions and 2 deletions

View File

@@ -277,7 +277,7 @@ class Exchange(object):
try:
# Set the precision for amount and price(rate) as accepted by the exchange
amount = self.symbol_amount_prec(pair, amount)
rate = self.symbol_price_prec(pair, rate)
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
return self._api.create_order(pair, ordertype, 'buy', amount, rate)
except ccxt.InsufficientFunds as e:
@@ -314,7 +314,7 @@ class Exchange(object):
try:
# Set the precision for amount and price(rate) as accepted by the exchange
amount = self.symbol_amount_prec(pair, amount)
rate = self.symbol_price_prec(pair, rate)
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
return self._api.create_order(pair, ordertype, 'sell', amount, rate)
except ccxt.InsufficientFunds as e: