cached pairs iteration fixed + help added
This commit is contained in:
parent
1dfbf6eed6
commit
a8be277ca0
@ -466,12 +466,12 @@ class RPC(object):
|
|||||||
if not self._freqtrade.edge:
|
if not self._freqtrade.edge:
|
||||||
raise RPCException(f'Edge is not enabled.')
|
raise RPCException(f'Edge is not enabled.')
|
||||||
|
|
||||||
for pair in self._freqtrade.edge._cached_pairs:
|
return [
|
||||||
res = {
|
{
|
||||||
'pair': pair,
|
'Pair': pair,
|
||||||
'winrate': self._freqtrade.edge._cached_pairs[pair].winrate,
|
'Winrate': self._freqtrade.edge._cached_pairs[pair].winrate,
|
||||||
'expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy,
|
'Expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy,
|
||||||
'stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss,
|
'Stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss,
|
||||||
}
|
}
|
||||||
|
for pair in self._freqtrade.edge._cached_pairs
|
||||||
return res
|
]
|
||||||
|
@ -93,6 +93,7 @@ class Telegram(RPC):
|
|||||||
CommandHandler('reload_conf', self._reload_conf),
|
CommandHandler('reload_conf', self._reload_conf),
|
||||||
CommandHandler('stopbuy', self._stopbuy),
|
CommandHandler('stopbuy', self._stopbuy),
|
||||||
CommandHandler('whitelist', self._whitelist),
|
CommandHandler('whitelist', self._whitelist),
|
||||||
|
CommandHandler('edge', self._edge),
|
||||||
CommandHandler('help', self._help),
|
CommandHandler('help', self._help),
|
||||||
CommandHandler('version', self._version),
|
CommandHandler('version', self._version),
|
||||||
]
|
]
|
||||||
@ -478,15 +479,8 @@ class Telegram(RPC):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
edge_pairs = self._rpc_edge()
|
edge_pairs = self._rpc_edge()
|
||||||
edge_pairs_tab = tabulate(edge_pairs,
|
print(edge_pairs)
|
||||||
headers=[
|
edge_pairs_tab = tabulate(edge_pairs, headers='keys', tablefmt='simple')
|
||||||
'Pair',
|
|
||||||
f'Winrate',
|
|
||||||
f'Expectancy',
|
|
||||||
f'Stoploss'
|
|
||||||
],
|
|
||||||
tablefmt='simple')
|
|
||||||
|
|
||||||
message = f'<b>Edge only validated following pairs:</b>\n<pre>{edge_pairs_tab}</pre>'
|
message = f'<b>Edge only validated following pairs:</b>\n<pre>{edge_pairs_tab}</pre>'
|
||||||
self._send_msg(message, bot=bot, parse_mode=ParseMode.HTML)
|
self._send_msg(message, bot=bot, parse_mode=ParseMode.HTML)
|
||||||
except RPCException as e:
|
except RPCException as e:
|
||||||
@ -520,6 +514,7 @@ class Telegram(RPC):
|
|||||||
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n" \
|
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n" \
|
||||||
"*/reload_conf:* `Reload configuration file` \n" \
|
"*/reload_conf:* `Reload configuration file` \n" \
|
||||||
"*/whitelist:* `Show current whitelist` \n" \
|
"*/whitelist:* `Show current whitelist` \n" \
|
||||||
|
"*/edge:* `Shows validated pairs by Edge if it is enabeld` \n" \
|
||||||
"*/help:* `This help message`\n" \
|
"*/help:* `This help message`\n" \
|
||||||
"*/version:* `Show version`"
|
"*/version:* `Show version`"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user