binance-rs icon indicating copy to clipboard operation
binance-rs copied to clipboard

Precision is over the maximum defined for this asset.

Open ebadta81 opened this issue 2 years ago • 1 comments

Hello,

Is there an easy way, to handle f64's for account.market_buy?

I get numbers like this qty: 119.96000000000001 , so no surprise, the server gives me this error message.

As I see now, it is not possible with f64, but market_buy need f64.

I consider to make a Decimal version of your asset.rs.

ebadta81 avatar Apr 07 '22 00:04 ebadta81

@ebadta81 Yes, I see the problem. In the past, I thought to use a decimal library, but I never did it. You can use https://crates.io/crates/rust_decimal ... in the future, we may integrate it to the crate

wisespace-io avatar Apr 22 '22 14:04 wisespace-io