{"record":{"id":"00550c23050a57c0","repo":"freqtrade/freqtrade","slug":"pair-pair-not-available","errorCode":null,"errorMessage":"Pair {pair} not available","messagePattern":"Pair (.+?) not available","errorType":"exception","errorClass":"ExchangeError","httpStatus":null,"severity":"error","filePath":"freqtrade/exchange/exchange.py","lineNumber":2162,"sourceCode":"                            else TradingMode.FUTURES\n                        ),\n                    )\n                    ticker = tickers_other.get(pair, None)\n                if ticker:\n                    rate: float | None = safe_value_fallback(ticker, \"last\", \"ask\", None)\n                    if rate:\n                        if pair.startswith(currency) and not pair.endswith(currency):\n                            rate = 1.0 / rate\n                        return rate\n        except ValueError:\n            return None\n        return None\n\n    @retrier\n    def fetch_ticker(self, pair: str) -> Ticker:\n        try:\n            if pair not in self.markets or self.markets[pair].get(\"active\", False) is False:\n                raise ExchangeError(f\"Pair {pair} not available\")\n            data: Ticker = self._api.fetch_ticker(pair)\n            return data\n        except ccxt.DDoSProtection as e:\n            raise DDosProtection(e) from e\n        except (ccxt.OperationFailed, ccxt.ExchangeError) as e:\n            raise TemporaryError(\n                f\"Could not load ticker due to {e.__class__.__name__}. Message: {e}\"\n            ) from e\n        except ccxt.BaseError as e:\n            raise OperationalException(e) from e\n\n    @retrier\n    def fetch_funding_rate(self, pair: str) -> FundingRate:\n        \"\"\"\n        Get current Funding rate from exchange.\n        On Futures markets, this is the interest rate for holding a position.\n        Won't work for non-futures markets\n        \"\"\"","sourceCodeStart":2144,"sourceCodeEnd":2180,"githubUrl":"https://github.com/freqtrade/freqtrade/blob/1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15/freqtrade/exchange/exchange.py#L2144-L2180","documentation":"fetch_ticker() proactively raises ccxt.ExchangeError('Pair {pair} not available') when the pair is absent from self.markets or flagged inactive. Because it raises ccxt.ExchangeError inside its own try, the local handler converts it to TemporaryError('Could not load ticker ...') and the @retrier retries — so an unavailable pair burns retries each cycle. This is freqtrade guarding against querying dead markets.","triggerScenarios":"Pair removed from the exchange's markets (delisted) while still in the bot's pairlist; pair listed as inactive by the exchange; markets not yet loaded (very early startup race); wrong pair notation (e.g. missing : separator for futures pairs).","commonSituations":"Delistings happen mid-run; static pairlists keep dead pairs; typos in custom pairlists; futures pair format mistakes (BTC/USDT:USDT vs BTC/USDT); markets cache stale after exchange adds/renames symbols.","solutions":["Remove the dead/renamed pair from the pairlist or use VolumePairList-style dynamic lists that drop unavailable pairs.","Verify the pair string exactly matches ccxt markets (futures pairs need the :USDT settle suffix).","Call reload_markets() if you suspect stale markets (freqtrade does this periodically).","Check the exchange's announcement page for delistings.","Update ccxt so new/renamed markets are known."],"exampleFix":"# before\nticker = exchange.fetch_ticker(\"SOME/USDT\")  # delisted -> retried TemporaryError loop\n\n# after\nmarkets = exchange.markets\nactive = [p for p, m in markets.items() if m.get(\"active\", True)]\npair = \"SOME/USDT\" if \"SOME/USDT\" in active else next((p for p in active if p.startswith(\"SOME/\")), None)\nif pair:\n    ticker = exchange.fetch_ticker(pair)","handlingStrategy":"validation","validationCode":"market = exchange.markets.get(pair)\nif market is None or not market.get(\"active\", False):\n    # fetch_ticker would raise 'Pair not available' and burn retries\n    pair = None","typeGuard":"def is_pair_available(exchange, pair: str) -> bool:\n    market = exchange.markets.get(pair)\n    return market is not None and market.get(\"active\", True) is not False","tryCatchPattern":"from freqtrade.exceptions import TemporaryError\n\ntry:\n    ticker = exchange.fetch_ticker(pair)\nexcept TemporaryError as e:\n    if \"not available\" in str(e):\n        logger.warning(f\"{pair} unavailable - removing from pairlist\")\n        raise\n    time.sleep(2)\n    ticker = exchange.fetch_ticker(pair)","preventionTips":["Validate every static pairlist entry against exchange.markets at startup.","Use exact ccxt pair notation (futures pairs need the :USDT settle suffix).","Prefer dynamic pairlists that automatically drop delisted pairs."],"tags":["pair-validation","delisting","markets","exchange","tickers"],"backgroundTag":null,"analyzedSha":"1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15","analyzedAt":"2026-08-15T05:09:08.096Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}