auto fix FTX routes with PERP in their symbol

This commit is contained in:
Saleh Mir
2021-09-21 19:47:04 +02:00
parent a825e2ceb5
commit 3b728a8317

View File

@@ -1,6 +1,10 @@
class Route:
def __init__(self, exchange: str, symbol: str, timeframe: str = None, strategy_name: str = None,
dna: str = None) -> None:
# replace PERP with USD in FTX routes
if exchange.startswith('FTX') and symbol.upper().endswith('PERP'):
symbol = symbol.replace('PERP', 'USD')
self.exchange = exchange
self.symbol = symbol
self.timeframe = timeframe