Adopt plot_dataframe to work with --live
This commit is contained in:
parent
a9abc25785
commit
f0af4601f9
@ -32,7 +32,7 @@ class DataProvider(object):
|
|||||||
@property
|
@property
|
||||||
def available_pairs(self) -> List[str]:
|
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.
|
Should be whitelist + open trades.
|
||||||
"""
|
"""
|
||||||
return list(self._exchange._klines.keys())
|
return list(self._exchange._klines.keys())
|
||||||
|
@ -579,7 +579,7 @@ class Exchange(object):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# fetch ohlcv asynchronously
|
# 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,
|
data = await self._api_async.fetch_ohlcv(pair, timeframe=tick_interval,
|
||||||
since=since_ms)
|
since=since_ms)
|
||||||
|
@ -43,7 +43,7 @@ def patch_get_signal(freqtrade: FreqtradeBot, value=(True, False)) -> None:
|
|||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
freqtrade.strategy.get_signal = lambda e, s, t: value
|
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:
|
def patch_RPCManager(mocker) -> MagicMock:
|
||||||
|
@ -138,8 +138,8 @@ def plot_analyzed_dataframe(args: Namespace) -> None:
|
|||||||
tickers = {}
|
tickers = {}
|
||||||
if args.live:
|
if args.live:
|
||||||
logger.info('Downloading pair.')
|
logger.info('Downloading pair.')
|
||||||
exchange.refresh_latest_ohlcv([pair], tick_interval)
|
exchange.refresh_latest_ohlcv([(pair, tick_interval)])
|
||||||
tickers[pair] = exchange.klines(pair)
|
tickers[pair] = exchange.klines((pair, tick_interval))
|
||||||
else:
|
else:
|
||||||
tickers = history.load_data(
|
tickers = history.load_data(
|
||||||
datadir=Path(_CONF.get("datadir")),
|
datadir=Path(_CONF.get("datadir")),
|
||||||
|
Loading…
Reference in New Issue
Block a user