_rpc_trade_status argument datatype optimizations
This commit is contained in:
parent
eb95d970e9
commit
a68a546dd9
@ -144,7 +144,7 @@ class RPC:
|
|||||||
}
|
}
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def _rpc_trade_status(self, trade_ids=None) -> List[Dict[str, Any]]:
|
def _rpc_trade_status(self, trade_ids: List[int] = []) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Below follows the RPC backend it is prefixed with rpc_ to raise awareness that it is
|
Below follows the RPC backend it is prefixed with rpc_ to raise awareness that it is
|
||||||
a remotely exposed function
|
a remotely exposed function
|
||||||
|
@ -280,9 +280,9 @@ class Telegram(RPCHandler):
|
|||||||
|
|
||||||
# Check if there's at least one numerical ID provided.
|
# Check if there's at least one numerical ID provided.
|
||||||
# If so, try to get only these trades.
|
# If so, try to get only these trades.
|
||||||
trade_ids = None
|
trade_ids = []
|
||||||
if context.args and len(context.args) > 0:
|
if context.args and len(context.args) > 0:
|
||||||
trade_ids = [i for i in context.args if i.isnumeric()]
|
trade_ids = [int(i) for i in context.args if i.isnumeric()]
|
||||||
|
|
||||||
results = self._rpc._rpc_trade_status(trade_ids=trade_ids)
|
results = self._rpc._rpc_trade_status(trade_ids=trade_ids)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user