updated get_max_leverage to use new ccxt unified property

This commit is contained in:
Sam Germain
2021-10-17 07:06:55 -06:00
parent 3fffc315ac
commit 0329da1a57
8 changed files with 45 additions and 133 deletions

View File

@@ -1,6 +1,6 @@
""" FTX exchange subclass """
import logging
from typing import Any, Dict, List, Optional, Tuple
from typing import Any, Dict, List, Tuple
import ccxt
@@ -168,18 +168,3 @@ class Ftx(Exchange):
if order['type'] == 'stop':
return safe_value_fallback2(order, order, 'id_stop', 'id')
return order['id']
def fill_leverage_brackets(self):
"""
FTX leverage is static across the account, and doesn't change from pair to pair,
so _leverage_brackets doesn't need to be set
"""
return
def get_max_leverage(self, pair: Optional[str], nominal_value: Optional[float]) -> float:
"""
Returns the maximum leverage that a pair can be traded at, which is always 20 on ftx
:param pair: Here for super method, not used on FTX
:nominal_value: Here for super method, not used on FTX
"""
return 20.0