exchange.fill_leverage_brackets/get_maintenance_ratio_and_amt docstring and type specification

This commit is contained in:
Sam Germain
2022-01-14 06:11:17 -06:00
parent b4a0611afc
commit bb2b2211d0
8 changed files with 57 additions and 31 deletions

View File

@@ -45,9 +45,9 @@ class Gateio(Exchange):
self,
pair: str,
nominal_value: Optional[float] = 0.0,
):
) -> Tuple[float, Optional[float]]:
"""
:return: The maintenance margin ratio and maintenance amount
"""
info = self.markets[pair]['info']
if 'maintenance_rate' in info:
return [float(info['maintenance_rate']), None]
else:
return [None, None]
return (float(info['maintenance_rate']), None)