Improve get precision error messages
This commit is contained in:
parent
507708574c
commit
c915fd1e41
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue