From 775305e9c47809922347c71824a91f3ddb5f70cc Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 1 Apr 2022 08:57:58 +0200 Subject: [PATCH] Use correct candleconfig in plot endpoint --- freqtrade/plot/plotting.py | 2 +- freqtrade/rpc/rpc.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index c8d32be9d..5ef955354 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -11,7 +11,7 @@ from freqtrade.data.btanalysis import (analyze_trade_parallelism, calculate_max_ from freqtrade.data.converter import trim_dataframe from freqtrade.data.dataprovider import DataProvider from freqtrade.data.history import get_timerange, load_data -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import CandleType from freqtrade.exceptions import OperationalException from freqtrade.exchange import timeframe_to_prev_date, timeframe_to_seconds from freqtrade.misc import pair_to_filename diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 94bc513fb..1388a9bda 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -18,7 +18,8 @@ from freqtrade import __version__ from freqtrade.configuration.timerange import TimeRange from freqtrade.constants import CANCEL_REASON, DATETIME_PRINT_FORMAT from freqtrade.data.history import load_data -from freqtrade.enums import ExitCheckTuple, ExitType, SignalDirection, State, TradingMode +from freqtrade.enums import (CandleType, ExitCheckTuple, ExitType, SignalDirection, State, + TradingMode) from freqtrade.exceptions import ExchangeError, PricingError from freqtrade.exchange import timeframe_to_minutes, timeframe_to_msecs from freqtrade.loggers import bufferHandler @@ -1057,6 +1058,7 @@ class RPC: timeframe=timeframe, timerange=timerange_parsed, data_format=config.get('dataformat_ohlcv', 'json'), + candle_type=config.get('candle_type_def', CandleType.SPOT) ) if pair not in _data: raise RPCException(f"No data for {pair}, {timeframe} in {timerange} found.")