Coin M Futures Balance Retrieval

Hello! I am trying to retrieve my balance which is free(money that is not used yet), from my Coin M Futures account using Python assisted by the CCXT module. But, whenever I try to retrieve them, I always receive the free balance of my USDT M Futures account. Could anybody please give me a source code to retrieve my Coin M Futures balance in Python using the CCXT module? Thank you!

My code:

import ccxt

binance_access = "My Access Key"
binance_secret = "My Secret Key"

binanceX = ccxt.binance(config={
    'apiKey': binance_access,
    'secret': binance_secret,
    'enableRateLimit': True,
    'options': {
        'defaultType': 'future'

balance = binanceX.fetch_balance()
usdt_free_balance = balance['free']


I’m not familiar with CCXT, but make sure your request endpoint for your coin-m futures balance looks like: GET

I’m using here, because you mean free money, so you might be requesting from Futures Testnet.

If you’re getting results from USDT-M futures, it’s probably because instead of dapi/v1/account, your request is sending with fapi/v1/account(notice the f).

Oh, I am sorry if there was a misunderstanding. What I mean by “free money” is the balance of what you can trade with so it is balance - the sum of all position’s margin.