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

error messages use different precision #482

Closed
darren-liu opened this issue Mar 6, 2019 · 0 comments
Closed

error messages use different precision #482

darren-liu opened this issue Mar 6, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@darren-liu
Copy link
Contributor

darren-liu commented Mar 6, 2019

ERROR: {"codespace":6,"code":401,"abci_code":393617,"message":"quantity(10) is not rounded to lotSize(0.10000000)"}


	if msg.Quantity <= 0 || msg.Quantity%pair.LotSize.ToInt64() != 0 {
		return errors.New(fmt.Sprintf("quantity(%v) is not rounded to lotSize(%v)", msg.Quantity, pair.LotSize))
	}

	if msg.Price <= 0 || msg.Price%pair.TickSize.ToInt64() != 0 {
		return errors.New(fmt.Sprintf("price(%v) is not rounded to tickSize(%v)", msg.Price, pair.TickSize))
	}

@darren-liu darren-liu added the bug Something isn't working label Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants