mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-16 23:16:48 +00:00
Order: Fix AmountStepIncrementSize conforms check (#1286)
Was using max instead of min, and using either should be redundant anyway
This commit is contained in:
@@ -242,9 +242,8 @@ func (m *MinMaxLevel) Conforms(price, amount float64, orderType Type) error {
|
||||
}
|
||||
if m.AmountStepIncrementSize != 0 {
|
||||
dAmount := decimal.NewFromFloat(amount)
|
||||
dMinAmount := decimal.NewFromFloat(m.MaximumBaseAmount)
|
||||
dStep := decimal.NewFromFloat(m.AmountStepIncrementSize)
|
||||
if !dAmount.Sub(dMinAmount).Mod(dStep).IsZero() {
|
||||
if !dAmount.Mod(dStep).IsZero() {
|
||||
return fmt.Errorf("%w stepSize: %.8f supplied %.8f",
|
||||
ErrAmountExceedsStep,
|
||||
m.AmountStepIncrementSize,
|
||||
|
||||
Reference in New Issue
Block a user