wisespace-io / binance-rs

Rust Library for the Binance API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Precision is over the maximum defined for this asset.

ebadta81 opened this issue · 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 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