mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Adopt plot_dataframe to work with --live
This commit is contained in:
parent
a9abc25785
commit
f0af4601f9
|
@ -32,7 +32,7 @@ class DataProvider(object):
|
|||
@property
|
||||
def available_pairs(self) -> List[str]:
|
||||
"""
|
||||
Return a list of pairs for which data is currently cached.
|
||||
Return a list of tuples containing pair, tick_interval for which data is currently cached.
|
||||
Should be whitelist + open trades.
|
||||
"""
|
||||
return list(self._exchange._klines.keys())
|
||||
|
|
|
@ -579,7 +579,7 @@ class Exchange(object):
|
|||
"""
|
||||
try:
|
||||
# fetch ohlcv asynchronously
|
||||
logger.debug("fetching %s since %s ...", pair, since_ms)
|
||||
logger.debug("fetching %s, %s since %s ...", pair, tick_interval, since_ms)
|
||||
|
||||
data = await self._api_async.fetch_ohlcv(pair, timeframe=tick_interval,
|
||||
since=since_ms)
|
||||
|
|
|
@ -43,7 +43,7 @@ def patch_get_signal(freqtrade: FreqtradeBot, value=(True, False)) -> None:
|
|||
:return: None
|
||||
"""
|
||||
freqtrade.strategy.get_signal = lambda e, s, t: value
|
||||
freqtrade.exchange.refresh_latest_ohlcv = lambda p, i: None
|
||||
freqtrade.exchange.refresh_latest_ohlcv = lambda p: None
|
||||
|
||||
|
||||
def patch_RPCManager(mocker) -> MagicMock:
|
||||
|
|
|
@ -138,8 +138,8 @@ def plot_analyzed_dataframe(args: Namespace) -> None:
|
|||
tickers = {}
|
||||
if args.live:
|
||||
logger.info('Downloading pair.')
|
||||
exchange.refresh_latest_ohlcv([pair], tick_interval)
|
||||
tickers[pair] = exchange.klines(pair)
|
||||
exchange.refresh_latest_ohlcv([(pair, tick_interval)])
|
||||
tickers[pair] = exchange.klines((pair, tick_interval))
|
||||
else:
|
||||
tickers = history.load_data(
|
||||
datadir=Path(_CONF.get("datadir")),
|
||||
|
|
Loading…
Reference in New Issue
Block a user