Operating System
Windows
Programming Language
Python
CCXT Version
4.5.8
Description
Kraken caps the funding rate at +/- 0.25% / hour (2% per 8 hour) but it is not done in fetch_funding_rates.
Currently, krakenfutures fetch_funding_rate does fundingRate*8/markPrice but this leads to huge values at time (50%). We need to add a capping between -0.02 and 0.02.
ex = ccxt.krakenfutures()
ex = CCXTPandasExchange(ex=ex)
markets = ex.load_markets().query("type == 'swap'")
funding_rates = ex.fetch_funding_rates(symbols=markets["symbol"].tolist())
print(funding_rates.query("~(-0.02 < fundingRate <0.02)"))