diff --git a/pkg/types/price_volume_slice.go b/pkg/types/price_volume_slice.go index 03a6c8b00..6a30b0c98 100644 --- a/pkg/types/price_volume_slice.go +++ b/pkg/types/price_volume_slice.go @@ -12,6 +12,10 @@ type PriceVolume struct { Price, Volume fixedpoint.Value } +func (p PriceVolume) InQuote() fixedpoint.Value { + return p.Price.Mul(p.Volume) +} + func (p PriceVolume) Equals(b PriceVolume) bool { return p.Price.Eq(b.Price) && p.Volume.Eq(b.Volume) }