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
|
profit_ratio = (close_trade_price / self.open_trade_price) - 1
|
||||||
return float(f"{profit_ratio:.8f}")
|
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 latest order for this orderside and status
|
||||||
Returns None if nothing is found
|
Returns None if nothing is found
|
||||||
|
@ -108,9 +108,10 @@ def mock_order_3_sell():
|
|||||||
'id': '41231a666a',
|
'id': '41231a666a',
|
||||||
'symbol': 'XRP/BTC',
|
'symbol': 'XRP/BTC',
|
||||||
'status': 'closed',
|
'status': 'closed',
|
||||||
'side': 'stop_loss',
|
'side': 'sell',
|
||||||
'type': 'limit',
|
'type': 'stop_loss_limit',
|
||||||
'price': 0.06,
|
'price': 0.06,
|
||||||
|
'average': 0.06,
|
||||||
'amount': 123.0,
|
'amount': 123.0,
|
||||||
'filled': 123.0,
|
'filled': 123.0,
|
||||||
'remaining': 0.0,
|
'remaining': 0.0,
|
||||||
|
Loading…
Reference in New Issue
Block a user