Add return-type for select_order

This commit is contained in:
Matthias 2020-09-07 07:41:58 +02:00
parent f113b45036
commit 26a5cc5959
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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,