Improve get precision error messages

This commit is contained in:
Mark Veidemanis 2023-02-14 07:20:47 +00:00
parent 507708574c
commit c915fd1e41
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 2 deletions

View File

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