Skip to content
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

Precision is over the maximum defined for this asset. #146

Open
ebadta81 opened this issue Apr 7, 2022 · 1 comment
Open

Precision is over the maximum defined for this asset. #146

ebadta81 opened this issue Apr 7, 2022 · 1 comment

Comments

@ebadta81
Copy link

ebadta81 commented Apr 7, 2022

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.

@wisespace-io
Copy link
Owner

wisespace-io commented Apr 22, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants