Add return-type for select_order
This commit is contained in:
parent
f113b45036
commit
26a5cc5959
@ -520,7 +520,7 @@ class Trade(_DECL_BASE):
|
||||
profit_ratio = (close_trade_price / self.open_trade_price) - 1
|
||||
return float(f"{profit_ratio:.8f}")
|
||||
|
||||
def select_order(self, order_side: str, status: Optional[str]):
|
||||
def select_order(self, order_side: str, status: Optional[str]) -> Optional[Order]:
|
||||
"""
|
||||
Returns latest order for this orderside and status
|
||||
Returns None if nothing is found
|
||||
|
@ -108,9 +108,10 @@ def mock_order_3_sell():
|
||||
'id': '41231a666a',
|
||||
'symbol': 'XRP/BTC',
|
||||
'status': 'closed',
|
||||
'side': 'stop_loss',
|
||||
'type': 'limit',
|
||||
'side': 'sell',
|
||||
'type': 'stop_loss_limit',
|
||||
'price': 0.06,
|
||||
'average': 0.06,
|
||||
'amount': 123.0,
|
||||
'filled': 123.0,
|
||||
'remaining': 0.0,
|
||||
|
Loading…
Reference in New Issue
Block a user