some visual happyness
This commit is contained in:
parent
910601ba1d
commit
d12cc39a5e
@ -275,7 +275,8 @@ class Exchange(object):
|
|||||||
price = ceil(big_price) / pow(10, symbol_prec)
|
price = ceil(big_price) / pow(10, symbol_prec)
|
||||||
return price
|
return price
|
||||||
|
|
||||||
def buy(self, pair: str, ordertype: str, amount: float, rate: float, time_in_force='gtc') -> Dict:
|
def buy(self, pair: str, ordertype: str, amount: float,
|
||||||
|
rate: float, time_in_force='gtc') -> Dict:
|
||||||
if self._conf['dry_run']:
|
if self._conf['dry_run']:
|
||||||
order_id = f'dry_run_buy_{randint(0, 10**6)}'
|
order_id = f'dry_run_buy_{randint(0, 10**6)}'
|
||||||
self._dry_run_open_orders[order_id] = {
|
self._dry_run_open_orders[order_id] = {
|
||||||
|
@ -451,7 +451,8 @@ class FreqtradeBot(object):
|
|||||||
|
|
||||||
# check if order is expired (in case of FOC or IOC orders)
|
# check if order is expired (in case of FOC or IOC orders)
|
||||||
# or rejected by the exchange.
|
# or rejected by the exchange.
|
||||||
if order_info.get('status', '') == 'EXPIRED' or order_info.get('status', '') == 'REJECTED':
|
order_status = order_info.get('status', '')
|
||||||
|
if order_status == 'EXPIRED' or order_status == 'REJECTED':
|
||||||
order_type = self.strategy.order_types['buy']
|
order_type = self.strategy.order_types['buy']
|
||||||
order_tif = self.strategy.order_time_in_force['buy']
|
order_tif = self.strategy.order_time_in_force['buy']
|
||||||
status = order_info['status']
|
status = order_info['status']
|
||||||
@ -459,7 +460,6 @@ class FreqtradeBot(object):
|
|||||||
order_tif, order_type, pair_s, status, self.exchange.name)
|
order_tif, order_type, pair_s, status, self.exchange.name)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
self.rpc.send_msg({
|
self.rpc.send_msg({
|
||||||
'type': RPCMessageType.BUY_NOTIFICATION,
|
'type': RPCMessageType.BUY_NOTIFICATION,
|
||||||
'exchange': self.exchange.name.capitalize(),
|
'exchange': self.exchange.name.capitalize(),
|
||||||
|
Loading…
Reference in New Issue
Block a user