Changed the code for status table a bit so that it splits up the trades per 50 trades, to make sure it can be sent regardless of number of trades
Signed-off-by: Erwin Hoeckx <hawkeyenl@yahoo.com>
This commit is contained in:
parent
c010cdf894
commit
4e8999ade3
@ -330,7 +330,11 @@ class Telegram(RPCHandler):
|
||||
statlist, head = self._rpc._rpc_status_table(
|
||||
self._config['stake_currency'], self._config.get('fiat_display_currency', ''))
|
||||
|
||||
message = tabulate(statlist, headers=head, tablefmt='simple')
|
||||
max_trades_per_msg = 50
|
||||
for i in range(0, max(int(len(statlist) / max_trades_per_msg), 1)):
|
||||
message = tabulate(statlist[i * max_trades_per_msg:(i + 1) * max_trades_per_msg],
|
||||
headers=head,
|
||||
tablefmt='simple')
|
||||
self._send_msg(f"<pre>{message}</pre>", parse_mode=ParseMode.HTML)
|
||||
except RPCException as e:
|
||||
self._send_msg(str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user