Check if Price is needed for market orders
This is currently the case for: cex, coinex, cointiger, fcoin, fcoinjp, hadax, huobipro, huobiru, uex,
This commit is contained in:
parent
7e2be96516
commit
9887cb997e
@ -387,7 +387,9 @@ 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) if ordertype != 'market' else None
|
||||
needs_price = (ordertype != 'market'
|
||||
or self._api.options.get("createMarketBuyOrderRequiresPrice", False))
|
||||
rate = self.symbol_price_prec(pair, rate) if needs_price else None
|
||||
|
||||
return self._api.create_order(pair, ordertype, side,
|
||||
amount, rate, params)
|
||||
|
Loading…
Reference in New Issue
Block a user