Improve get precision error messages

master
Mark Veidemanis 1 year ago
parent 507708574c
commit c915fd1e41
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -224,7 +224,7 @@ def get_price_bound(direction, strategy, price, current_price):
def get_precision(account, symbol):
instruments = account.instruments
if not instruments:
log.error("No instruments found")
log.error(f"No instruments found for {account}")
return
# Extract the information for the symbol
instrument = account.client.extract_instrument(instruments, symbol)
@ -239,7 +239,7 @@ def get_precision(account, symbol):
return (trade_precision, display_precision)
except KeyError:
# sendmsg(user, f"Precision not found for {symbol}", title="Error")
log.error(f"Precision not found for {symbol}")
log.error(f"Precision not found for {symbol} from {instrument}")
return (None, None)

Loading…
Cancel
Save