-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AmountToLotSize works incorrect #615
Comments
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. {
"filterType": "PRICE_FILTER",
"maxPrice": "200",
"minPrice": "0.0000010",
"tickSize": "0.0000010"
} |
@xyq-c-cpp I replaced it with following function: // RoundPriceToTickSize rounds the price to the nearest tick size
func RoundPriceToTickSize(price, tickSize float64) float64 {
if tickSize == 0 {
return price // 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) / factor
return roundedPrice
} |
Closed
@xyq-c-cpp @adshao in which PR it was fixed? |
code is still not fixed https://github.com/adshao/go-binance/blob/master/v2/common/helpers.go#L10 |
ramilexe
added a commit
to ramilexe/go-binance
that referenced
this issue
Jan 4, 2025
Add `page` parameter to `GetIncomeHistoryService`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: