diff --git a/pkg/api/rates_handlers.go b/pkg/api/rates_handlers.go index 0395c459..9525da04 100644 --- a/pkg/api/rates_handlers.go +++ b/pkg/api/rates_handlers.go @@ -225,7 +225,7 @@ func (h *Handler) convertRates( diff := 0.0 cp, _ := calculateConvertedPrice(entry.hist, currency, token) if cp != 0 && convertedTodayPrice != 0 { - diff = math.Round(((convertedTodayPrice-cp)/convertedTodayPrice)*10000) / 100 + diff = math.Round(((convertedTodayPrice-cp)/cp)*10000) / 100 } switch { case diff < 0: