getting Margin errors for funded accounts

Hi,

I am not understanding why this Order will not go through. I keep getting the following error:
{“code”:-2019,“msg”:“Margin is insufficient.”}


This is what is associated with the SPOT account for USDT:

command executed: wallets = exchange.fetch_balance()

{' {'symbol': 'USDT', 'requested_data': {'symbol': 'USDT', 'free': 7.74572124, 'used': 0.0, 'total': 7.74572124}, 'symbol_non_zero': [{'symbol': 'USDT', 'free': 7.74572124, 'used': 0.0, 'total': 7.74572124}], 'symbol_non_zero_ct': 1, 'all_non_zero': [{'symbol': 'BTC', 'free': 0.00099955, 'used': 0.0, 'total': 0.00099955}, {'symbol': 'USDT', 'free': 7.74572124, 'used': 0.0, 'total': 7.74572124}], 'all_non_zero_ct': 2}}}


This is what is associated with the FUTURES account for USDT

command executed: wallets = exchange.fetch_balance()

{ {'symbol': 'USDT', 'free': 20.0, 'used': 0.0, 'total': 20.0}, 'symbol_non_zero': [{'symbol': 'USDT', 'free': 20.0, 'used': 0.0, 'total': 20.0}], 'symbol_non_zero_ct': 1, 'all_non_zero': [{'symbol': 'USDT', 'free': 20.0, 'used': 0.0, 'total': 20.0}], 'all_non_zero_ct': 1}

NOTE: Even though both use the command “wallets = exchange.fetch_balance()” above, the connections are initiailzed differently

For the MARGIN connection:

            conn_exchange = ccxt.binance({
                'apiKey'         : LD_API_KEY,
                'secret'         : LD_API_SECRET,
                'enableRateLimit': True,
                'options'        : { 'defaultType': 'margin', },
                'urls': {
                    'api': {
                        'Public': 'https://api.binance.com/api/v3/',
                        'Private':'https://api.binance.com/api/v3/',
                        }
                    },
            })

For the SPOT connecton:

            conn_exchange = ccxt.binance({
                'apiKey'         : LD_API_KEY,
                'secret'         : LD_API_SECRET,
                'enableRateLimit': True,
            }
```)

For the **FUTURES** connection:

        conn_exchange = ccxt.binance({
            'apiKey': LD_API_KEY,
            'secret': LD_API_SECRET,
            'timeout': 30000,
            'enableRateLimit': True,
            'rateLimit': 250,
            'options': { 'defaultType': 'future', },
        })
----------------------------------------------------------
This is what was associated with the MARGIN account: 
----------------------------------------------------------	

command executed:         **bank_balance = exchange.fetch_balance( )**


[{'asset': 'USDT', 'free': '213.83167316', 'locked': '0.00000000', 'borrowed': '0.00000000', 'interest': '0.00000000', 'netAsset': '213.83167316'}, {'asset': 'BTC', 'free': '0.00000000', 'locked': '0.00000000', 'borrowed': '0.00913055', 'interest': '0.00005072', 'netAsset': '-0.00918127'}]

ASSETS

ITEM NUMBER : 0 {‘asset’: ‘USDT’, ‘free’: ‘213.83167316’, ‘locked’: ‘0.00000000’, ‘borrowed’: ‘0.00000000’, ‘interest’: ‘0.00000000’, ‘netAsset’: ‘213.83167316’}

ITEM NUMBER : 1 {‘asset’: ‘BTC’, ‘free’: ‘0.00000000’, ‘locked’: ‘0.00000000’, ‘borrowed’: ‘0.00913055’, ‘interest’: ‘0.00005072’, ‘netAsset’: ‘-0.00918127’}

I originally had the Margin set for level "10". Because of the error, I changed it to a "3" and then to a  "1" But this did not help. I still kept getting the error.

**Question**:
I am trying to create orders for amounts like $5, $10, $15. Why am I getting the Margin error: {"code":-2019,"msg":"Margin is insufficient."}

ETA:
=> CHANGED MARGIN TO 1 (which supposedly is like not taking out any margin at all)

 retval  = exchange.createOrder( in_symbol, k_type, side, in_amount, None, server_params )

debugger>>  p ( in_symbol, k_type, side, in_amount, None, server_params )
('BTC/USDT', 'MARKET', 'BUY', 15.0, None, {'newClientOrderId': '22e13c1b59734066a27da7121ba44ece', 'positionSide': 'LONG'})

ccxt.base.errors.ExchangeError: binance {"code":-2019,"msg":"Margin is insufficient."}
> /root/trade_exchange/api_work/trade_binance/bin_market.py(342)create_market_order()
-> retval  = exchange.createOrder( in_symbol, k_type, side, in_amount, None, server_params )

based on the log, are you trying to place an order for

symbol = BTCUSDT
quantity = 15

is that meaning you are trying to buy 15 BTC in one order?