You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call AmountToLotSize(0.0000010, 7, 0.003923153000000002) I get 0.0039229 but expected value is 0.003923. Because of that I get error <APIError> code=-4014, msg=Price not increased by tick size.
The text was updated successfully, but these errors were encountered:
thanks for your feedback, it is no longer applicable at present, I saw. @ramilexe I recommend that you follow tickSize completely, not pricePrecision. I would fix this function later.
// RoundPriceToTickSize rounds the price to the nearest tick sizefuncRoundPriceToTickSize(price, tickSizefloat64) float64 {
iftickSize==0 {
returnprice// To avoid division by zero
}
// Calculate the factor by which to multiply and divide the price to conform to the tick size.factor:=1/tickSize// Round the price to the nearest tick size.roundedPrice:=math.Round(price*factor) /factorreturnroundedPrice
}
There is
MEWUSDT
token on Binance futures with following parameters:When I call
AmountToLotSize(0.0000010, 7, 0.003923153000000002)
I get0.0039229
but expected value is0.003923
. Because of that I get error<APIError> code=-4014, msg=Price not increased by tick size.
The text was updated successfully, but these errors were encountered: