mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
update analyzed df request to allow specifying a single pair
This commit is contained in:
parent
36a00e8de0
commit
fce1e9d6d0
|
@ -91,9 +91,10 @@ async def _process_consumer_request(
|
|||
elif type == RPCRequestType.ANALYZED_DF:
|
||||
# Limit the amount of candles per dataframe to 'limit' or 1500
|
||||
limit = min(data.get('limit', 1500), 1500) if data else None
|
||||
pair = data.get('pair', None) if data else None
|
||||
|
||||
# For every pair in the generator, send a separate message
|
||||
for message in rpc._ws_request_analyzed_df(limit):
|
||||
for message in rpc._ws_request_analyzed_df(limit, pair):
|
||||
# Format response
|
||||
response = WSAnalyzedDFMessage(data=message)
|
||||
await channel.send(response.dict(exclude_none=True))
|
||||
|
|
|
@ -1109,8 +1109,8 @@ class RPC:
|
|||
|
||||
def _ws_request_analyzed_df(
|
||||
self,
|
||||
pair: Optional[str],
|
||||
limit: Optional[int] = None,
|
||||
pair: Optional[str] = None
|
||||
):
|
||||
""" Historical Analyzed Dataframes for WebSocket """
|
||||
pairlist = [pair] if pair else self._freqtrade.active_pair_whitelist
|
||||
|
|
Loading…
Reference in New Issue
Block a user