Precision is over the maximum defined for this asset. Binance?

Viewed 171

My code

if side == "LONG" and client.futures_get_open_orders(symbol=symbol) == []:
    print(data)
    pos = "BUY"
    q = tbal / price

    q = round(q, 1)
    print(tbal)
    print(q)
    client.futures_change_leverage(symbol=symbol, leverage=info.laverage)
    buyorder = client.futures_create_order(symbol=symbol, side=pos, type="LIMIT", quantity=q, price=price, timeInForce="GTC")

error:

binance.exceptions.BinanceAPIException: APIError(code=-1111): Precision is over the maximum defined for this asset.

I have tried everything, but it still dont working

2 Answers

Error 1111 is simply because the price you have used is above the maximum number of decimal places allowed.

For example, if tickSize returns 0.01, max allowed decimal places for that symbol will be 2.

Related