func (a *AuctionOrder) SetAmountWant(price float64) (err error) {
	if price <= 0 {
		err = fmt.Errorf("Price can't be less than or equal to 0")
		return
	}

	if a.IsBuySide() {
		a.AmountWant = uint64(float64(a.AmountHave) * price)
	} else if a.IsSellSide() {
		a.AmountWant = uint64(float64(a.AmountHave) / price)
	} else {
		err = fmt.Errorf("Invalid side for order, must be buy or sell")
		return
	}
	return
}
// SetAmountWant sets the amountwant value of the limit order according to a price
SetAmountWant sets the amountwant value of the limit order according to a price
// SetAmountWant sets the amountwant value of the limit order according to a price
func (a *AuctionOrder) SetAmountWant(price float64) (err error) {
	if price <= 0 {
		err = fmt.Errorf("Price can't be less than or equal to 0")
		return
	}
	if a.IsBuySide() {
		a.AmountWant = uint64(float64(a.AmountHave) * price)
	} else if a.IsSellSide() {
		a.AmountWant = uint64(float64(a.AmountHave) / price)
	} else {
		err = fmt.Errorf("Invalid side for order, must be buy or sell")
		return
	}
	return
}
func ( a * AuctionOrder ) SetAmountWant ( price float64 ) ( err error ) { if price <= 0 { err = fmt . Errorf ( " " ) return } if a . IsBuySide ( ) { a . AmountWant = uint64 ( float64 ( a . AmountHave ) * price ) } else if a . IsSellSide ( ) { a . AmountWant = uint64 ( float64 ( a . AmountHave ) / price ) } else { err = fmt . Errorf ( " " ) return } return }
SetAmountWant sets the amountwant value of the limit order according to a price
SetAmountWant sets the amountwant value of the limit order according to a price