added exception checks to LocalTrade.leverage and LocalTrade.borrowed

This commit is contained in:
Sam Germain
2021-06-27 00:19:58 -06:00
parent 34073135b7
commit f5d7deedf4
4 changed files with 48 additions and 34 deletions

View File

@@ -2132,6 +2132,7 @@ def limit_exit_short_order(limit_exit_short_order_open):
order['status'] = 'closed'
return order
@pytest.fixture(scope='function')
def market_short_order():
return {
@@ -2162,11 +2163,12 @@ def market_exit_short_order():
'amount': 91.99181073,
'filled': 91.99181073,
'remaining': 0.0,
'status': 'closed'
'status': 'closed',
'leverage': 3,
'interest_rate': 0.0005
}
@pytest.fixture
def interest_rate():
return MagicMock(return_value=0.0005)