API only not allowing to buy an amount of coins with decimal places

I have been trying to make code that makes a futures order of a coin specific to the person’s balance in USDT. Now I’m stuck because I keep getting the error “precision is over the maximum defined for this asset”. I have tried rounding the amount to the tickSize but it didn’t help. The only way for my order to get accepted is for me to submit an order with an amount of a full number without decimal places. I really can’t figure out what’s causing this. Thanks in advance

Share an example so that the community can have a better context and suggest solutions.
By example, we mean: request url with the params and full error message.

I agree with aisling on providing the error, but if I had to guess, if you’re getting “Precision is over the maximum defined for this asset”, then likely one of your parameters is too precise.

Let’s take ETHUSDT on binance.com for example.

            "symbol": "ETHUSDT",
            "status": "TRADING",
            "baseAsset": "ETH",
            "baseAssetPrecision": 8,
            "quoteAsset": "USDT",
            "quotePrecision": 8,
            "quoteAssetPrecision": 8,
            "baseCommissionPrecision": 8,
            "quoteCommissionPrecision": 8

In the example from exchangeInfo both assets have a precision of 8, so neither price or quantity can be more than 8 decimals. (i.e. if you send an order with either price or quantity of 0.123456789) you will get that error.

Thank you for all the help! I realised that if I use quantityPrecision for rounding the amount it works fine. The precision doesn’t go over three decimals but I get no errors and I think this should be good enough