rename symbol_is_pair to market_is_tradable

Make it part of the exchange class, so subclasses can override this
This commit is contained in:
Matthias
2020-06-02 20:29:48 +02:00
parent f3824d970b
commit b22e3a67d8
5 changed files with 39 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
""" FTX exchange subclass """
import logging
from typing import Dict
from typing import Any, Dict
from freqtrade.exchange import Exchange
@@ -12,3 +12,13 @@ class Ftx(Exchange):
_ft_has: Dict = {
"ohlcv_candle_limit": 1500,
}
def market_is_tradable(self, market: Dict[str, Any]) -> bool:
"""
Check if the market symbol is tradable by Freqtrade.
Default checks + check if pair is darkpool pair.
"""
parent_check = super().market_is_tradable(market)
return (parent_check and
market.get('spot', False) is True)