Send the user a more detailed precision error message

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

View File

@ -238,7 +238,11 @@ def get_precision(account, symbol):
display_precision = instrument["displayPrecision"] display_precision = instrument["displayPrecision"]
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(
account.user,
f"Precision not found for {symbol} from {instrument}",
title="Error",
)
log.error(f"Precision not found for {symbol} from {instrument}") log.error(f"Precision not found for {symbol} from {instrument}")
return (None, None) return (None, None)