Merge pull request #1698 from mishaker/edge_rpc

Edge RPC
This commit is contained in:
Matthias
2019-03-28 06:22:38 +01:00
committed by GitHub
5 changed files with 129 additions and 7 deletions

View File

@@ -475,3 +475,18 @@ class RPC(object):
'blacklist': self._freqtrade.pairlists.blacklist,
}
return res
def _rpc_edge(self) -> List[Dict[str, Any]]:
""" Returns information related to Edge """
if not self._freqtrade.edge:
raise RPCException(f'Edge is not enabled.')
return [
{
'Pair': k,
'Winrate': v.winrate,
'Expectancy': v.expectancy,
'Stoploss': v.stoploss,
}
for k, v in self._freqtrade.edge._cached_pairs.items()
]