extend status bot command to query specific trades

This commit is contained in:
Andreas Brunner
2021-01-17 20:39:35 +01:00
parent 572f5f9186
commit 6d40814dbf
2 changed files with 14 additions and 4 deletions

View File

@@ -277,7 +277,13 @@ class Telegram(RPCHandler):
return
try:
results = self._rpc._rpc_trade_status()
# Check if there's at least one numerical ID provided. If so, try to get only these trades.
trade_ids = None
if context.args and len(context.args) > 0:
trade_ids = [i for i in context.args if i.isnumeric()]
results = self._rpc._rpc_trade_status(trade_ids=trade_ids)
messages = []
for r in results: