mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 21:01:14 +00:00
@@ -577,7 +577,8 @@ class DataProvider:
|
|||||||
Warning: Performs a network request - so use with common sense.
|
Warning: Performs a network request - so use with common sense.
|
||||||
:param pair: Pair to get the data for
|
:param pair: Pair to get the data for
|
||||||
:return: Funding rate dict from exchange or empty dict if funding rate is not available
|
:return: Funding rate dict from exchange or empty dict if funding rate is not available
|
||||||
If available, the "funding_rate" field will contain the funding rate.
|
If available, the "fundingRate" field will contain the funding rate.
|
||||||
|
"fundingTimestamp" and "fundingDatetime" will contain the next funding times.
|
||||||
Actually filled fields may vary between exchanges.
|
Actually filled fields may vary between exchanges.
|
||||||
"""
|
"""
|
||||||
if self._exchange is None:
|
if self._exchange is None:
|
||||||
|
|||||||
@@ -2010,6 +2010,8 @@ class Exchange:
|
|||||||
Won't work for non-futures markets
|
Won't work for non-futures markets
|
||||||
"""
|
"""
|
||||||
try:
|
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)
|
return self._api.fetch_funding_rate(pair)
|
||||||
except ccxt.NotSupported as e:
|
except ccxt.NotSupported as e:
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
|
|||||||
Reference in New Issue
Block a user