moved mark_ohlcv_price in _ft_has

This commit is contained in:
Sam Germain 2021-10-31 00:53:36 -06:00
parent 0ea8957ccc
commit 2bfc812618
2 changed files with 3 additions and 4 deletions

View File

@ -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 = {}

View File

@ -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:
"""