gateio.get_max_leverage small fix

This commit is contained in:
Sam Germain 2022-02-16 04:05:27 -06:00
parent dbd2df6406
commit 3bfd9186f7
2 changed files with 3 additions and 1 deletions

View File

@ -61,3 +61,5 @@ class Gateio(Exchange):
market = self.markets[pair] market = self.markets[pair]
if market['limits']['leverage']['max'] is not None: if market['limits']['leverage']['max'] is not None:
return market['limits']['leverage']['max'] return market['limits']['leverage']['max']
else:
return 1.0

View File

@ -4335,7 +4335,7 @@ def test_get_maintenance_ratio_and_amt_exceptions(mocker, default_conf, leverage
exchange.get_maintenance_ratio_and_amt('1000SHIB/USDT', 10000) exchange.get_maintenance_ratio_and_amt('1000SHIB/USDT', 10000)
@ pytest.mark.parametrize('pair,value,mmr,maintAmt', [ @pytest.mark.parametrize('pair,value,mmr,maintAmt', [
('ADA/BUSD', 500, 0.025, 0.0), ('ADA/BUSD', 500, 0.025, 0.0),
('ADA/BUSD', 20000000, 0.5, 1527500.0), ('ADA/BUSD', 20000000, 0.5, 1527500.0),
('ZEC/USDT', 500, 0.01, 0.0), ('ZEC/USDT', 500, 0.01, 0.0),