freqtrade/freqtrade · error · OperationalException

No pairs file found with path "{pairs_file}".

Error message

No pairs file found with path "{pairs_file}".

What it means

Raised by `Configuration.prepare_trading_command`/pair loading logic when `--pairs-file` points to a path that does not exist on disk. The pairs file is a JSON list of pairs used e.g. by `freqtrade download-data` and `test-pairlist`.

Source

Thrown at freqtrade/configuration/configuration.py:535

        """
        Helper for download script.
        Takes first found:
        * -p (pairs argument)
        * --pairs-file
        * whitelist from config
        """

        if "pairs" in config:
            config["exchange"]["pair_whitelist"] = config["pairs"]
            return

        if self.args.get("pairs_file"):
            pairs_file = Path(self.args["pairs_file"])
            logger.info(f'Reading pairs file "{pairs_file}".')
            # Download pairs from the pairs file if no config is specified
            # or if pairs file is specified explicitly
            if not pairs_file.exists():
                raise OperationalException(f'No pairs file found with path "{pairs_file}".')
            config["pairs"] = load_file(pairs_file)
            if isinstance(config["pairs"], list):
                config["pairs"].sort()
            return

        if self.args.get("config"):
            logger.info("Using pairlist from configuration.")
            config["pairs"] = config.get("exchange", {}).get("pair_whitelist")
        else:
            # Fall back to /dl_path/pairs.json
            pairs_file = config["datadir"] / "pairs.json"
            if pairs_file.exists():
                logger.info(f'Reading pairs file "{pairs_file}".')
                config["pairs"] = load_file(pairs_file)
                if "pairs" in config and isinstance(config["pairs"], list):
                    config["pairs"].sort()

View on GitHub (pinned to 1c8edfe4d1)

Solutions

  1. Verify the path with `ls` and fix the typo or use an absolute path
  2. Create the file as a JSON array, e.g. `["BTC/USDT", "ETH/USDT"]`
  3. Alternatively drop `--pairs-file` and let freqtrade read `exchange.pair_whitelist` from the config

Example fix

# before
freqtrade download-data --pairs-file pairs.json
# (file missing / wrong cwd)

# after
echo '["BTC/USDT", "ETH/USDT"]' > pairs.json
freqtrade download-data --pairs-file ./pairs.json
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
p = Path(args['pairs_file'])
if not p.is_file():
    raise SystemExit(f'pairs file missing: {p}')

Prevention

When it happens

Trigger: Running a subcommand with `--pairs-file /path/pairs.json` (or the deprecated arg) where the file is missing; the check is `pairs_file.exists()` before `load_file(pairs_file)`.

Common situations: Typo in the pairs-file path, relative path resolved against the wrong working directory, or the file was never created / was deleted after a git clean.

Related errors


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