hello
i’m trying create order with library
my request
um_futures.new_order(
symbol="SOLUSDT",
side="SELL",
type="MARKET",
positionSide="SHORT",
quantity=qnt,
)
how i’m counting qnt:
i get price
price=Decimal(get_price_ticker("SOLUSDT"))
count my order_amount from usdt like this, where USDT = 40
order_amount = Decimal(USDT) / price
get stepSize
stepSize = Decimal(get_stepSize("SOLUSDT"))
return 0.01000000 for SOLUSDT
count precision
precision = int(round(-math.log(stepSize, 10), 0))
return 2
and then counting
quantity = "{:0.0{}f}".format(order_amount, precision)
return 0.93 for now
and put it in new order like qnt
get error message
status: 400, error code: -1111, error message: Precision is over the maximum defined for this asset.
can u help me please?