freqtrade/freqtrade · error · ConfigurationError

Freqtrade does not support '{mm_value}' '{trading_mode}' on

Error message

Freqtrade does not support '{mm_value}' '{trading_mode}' on {self.name}.

What it means

Raised in validate_trading_mode_and_margin_mode() when margin_mode is provided and the exact (trading_mode, margin_mode) tuple is absent from the exchange's _supported_trading_mode_margin_pairs. Even if an exchange supports futures, it may only allow one margin mode (typically isolated); this error names the offending margin_mode value. The combination-level check is the authoritative gate for futures setups.

Source

Thrown at freqtrade/exchange/exchange.py:954

        Throws OperationalException:
            If the trading_mode/margin_mode type are not supported by freqtrade on this exchange
        """
        if trading_mode == TradingMode.SPOT:
            return
        if allow_none_margin_mode and margin_mode is None:
            # Verify trading mode independent of margin mode
            if not any(
                trading_mode == pair[0] for pair in self._supported_trading_mode_margin_pairs
            ):
                raise ConfigurationError(
                    f"Freqtrade does not support '{trading_mode}' on {self.name}."
                )

        if not allow_none_margin_mode and (
            (trading_mode, margin_mode) not in self._supported_trading_mode_margin_pairs
        ):
            mm_value = margin_mode and margin_mode.value
            raise ConfigurationError(
                f"Freqtrade does not support '{mm_value}' '{trading_mode}' on {self.name}."
            )

    @classmethod
    def combine_ft_has(cls, include_futures: bool) -> FtHas:
        """
        Combine all ft_has options from the class hierarchy.
        Child classes override parent classes.
        Doesn't apply overrides from the configuration.
        """
        _ft_has = deep_merge_dicts(cls._ft_has, deepcopy(cls._ft_has_default))

        if include_futures:
            _ft_has = deep_merge_dicts(cls._ft_has_futures, _ft_has)
        return _ft_has

    def build_ft_has(self, exchange_conf: ExchangeConfig) -> None:
        """

View on GitHub (pinned to 1c8edfe4d1)

Solutions

  1. Set margin_mode to the one the exchange supports for that trading mode (usually "isolated" for futures).
  2. Switch to an exchange supporting the desired (trading_mode, margin_mode) pair.
  3. Update freqtrade — supported pairs lists expand over releases.

Example fix

# config.json - before
"trading_mode": "futures", "margin_mode": "cross"

# after
"trading_mode": "futures", "margin_mode": "isolated"
Defensive patterns

Strategy: validation

Validate before calling

tm, mm = config.get('trading_mode'), config.get('margin_mode')
if tm != 'spot' and mm is not None:
    pairs = {(str(a), str(b)) for a, b in exchange._supported_trading_mode_margin_pairs}
    if (tm, mm) not in pairs:
        raise SystemExit(f"({tm}, {mm}) not supported on {exchange.name}")

Prevention

When it happens

Trigger: "trading_mode": "futures", "margin_mode": "cross" on an exchange that only lists (FUTURES, ISOLATED); spot margin_mode combos that the subclass does not declare.

Common situations: Cross-margin configs copied from binance futures onto exchanges supporting only isolated; users assuming margin_mode is interchangeable; older freqtrade versions with fewer supported tuples after an exchange update.

Related errors


AI-assisted analysis of freqtrade/freqtrade@1c8edfe4d1 (2026-08-15). Data as JSON: /api/errors/b41f9347943df3e1. Report an issue: GitHub.