From c915fd1e41f0f8f44f384d72807f355513f9aed7 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 14 Feb 2023 07:20:47 +0000 Subject: [PATCH] Improve get precision error messages --- core/trading/market.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/trading/market.py b/core/trading/market.py index 3b943e8..77cd3e5 100644 --- a/core/trading/market.py +++ b/core/trading/market.py @@ -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)