From 3bfd9186f70518c237658c090789bdd10e6678aa Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Wed, 16 Feb 2022 04:05:27 -0600 Subject: [PATCH] gateio.get_max_leverage small fix --- freqtrade/exchange/gateio.py | 2 ++ tests/exchange/test_exchange.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/gateio.py b/freqtrade/exchange/gateio.py index cfa590fae..305bf1547 100644 --- a/freqtrade/exchange/gateio.py +++ b/freqtrade/exchange/gateio.py @@ -61,3 +61,5 @@ class Gateio(Exchange): market = self.markets[pair] if market['limits']['leverage']['max'] is not None: return market['limits']['leverage']['max'] + else: + return 1.0 diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index d43c0518d..8eeededfe 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -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) -@ pytest.mark.parametrize('pair,value,mmr,maintAmt', [ +@pytest.mark.parametrize('pair,value,mmr,maintAmt', [ ('ADA/BUSD', 500, 0.025, 0.0), ('ADA/BUSD', 20000000, 0.5, 1527500.0), ('ZEC/USDT', 500, 0.01, 0.0),