From 0866109072cbc27e38510ffa920b652853129c61 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Wed, 29 Jun 2022 02:41:59 -0700 Subject: [PATCH] Fix bug on weighted median --- api/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/utils.py b/api/utils.py index e4dc7e79..816a8159 100644 --- a/api/utils.py +++ b/api/utils.py @@ -179,8 +179,8 @@ def compute_avg_premium(queryset): # We exclude BTC, as LN <-> BTC swap premiums should not be mixed with FIAT. for tick in queryset.exclude(currency=1000): - premiums.append(tick.premium) - volumes.append(tick.volume) + premiums.append(float(tick.premium)) + volumes.append(float(tick.volume)) total_volume = sum(volumes)