I need to fetch funding rate history data from binance, but it only shows spot markets even when I type :
binance = ccxt.binance({'option': {'defaultType': 'future'}})
binance.fetch_markets()
How is it possible to fix?
I need to fetch funding rate history data from binance, but it only shows spot markets even when I type :
binance = ccxt.binance({'option': {'defaultType': 'future'}})
binance.fetch_markets()
How is it possible to fix?
Hope this helps:
import ccxt
exchange = ccxt.binance()
exchange.options = {'defaultType': 'future',
'adjustForTimeDifference': True}
symbol = 'BTC/USDT'
funding = exchange.fetchFundingRate(symbol)
print(funding)