Use correct candleconfig in plot endpoint

This commit is contained in:
Matthias 2022-04-01 08:57:58 +02:00
parent fe3260aae2
commit 775305e9c4
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@ from freqtrade.data.btanalysis import (analyze_trade_parallelism, calculate_max_
from freqtrade.data.converter import trim_dataframe from freqtrade.data.converter import trim_dataframe
from freqtrade.data.dataprovider import DataProvider from freqtrade.data.dataprovider import DataProvider
from freqtrade.data.history import get_timerange, load_data 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.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_prev_date, timeframe_to_seconds from freqtrade.exchange import timeframe_to_prev_date, timeframe_to_seconds
from freqtrade.misc import pair_to_filename from freqtrade.misc import pair_to_filename

View File

@ -18,7 +18,8 @@ from freqtrade import __version__
from freqtrade.configuration.timerange import TimeRange from freqtrade.configuration.timerange import TimeRange
from freqtrade.constants import CANCEL_REASON, DATETIME_PRINT_FORMAT from freqtrade.constants import CANCEL_REASON, DATETIME_PRINT_FORMAT
from freqtrade.data.history import load_data 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.exceptions import ExchangeError, PricingError
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_msecs from freqtrade.exchange import timeframe_to_minutes, timeframe_to_msecs
from freqtrade.loggers import bufferHandler from freqtrade.loggers import bufferHandler
@ -1057,6 +1058,7 @@ class RPC:
timeframe=timeframe, timeframe=timeframe,
timerange=timerange_parsed, timerange=timerange_parsed,
data_format=config.get('dataformat_ohlcv', 'json'), data_format=config.get('dataformat_ohlcv', 'json'),
candle_type=config.get('candle_type_def', CandleType.SPOT)
) )
if pair not in _data: if pair not in _data:
raise RPCException(f"No data for {pair}, {timeframe} in {timerange} found.") raise RPCException(f"No data for {pair}, {timeframe} in {timerange} found.")