-2019, margin is insufficient while trying to place new limit order

I’m trying to post new order on Binance Futures Testnet and get error -2019 margin is insufficient. I looked at my account and there are available $14k. I try to post order for XRPUSD, quantity = 1000, price=0.62. I use python-binance-futures-connector lib.

 try:
        response = cm_futures_client.new_order(
            symbol="XRPUSD_PERP",
            side="BUY",
            type="LIMIT",
            positionSide="BOTH",
            quantity=100,
            reduceOnly=False,
            timeInForce="GTC",
            price=0.6280
        )
        return response

except ClientError as error:
        print("Exception:")
        message = "Found error. status: {}, error code: {}, error message: {}".format(
                error.status_code, error.error_code, error.error_message)
        print(message)

Also I have problem with using float quantity. It occurs error -1111, error message: Precision is over the maximum defined for this asset.
I tried to use this code but nothing changes

quantity = float(round(100.051, 2))

Hi,

If your margin balance doesn’t meet the initial margin ratio plus the order margin, your order won’t be executed. Regarding the order you mentioned for 1000 XRP at $0.62 each, totalling $620, its execution depends on the initial margin ratio for XRPUSD and your balance. Eg. your balance might be in different assets and therefore not eligible for this trade.

The error code -1111 indicates that the precision of the order quantity exceeds the maximum allowed for the asset. To resolve this, ensure you set the correct precision for the quantity when placing an order for a specific symbol. You can determine the precision for any pair by checking the exchange_info endpoint. Adjust your order quantity accordingly based on the allowed precision for XRPUSD_PERP.