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 @@
""" Kraken exchange subclass """
import logging
from typing import Dict
from typing import Any, Dict
import ccxt
@@ -21,6 +21,16 @@ class Kraken(Exchange):
"trades_pagination_arg": "since",
}
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('darkpool', False) is False)
@retrier
def get_balances(self) -> dict:
if self._config['dry_run']: