changed kraken set lev implementation

This commit is contained in:
Sam Germain
2021-09-15 21:55:19 -06:00
parent 47677ccd91
commit cbaf477bec
4 changed files with 22 additions and 21 deletions

View File

@@ -1110,7 +1110,13 @@ def test_create_order(default_conf, mocker, side, ordertype, rate, marketprice,
exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name)
order = exchange.create_order(
pair='ETH/BTC', ordertype=ordertype, side=side, amount=1, rate=200)
pair='ETH/BTC',
ordertype=ordertype,
side=side,
amount=1,
rate=200,
leverage=3.0
)
assert 'id' in order
assert 'info' in order

View File

@@ -305,15 +305,3 @@ def test_fill_leverage_brackets_kraken(default_conf, mocker):
'XLTCUSDT': [1],
'LTC/ETH': [1]
}
def test__set_leverage_kraken(default_conf, mocker):
exchange = get_patched_exchange(mocker, default_conf, id="kraken")
exchange._set_leverage(1)
assert 'leverage' not in exchange._params
exchange._set_leverage(3)
assert exchange._params['leverage'] == 3
exchange._set_leverage(1.0)
assert 'leverage' not in exchange._params
exchange._set_leverage(3.0)
assert exchange._params['leverage'] == 3