From b42afb9daebc5bde5118cefeb6a4a6ea1ab57d51 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sat, 24 Jul 2021 17:07:06 -0600 Subject: [PATCH 1/2] get_rate checks if side is buy for some console output --- freqtrade/exchange/exchange.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 91b278077..bd3282604 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1038,10 +1038,13 @@ class Exchange: ) raise PricingError from e - logger.info(f"{name} price from orderbook {conf_strategy['price_side'].capitalize()}" - f"side - top {order_book_top} order book {side} rate {rate:.8f}") + if side == "buy": + price_side = {conf_strategy['price_side'].capitalize()} + logger.info(f"{name} price from orderbook {price_side}" + f"side - top {order_book_top} order book {side} rate {rate:.8f}") else: - logger.info(f"Using Last {conf_strategy['price_side'].capitalize()} / Last Price") + if side == "buy": + logger.info(f"Using Last {conf_strategy['price_side'].capitalize()} / Last Price") ticker = self.fetch_ticker(pair) ticker_rate = ticker[conf_strategy['price_side']] if ticker['last']: From 05f74bdf5382dd362ac0cd6584ec17937ef9ba06 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 25 Jul 2021 16:13:04 -0600 Subject: [PATCH 2/2] Changed log ouput to debug in exchange.get_rate --- freqtrade/exchange/exchange.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index bd3282604..ed2ab0a61 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1037,14 +1037,11 @@ class Exchange: f"determined. Orderbook: {order_book}" ) raise PricingError from e - - if side == "buy": - price_side = {conf_strategy['price_side'].capitalize()} - logger.info(f"{name} price from orderbook {price_side}" - f"side - top {order_book_top} order book {side} rate {rate:.8f}") + price_side = {conf_strategy['price_side'].capitalize()} + logger.debug(f"{name} price from orderbook {price_side}" + f"side - top {order_book_top} order book {side} rate {rate:.8f}") else: - if side == "buy": - logger.info(f"Using Last {conf_strategy['price_side'].capitalize()} / Last Price") + logger.debug(f"Using Last {conf_strategy['price_side'].capitalize()} / Last Price") ticker = self.fetch_ticker(pair) ticker_rate = ticker[conf_strategy['price_side']] if ticker['last']: