daroczig / binancer

An R client to the Public Rest API for Binance.
https://daroczig.github.io/binancer
54 stars 57 forks source link

Error when creating new orders #14

Open Trader12345a opened 3 years ago

Trader12345a commented 3 years ago

I keep getting the below error when attempting to add new orders:

abs(quot - round(quot)) < 1e-10 is not TRUE

Does anyone know how to solve this issue?

Trader12345a commented 3 years ago

On further inspection, the error I think is caused by

quot <- (quantity - filters[filterType == 'MARKET_LOT_SIZE', minQty]) / filters[filterType == 'MARKET_LOT_SIZE', stepSize]

in your code. For some pairs the "stepsize" is 0, so it is trying to divide by zero. Can you update the code so that if the stepsize is zero, all positive numbers are allowed as quantities?

yapchunkee commented 3 years ago

I believe this issue can be solved by

quot <- (quantity - filters[filterType == 'LOT_SIZE', minQty]) / filters[filterType == 'LOT_SIZE', stepSize]

DataStrategist commented 3 years ago

Hi all. Just running into this problem. @Trader12345a and @yapchunkee , do either of you have forks w/ this problem fixed?

Thanks!

daroczig commented 2 years ago

Hey @madsurgeon, any chance you might remember what's going on at https://github.com/daroczig/binancer/blob/master/R/binance.R#L761 and what would be your suggestion to overcome the Inf issue?

madsurgeon commented 2 years ago

Thanks for letting me know @daroczig ! I looked at it and it's clear. I will make a PR and fix it.

vvkorotkikh commented 2 years ago

Thanks for letting me know @daroczig ! I looked at it and it's clear. I will make a PR and fix it.

Is there any ideas of fix this issue? It still returns error when attempting to add new orders.

mvdv1234 commented 2 years ago

Thanks for letting me know @daroczig ! I looked at it and it's clear. I will make a PR and fix it.

Is there any ideas of fix this issue? It still returns error when attempting to add new orders.

Did anyone here found out how to fix it? Because when opening a market order the error still appears. I tried to dowload the latest version from the binacer package from github but the error still appears. Would be great if you guys can help me out