func (l *LimitOrder) Price() (float64, error) {
	if l.AmountWant == 0 {
		return 0, fmt.Errorf("The amount requested in the order is 0, so no price can be calculated. Consider it a donation")
	}
	if l.IsBuySide() {
		return float64(l.AmountWant) / float64(l.AmountHave), nil
	} else if l.IsSellSide() {
		return float64(l.AmountHave) / float64(l.AmountWant), nil
	}
	return 0, fmt.Errorf("Order is not buy or sell, cannot calculate price")
}
// Price gets a float price for the order. This determines how it will get matched. The exchange should figure out if it can take some of the
Price gets a float price for the order. This determines how it will get matched. The exchange should figure out if it can take some of the
// Price gets a float price for the order . This determines how it will get matched . The exchange should figure out if it can take some of the
func (l *LimitOrder) Price() (float64, error) {
	if l.AmountWant == 0 {
		return 0, fmt.Errorf("The amount requested in the order is 0, so no price can be calculated. Consider it a donation")
	}
	if l.IsBuySide() {
		return float64(l.AmountWant) / float64(l.AmountHave), nil
	} else if l.IsSellSide() {
		return float64(l.AmountHave) / float64(l.AmountWant), nil
	}
	return 0, fmt.Errorf("Order is not buy or sell, cannot calculate price")
}
func ( l * LimitOrder ) Price ( ) ( float64 , error ) { if l . AmountWant == 0 { return 0 , fmt . Errorf ( " " ) } if l . IsBuySide ( ) { return float64 ( l . AmountWant ) / float64 ( l . AmountHave ) , nil } else if l . IsSellSide ( ) { return float64 ( l . AmountHave ) / float64 ( l . AmountWant ) , nil } return 0 , fmt . Errorf ( " " ) }
Price gets a float price for the order.
Price gets a float price for the order .