feat: improve docstring and error handling

part of #12206
This commit is contained in:
Matthias
2025-09-06 10:14:50 +02:00
parent 95ad756909
commit 35cc3efd5a
2 changed files with 4 additions and 1 deletions

View File

@@ -2010,6 +2010,8 @@ class Exchange:
Won't work for non-futures markets
"""
try:
if pair not in self.markets or self.markets[pair].get("active", False) is False:
raise ExchangeError(f"Pair {pair} not available")
return self._api.fetch_funding_rate(pair)
except ccxt.NotSupported as e:
raise OperationalException(