I want to get all of fundingrate in mexc but i don't know how to fix this error.
Thank all so much.
import ccxt
exchange = ccxt.mexc()
try:
funding_rates = exchange.fetch_funding_rates()
for funding_rate in funding_rates:
symbol = funding_rate['symbol']
rate = funding_rate['rate']
timestamp = funding_rate['timestamp']
print(f"Symbol: {symbol}")
print(f"Funding Rate: {rate}")
print(f"Timestamp: {timestamp}")
print("---")
except ccxt.BaseError as e:
print(f"An error occurred: {e}")