Isolated liq branch passes all tests and has the general structure that it is supposed to, but is patchy, and doesnt get the correct maintenance amt and maintenance margin rate yet
This commit is contained in:
@@ -3582,6 +3582,24 @@ def test_calculate_funding_fees(
|
||||
) == kraken_fee
|
||||
|
||||
|
||||
def test_get_liquidation_price(mocker, default_conf):
|
||||
|
||||
api_mock = MagicMock()
|
||||
api_mock.fetch_positions = MagicMock()
|
||||
type(api_mock).has = PropertyMock(return_value={'fetchPositions': True})
|
||||
default_conf['dry_run'] = False
|
||||
|
||||
ccxt_exceptionhandlers(
|
||||
mocker,
|
||||
default_conf,
|
||||
api_mock,
|
||||
"binance",
|
||||
"get_liquidation_price",
|
||||
"fetch_positions",
|
||||
pair="XRP/USDT"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('exchange,rate_start,rate_end,d1,d2,amount,expected_fees', [
|
||||
('binance', 0, 2, "2021-09-01 00:00:00", "2021-09-01 08:00:00", 30.0, -0.0009140999999999999),
|
||||
('binance', 0, 2, "2021-09-01 00:00:15", "2021-09-01 08:00:00", 30.0, -0.0009140999999999999),
|
||||
|
Reference in New Issue
Block a user