Problem
The SDK currently exposes some calculation-sensitive values using binary floating-point types:
@Nullable public String price;
@Nullable public double probability;
@Nullable public float calculatedMargin;
Using float and double may introduce rounding errors, which is undesirable in trading and betting systems where precise calculations are important.
Proposal
Replace these fields with BigDecimal (or introduce equivalent arbitrary-precision alternatives):
@Nullable public BigDecimal price;
@Nullable public BigDecimal probability;
@Nullable public BigDecimal calculatedMargin;
This would provide deterministic calculations and avoid precision issues when consumers calculate implied probabilities, margins, or other derived values.
Problem
The SDK currently exposes some calculation-sensitive values using binary floating-point types:
Using float and double may introduce rounding errors, which is undesirable in trading and betting systems where precise calculations are important.
Proposal
Replace these fields with BigDecimal (or introduce equivalent arbitrary-precision alternatives):
This would provide deterministic calculations and avoid precision issues when consumers calculate implied probabilities, margins, or other derived values.