From 2bfc812618d0e50cee8599038d010835edad410f Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 31 Oct 2021 00:53:36 -0600 Subject: [PATCH] moved mark_ohlcv_price in _ft_has --- freqtrade/exchange/exchange.py | 5 ++--- freqtrade/exchange/ftx.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index ed21e57b9..5b9ebcbcd 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -69,6 +69,7 @@ class Exchange: "trades_pagination_arg": "since", "l2_limit_range": None, "l2_limit_range_required": True, # Allow Empty L2 limit (kucoin) + "mark_ohlcv_price": "mark" } _ft_has: Dict = {} @@ -80,8 +81,6 @@ class Exchange: # TradingMode.SPOT always supported and not required in this list ] - mark_ohlcv_price = 'mark' - def __init__(self, config: Dict[str, Any], validate: bool = True) -> None: """ Initializes this module with the given config, @@ -1752,7 +1751,7 @@ class Exchange: timeframe="1h", since=start, params={ - 'price': self.mark_ohlcv_price + 'price': self._ft_has["mark_ohlcv_price"] } ) history = {} diff --git a/freqtrade/exchange/ftx.py b/freqtrade/exchange/ftx.py index 14045e302..d84b3a5d4 100644 --- a/freqtrade/exchange/ftx.py +++ b/freqtrade/exchange/ftx.py @@ -20,6 +20,7 @@ class Ftx(Exchange): _ft_has: Dict = { "stoploss_on_exchange": True, "ohlcv_candle_limit": 1500, + "mark_ohlcv_price": "index" } funding_fee_times: List[int] = list(range(0, 24)) @@ -28,7 +29,6 @@ class Ftx(Exchange): # (TradingMode.MARGIN, Collateral.CROSS), # TODO-lev: Uncomment once supported # (TradingMode.FUTURES, Collateral.CROSS) # TODO-lev: Uncomment once supported ] - mark_ohlcv_price = 'index' def market_is_tradable(self, market: Dict[str, Any]) -> bool: """