-1

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}")

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 31 '23 at 11:34

0 Answers0